selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
self-workerd logo

Self-host self-workerd

0.0.1

Self-hosted FaaS platform using Cloudflare workerd runtime

AlphaOpen SourceMIT
Updatedlast year
LanguageTypescript
Setup difficultyAdvanced
Stars
141
Ports
3000 (Publisher API server), 8080 (Worker HTTP listener (configured in workerd config.capnp))
Requires
Node.js
Install with Docker

What is self-workerd?

self-workerd is a proof-of-concept Function as a Service platform you can run on your own infrastructure. It uses workerd, the V8-based JavaScript runtime behind Cloudflare Workers, to execute functions in isolated environments. The system has two components: a Publisher (Node.js API server) that receives, validates, and stores function definitions, and Workers that fetch the configuration and run workerd to execute functions. Functions are JavaScript ESModules with a fetch handler. Requests are routed by URL path. You can run it locally with pnpm or deploy via Docker on any container platform. The guide covers Fly.io deployment with auto-scaling. Licensed MIT, version 0.0.1.

Should you self-host self-workerd?

self-workerd scores 36/100 on selfhost.directory (how scoring works) and ranks #6 of 7 in Serverless. It has 141 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is advanced: plan for several services and some ongoing maintenance. It is MIT-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is faas (68/100, 26 253 stars). It scores higher overall, so compare the two before you pick. See self-workerd vs faas side by side.

Features

  • Auto-scaling supportRequires Fly.io or compatible platform
  • Container-based deployment
  • Dynamic configuration generation
  • Function publishing API
  • Isolated function execution
  • Path-based Routing
  • Persistent function storage

self-workerd README

How to install self-workerd

Install self-workerd with Docker

Environment variables
DATA_PATH, PUBLISHER_ENDPOINT, PORT

docker build -f ./Dockerfile .. -t self-faas-publisher docker build -f ./Dockerfile .. -t self-faas-worker

Separate Dockerfiles for Publisher and Worker components

How to configure self-workerd

  • DATA_PATHFilesystem path where function definitions are stored (mounted volume)

    Filesystem path where function definitions are stored (mounted volume)

  • PORT3000Port for the Publisher API server to listen on

    Port for the Publisher API server to listen on

  • PUBLISHER_ENDPOINThttp://host.docker.internal:3001URL of the Publisher API for Workers to fetch configuration

    URL of the Publisher API for Workers to fetch configuration

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…