DockerSelf-Hosting

OpenFaaS and faasd: Run Small Python Functions on Your Own Server (Linux, Windows, Mac)

Before you start

  • 27 min read

Boxes marked Run in terminal are what you type; plain text explains why. Check what you need first

What you get in one minute#

OpenFaaS lets you turn a few lines of code into a small web address that runs on your own machine, and faasd is its lightweight version for one Linux box, with no Kubernetes and no Docker on the server.

OpenFaaS official logo

Logo: the official OpenFaaS project (github.com/openfaas/docs, MIT); OpenFaaS is a registered trademark of OpenFaaS Ltd.

You write a handler (here in Python), faas-cli packages it as a container image, your registry stores it, and faasd runs it. A call to https://faas.example.com/function/hello-lab (dummy) then runs your code. It suits small webhooks and home automation glue.

Read the licence part before you install. The free Community Edition (CE) is not open source. For faasd it is meant for one person's personal, non-commercial projects.

WhatValue (official sources, read 5 December 2026)
faasd0.20.0, released 15 November 2026 (previous: 0.19.7, March 2025)
faas-cli0.18.18, released 22 October 2026
Templatepython3-http from python-flask-template 0.4.0 (12 November 2025)
Licencefaasd CE and the gateway: CE EULA (see below). faas-cli and the Python template: MIT
Time neededAbout 1 hour (our estimate, not measured)
Size of the boxDocs: 512 MB to 1 GB RAM, 2 to 4 vCPU, 10 to 25 GB disk (README: 2 vCPU, 2 GB)
Ports8080 gateway (all interfaces by default), 22 SSH
Official docsdocs.openfaas.com

At a glance:

  • What runs where: faasd (containerd, no Docker) on the server. faas-cli and Docker only on your computer.
  • Windows and Mac: faasd needs Linux, so we use a small Multipass VM. faas-cli runs natively.
  • Free edition limits: 15 functions, one namespace, one shared admin password, no scale to zero.
  • Not covered: the cron-connector (its faasd setup is in a paid handbook).

How it fits together#

Your computer builds the image and pushes it to your registry, then tells the gateway on the faasd box to run it. The box pulls the image itself, so the box never needs Docker.

Three lanes: on your computer faas-cli with Docker pushes the function image to your HTTPS registry and sends deploy and call requests over HTTPS to Caddy or Traefik on the faasd box, which forwards them to the gateway on port 8080; the gateway tells containerd to create the function, containerd pulls the image from the registry and starts the function container, and an optional dashed async path goes through a queue

Drawn for this guide from the official docs. The dashed path is optional.

The docs are firm: faasd "must not be co-located with Docker" (both use containerd, iptables and CNI) and images "should always be built on another host".

Licence and limits: read this first#

faasd Community Edition is free to run, but it is not open source and not free for work. We are not lawyers; this is how we read the files on 5 December 2026.

PartLicence (source)
faasd CE, gateway, queue-workerCE EULA (plus a faasd addendum) for OpenFaaS Ltd's code. Only third-party contributions are MIT
faas-cli, python3-http templateMIT

The faasd addendum, in plain words:

  • Personal use: an individual may use faasd CE for personal, non-commercial projects, "provided that the user is not acting on behalf of any company".
  • Commercial use: one 60-day trial per year, for evaluation only. After that you need a paid OpenFaaS Edge (faasd-pro) licence.
  • Work: the docs say Edge is needed "at work, on work time, for a commercial product or service, or for an end-client". A home server that automates your employer's tasks is still work.
  • No resale, no redistribution, no support, no warranty. The main EULA also forbids modifying the software (section 4.1) and has a co-marketing clause (section 7). Read it.

The maintainer wrote in issue 1848 that the licence "is not an open source one or MIT", and in issue 1849 that it applies retrospectively to code OpenFaaS Ltd owns. If that does not suit you, see Nomad, Dokku or CapRover.

CE limitWhat the docs sayOur note
Functions, namespaces15 functions, 1 namespaceEdge page and comparison table agree
Scale to zeroNot supported in CEEdge has it. See issue 353
Async queueComparison: in memory, 10 items, 256 KB. Async page: 1 MB, max_inflight 1The pages disagree; faasd's compose file uses NATS with a file store. Test it
RetriesNot supported in CE
RegistryComparison: public only. faasd page: "including private registries"Pages disagree. Step 6 uses a private one; untested
LoginOne shared admin password
Dashboard"Legacy UI (in code-freeze)"
InternetRequired, no air-gap

Before you start#

Note: every domain, user name, password and address on this page is a dummy example (example.com, change-me, <faasd-ip>). Replace them with your own.

You needDetails
A Linux boxx86_64 or 64-bit Arm with systemd, no Docker. We follow Debian and Ubuntu. Windows and Mac readers: a Multipass VM (Step 1)
A computer to build onLinux, Windows or Mac with Docker (Docker Desktop, or Engine with buildx). Mac alternative: Colima
A registry with HTTPSOur Docker Registry guide; we use registry.example.com
NetworkYour computer reaches the box on port 8080. The box reaches GitHub and the registry
Run in terminalbash
docker --version
docker buildx version

Checklist:

  • [ ] Your use is personal and non-commercial
  • [ ] You can docker login to your HTTPS registry
  • [ ] The faasd box has no Docker
  • [ ] You can SSH to the box (Multipass: multipass shell)

Tested by DIY Lab Hub: not yet. Commands come from the official docs and the source at the release tags, read on 5 December 2026. We did not run them on a real machine.

Tip: the docs call faasd an appliance with "sole tenancy of any host". Give it its own VM.

LLM Guide: let your AI assistant set it up#

Prefer to let an AI do the typing? Copy the block below into ChatGPT, Claude, Gemini or a local model. It first asks about your setup (box, build computer, registry, HTTPS), then follows only the path that fits you. It uses the same pinned versions as this guide. You still read each command before you run it.

Instructions for your AI assistantllm
You are my assistant for installing faasd 0.20.0 (OpenFaaS Community Edition for one Linux box, no Kubernetes, no Docker on the server) and deploying a small Python function with faas-cli 0.18.18.
Follow the DIY Lab Hub guide https://diylabhub.com/openfaas/ (checked 5 December 2026).
Work one step at a time. Before each command, say in one line what it does. Wait for my OK before anything that deletes data, stops a service, changes a firewall or opens a port.

STEP 0 - FIND OUT MY SETUP. Ask me these questions (or have me run the read-only checks) before you do anything else:
1. Licence: is my use personal and non-commercial, not for work, a business or a client? If not, stop: faasd CE is not allowed for that (the guide's licence section explains why).
2. Which computer do I build on: Linux, Windows or Mac? Check: docker --version and docker buildx version
3. Which machine will be the faasd box? It must be Linux (x86_64 or 64-bit Arm, systemd) with NO Docker on it. On Windows or Mac I have no Linux box, so we create a Multipass VM. Check on the box: uname -m, systemctl --version | head -1, docker --version (the last must fail).
4. Do I have a registry with HTTPS (for example registry.example.com)? Is its certificate public, or a local one (Caddy "tls internal")?
5. Is port 8080 reachable from my computer to the box? What is the box's IP (<faasd-ip>)?
6. Do I run a reverse proxy: Traefik (on another machine), Caddy, nginx, or none? Do I want HTTPS with a public domain, HTTPS at home only, or plain HTTP at home for a first test?

THEN FOLLOW THE MATCHING PATH:
- Windows or Mac and no Linux box: create the VM: multipass launch 22.04 --name faasd --cpus 2 --memory 2G --disk 10G, then multipass info faasd for <faasd-ip>, then multipass shell faasd. Run the install steps inside it.
- Docker found on the faasd box: stop. faasd must not share a host with Docker. Use another machine or a fresh VM.
- No registry with HTTPS yet: send me to the DIY Lab Hub Docker Registry guide first (faasd has no setting for plain-HTTP registries).
- Registry with a local certificate: after Step 6 below, copy the root certificate to the box, then run: sudo cp registry-root.crt /usr/local/share/ca-certificates/registry-root.crt && sudo update-ca-certificates && sudo systemctl restart faasd-provider faasd
- Plain HTTP at home: use OPENFAAS_URL=http://<faasd-ip>:8080 and warn me the password travels in clear text.
- Traefik: Traefik must run on another machine (the box has no Docker, so labels cannot see faasd). Use the file provider: add --providers.file.directory=/dynamic to Traefik's command, mount a folder as /dynamic:ro, and save faasd.yml in it with router rule Host(`faas.example.com`), entryPoints https, tls certResolver le, and a loadBalancer server url http://<faasd-ip>:8080. Allow port 8080 from the Traefik machine only.
- No proxy but I want HTTPS: use Caddy (the guide's "Without Traefik: Caddy" section). Install it from Caddy's apt repository. Caddyfile for a public domain (Let's Encrypt; ports 80 and 443 open; DNS to the box):
    faas.example.com {
        reverse_proxy 127.0.0.1:8080
    }
  Home only: add "tls internal" as the first line inside the block and trust Caddy's root certificate on each device. First bind the gateway to localhost: back up /var/lib/faasd/docker-compose.yaml, then sudo sed -i 's/- "8080:8080"/- "127.0.0.1:8080:8080"/' /var/lib/faasd/docker-compose.yaml and sudo systemctl restart faasd. Then sudo systemctl reload caddy.

THE INSTALL:
1. On the faasd box: sudo apt-get update && sudo apt-get install -y git, then
   git clone --branch 0.20.0 --depth=1 https://github.com/openfaas/faasd
   cd faasd
   less hack/install.sh   (I read it, q leaves)
   ./hack/install.sh
   Do NOT set FAASD_DOMAIN (it installs a very old Caddy).
2. On my computer, install faas-cli 0.18.18 (pinned, with the checksum):
   Linux: V=0.18.18; F=faas-cli (or faas-cli-arm64 on aarch64); download https://github.com/openfaas/faas-cli/releases/download/$V/$F and its .sha256, check with sha256sum -c -, then sudo install -m 755 "$F" /usr/local/bin/faas-cli
   Windows PowerShell: download faas-cli.exe from the same release URL into $HOME\bin, compare Get-FileHash with the .sha256 file, add the folder to PATH.
   Mac: brew install faas-cli (or the pinned download with faas-cli-darwin / faas-cli-darwin-arm64 and shasum -a 256 -c -).
3. Log in without showing the password: export OPENFAAS_URL=http://<faasd-ip>:8080 (Windows: $env:OPENFAAS_URL = "http://<faasd-ip>:8080"), then
   ssh -t <your-user>@<faasd-ip> 'sudo cat /var/lib/faasd/secrets/basic-auth-password' | faas-cli login --username admin --password-stdin
   (Multipass: multipass exec faasd -- sudo cat /var/lib/faasd/secrets/basic-auth-password | faas-cli login --username admin --password-stdin). Never use sudo with faas-cli.
4. Create the function: faas-cli new hello-lab --lang python3-http --prefix registry.example.com/lab, change the tag in stack.yaml from latest to 0.1.0, and write hello-lab/handler.py:
   def handle(event, context):
       name = event.body.decode("utf-8").strip() or "world"
       return {"statusCode": 200, "body": "Hello " + name + ", from my lab!"}
5. Let faasd pull from my registry (once): I type the registry password myself. faas-cli registry-login --server registry.example.com --username change-me --password-stdin, copy credentials/config.json to the box, install it as /var/lib/faasd/.docker/config.json with mode 600 (sudo install -D -m 600), then delete the local credentials folder. My own docker login does not count for faasd.
6. Build, push, deploy: docker login registry.example.com --username change-me, then faas-cli build -f stack.yaml, faas-cli push -f stack.yaml, faas-cli deploy -f stack.yaml. Always push before deploy: a deploy with an image the box cannot pull can remove a working function. On Apple Silicon or Arm builders for an x86_64 box use faas-cli publish -f stack.yaml --platforms linux/amd64 instead.

CHECK IT WORKED:
- On the box: sudo systemctl status faasd faasd-provider --no-pager shows both active (running); curl -s -o /dev/null -w "%{http_code}\n" http://127.0.0.1:8080/healthz prints 200 (wait two minutes if not ready); faasd version prints "faasd Community Edition (CE) version: 0.20.0".
- On my computer: faas-cli version shows 0.18.18; faas-cli list shows hello-lab after the deploy.
- curl http://<faasd-ip>:8080/function/hello-lab -d "Ada" prints: Hello Ada, from my lab! (Windows: curl.exe). With HTTPS: curl -I https://faas.example.com/healthz should answer HTTP/2 200; set OPENFAAS_URL to the https address and log in again.
- On the box: sudo ls -l /var/lib/faasd/.docker/config.json shows a root-owned file with -rw-------.

RULES FOR YOU:
- Use only these versions and settings (faasd 0.20.0, faas-cli 0.18.18, template python3-http, image tags like 0.1.0). Do not use :latest and do not invent options. If a step fails, show me the exact error and read https://docs.openfaas.com/deployment/edge/ before guessing.
- Never install Docker on the faasd box.
- Never publish port 8080 to the internet: anyone who reaches the gateway can call every function. Only /system and /ui need the password, and CE has one shared admin password.
- Values like faas.example.com, registry.example.com, change-me and <faasd-ip> are examples; ask me for mine.
- Never ask me to paste passwords, tokens or keys into this chat.

Step 1: Get a Linux box for faasd#

Linux#

Use a spare PC, a 64-bit Raspberry Pi (3, 4 or 5) or a VM. The docs name no distribution; the recent faasd 0.20.0 bug reports used Ubuntu 22.04, so we do too. On the box:

Run in terminalbash
uname -m
systemctl --version | head -1
docker --version

uname -m must print x86_64 or aarch64, and the last command must fail.

Windows (PowerShell)#

faasd runs on Linux only, so create a VM with Canonical's Multipass, which the faasd docs recommend (install it from its download page).

Run in terminalpowershell
multipass launch 22.04 --name faasd --cpus 2 --memory 2G --disk 10G
multipass info faasd

multipass info faasd prints the VM's IPv4 address. We call it <faasd-ip> below. Open a shell inside the VM with multipass shell faasd.

Mac (Terminal)#

Install Multipass from its download page (a .pkg), then run the same two commands as on Windows.

Check it worked. You can reach a shell on the box. Inside it, docker --version fails.

Step 2: Install faasd on the box#

The installer asks GitHub for the latest release, so today it installs 0.20.0. Clone the tagged repository so that the script you run is the one we read.

Linux#

Run in terminalbash
sudo apt-get update && sudo apt-get install -y git
git clone --branch 0.20.0 --depth=1 https://github.com/openfaas/faasd
cd faasd
less hack/install.sh
./hack/install.sh

Read the script in less (q leaves). It installs runc, CNI plugins and containerd 1.7.27, copies the faasd binary and Compose file, enables IP forwarding and starts the systemd services faasd and faasd-provider. The first start downloads images and takes a minute or two.

Windows (PowerShell)#

The commands above run inside the VM:

Run in terminalpowershell
multipass shell faasd

Then paste the Linux block into that shell.

Mac (Terminal)#

Same as Windows: multipass shell faasd, then the Linux block.

Check it worked. On the box (the output is what the source prints; we did not capture a real run):

Run in terminalbash
sudo systemctl status faasd faasd-provider --no-pager
curl -s -o /dev/null -w "%{http_code}\n" http://127.0.0.1:8080/healthz
faasd version

You want both services active (running), 200 from the health check and a line like faasd Community Edition (CE) version: 0.20.0. If /healthz is not ready, wait two minutes.

Tip: do not set FAASD_DOMAIN for the installer: it would also install the very old Caddy v2.4.3. We install a current Caddy later.

Step 3: Install faas-cli on your computer#

faas-cli is the command-line tool. The docs list arkade, an install script, Homebrew and a Windows download. The script always takes the latest release; we pin 0.18.18 and check the checksum from the release page.

Linux#

Run in terminalbash
V=0.18.18
case "$(uname -m)" in x86_64) F=faas-cli;; aarch64) F=faas-cli-arm64;; *) echo unsupported; exit 1;; esac
cd "$(mktemp -d)"
curl -sSLO "https://github.com/openfaas/faas-cli/releases/download/$V/$F"
curl -sSL "https://github.com/openfaas/faas-cli/releases/download/$V/$F.sha256" | sha256sum -c -
sudo install -m 755 "$F" /usr/local/bin/faas-cli
faas-cli version

Windows (PowerShell)#

Codepowershell
$v = "0.18.18"
$url = "https://github.com/openfaas/faas-cli/releases/download/$v/faas-cli.exe"
New-Item -ItemType Directory -Force "$HOME\bin" | Out-Null
Invoke-WebRequest $url -OutFile "$HOME\bin\faas-cli.exe"
$want = (Invoke-RestMethod "$url.sha256").Split(" ")[0]
if ((Get-FileHash "$HOME\bin\faas-cli.exe").Hash -ieq $want) { "checksum OK" } else { "MISMATCH - delete the file" }
$env:Path += ";$HOME\bin"
faas-cli version

$env:Path lasts for this window; add %USERPROFILE%\bin to your user PATH to keep it.

Mac (Terminal)#

Run in terminalbash
brew install faas-cli
faas-cli version

Homebrew carries 0.18.18 today, but the docs warn that it "is likely to lag behind a little". For a pinned copy, use the Linux block with faas-cli-darwin (Apple Silicon: faas-cli-darwin-arm64) as F and shasum -a 256 -c - instead of sha256sum -c -.

Check it worked. faas-cli version prints a banner with the CLI's version and commit (0.18.18). It may add a complaint that it cannot reach a gateway: that is expected before Step 4.

Step 4: Log in to the gateway#

faasd made a random 63-character password for the user admin in /var/lib/faasd/secrets/basic-auth-password. We pipe it over SSH straight into faas-cli login, so it never shows on screen.

Linux#

Run in terminalbash
export OPENFAAS_URL=http://<faasd-ip>:8080
ssh -t <your-user>@<faasd-ip> 'sudo cat /var/lib/faasd/secrets/basic-auth-password' | faas-cli login --username admin --password-stdin
faas-cli list

Windows (PowerShell)#

Codepowershell
$env:OPENFAAS_URL = "http://<faasd-ip>:8080"
multipass exec faasd -- sudo cat /var/lib/faasd/secrets/basic-auth-password | faas-cli login --username admin --password-stdin
faas-cli list

Mac (Terminal)#

Same as Linux (with Multipass, use the Windows multipass exec line and export instead of $env:).

Check it worked. login ends with a line saying the credentials were saved, and faas-cli list prints the (still empty) function list. The browser page http://<faasd-ip>:8080/ui/ asks for admin and the same password. Plain HTTP is fine on a home network for a first test; the HTTPS section below fixes that.

Tip: the login is saved for the user who ran it. If you log in without sudo and later deploy with sudo, you get a 401 (faas-cli issue 972). Never use sudo with faas-cli.

Step 5: Create a Python function from a template#

python3-http is the template the docs recommend for most Python functions. faas-cli new downloads it from the Template Store into a template folder.

Linux#

Run in terminalbash
mkdir -p ~/functions && cd ~/functions
faas-cli new hello-lab --lang python3-http --prefix registry.example.com/lab
sed -i 's/:latest$/:0.1.0/' stack.yaml
cat > hello-lab/handler.py << 'EOF'
def handle(event, context):
    name = event.body.decode("utf-8").strip() or "world"
    return {
        "statusCode": 200,
        "body": "Hello " + name + ", from my lab!"
    }
EOF

Windows (PowerShell)#

Codepowershell
New-Item -ItemType Directory -Force "$HOME\functions" | Out-Null
Set-Location "$HOME\functions"
faas-cli new hello-lab --lang python3-http --prefix registry.example.com/lab
(Get-Content stack.yaml) -replace ':latest$', ':0.1.0' | Set-Content -Encoding ascii stack.yaml
@'
def handle(event, context):
    name = event.body.decode("utf-8").strip() or "world"
    return {
        "statusCode": 200,
        "body": "Hello " + name + ", from my lab!"
    }
'@ | Set-Content -Encoding ascii hello-lab\handler.py

Mac (Terminal)#

Same as Linux, but the sed line needs an empty backup suffix:

Run in terminalbash
sed -i '' 's/:latest$/:0.1.0/' stack.yaml

registry.example.com/lab is a dummy prefix: use your own. We replace latest with 0.1.0. event.body is bytes, so we decode it.

Check it worked. stack.yaml looks like this (from the CLI source: the gateway line shows the OPENFAAS_URL you set, or http://127.0.0.1:8080 if none was set):

File contentyaml
version: 1.0
provider:
  name: openfaas
  gateway: http://<faasd-ip>:8080
functions:
  hello-lab:
    lang: python3-http
    handler: ./hello-lab
    image: registry.example.com/lab/hello-lab:0.1.0

Tip: the default stack file is stack.yaml. Older guides say stack.yml or hello-lab.yml. Our faas-cli 0.18.18 reads stack.yaml without -f.

Step 6: Let faasd pull from your registry (once)#

faasd reads registry logins from /var/lib/faasd/.docker/config.json (source: pkg/service/service.go at 0.20.0). Your own docker login does not count. faas-cli registry-login makes the file. The user change-me is a dummy: use your registry's.

Linux#

Run in terminalbash
read -rsp "Registry password: " REGPASS; echo
printf '%s' "$REGPASS" | faas-cli registry-login --server registry.example.com --username change-me --password-stdin
unset REGPASS
scp credentials/config.json <your-user>@<faasd-ip>:/tmp/regconfig.json
ssh -t <your-user>@<faasd-ip> 'sudo install -D -m 600 /tmp/regconfig.json /var/lib/faasd/.docker/config.json && rm /tmp/regconfig.json'
rm -r credentials

Windows (PowerShell)#

Codepowershell
$p = Read-Host "Registry password" -AsSecureString
[System.Net.NetworkCredential]::new("", $p).Password | faas-cli registry-login --server registry.example.com --username change-me --password-stdin
multipass transfer credentials\config.json faasd:/tmp/regconfig.json
multipass exec faasd -- sudo install -D -m 600 /tmp/regconfig.json /var/lib/faasd/.docker/config.json
multipass exec faasd -- rm /tmp/regconfig.json
Remove-Item -Recurse credentials

Mac (Terminal)#

Same as Linux. With Multipass use the multipass transfer and multipass exec lines from Windows.

If your registry uses a local certificate (Caddy's tls internal), the box must trust it. The maintainer wrote in issue 186: "A valid TLS cert is required, for self-signed certs the CA should be part of the system's trust bundle". On the box, with registry-root.crt copied over (our reading: faasd needs a restart to notice a new system certificate):

Run in terminalbash
sudo cp registry-root.crt /usr/local/share/ca-certificates/registry-root.crt
sudo update-ca-certificates
sudo systemctl restart faasd-provider faasd

Check it worked. On the box, sudo ls -l /var/lib/faasd/.docker/config.json shows a root-owned file with mode -rw-------. The real test is Step 7.

Tip: faasd has no switch for plain-HTTP registries. The 2020 request ended with "http: server gave HTTP response to HTTPS client" (issue 97). Use HTTPS, as our registry guide does.

Step 7: Build, push and deploy#

build makes the image in your local Docker, push uploads it, deploy asks the gateway to run it (faas-cli up does all three). The template has a test stage, but an open issue (python-flask-template 71) says the build skips it.

Linux#

Run in terminalbash
cd ~/functions
docker login registry.example.com --username change-me
faas-cli build -f stack.yaml
faas-cli push -f stack.yaml
faas-cli deploy -f stack.yaml

Windows (PowerShell)#

Codepowershell
Set-Location "$HOME\functions"
docker login registry.example.com --username change-me
faas-cli build -f stack.yaml
faas-cli push -f stack.yaml
faas-cli deploy -f stack.yaml

Mac (Terminal)#

Same commands as Linux.

Check it worked. The build ends with the image name, push finishes without an error, and deploy prints Deployed. with an HTTP status in the 200s and the function URL (the exact number differs between versions). faas-cli list now shows hello-lab.

Apple Silicon or Arm builders. build makes an image for your own CPU. For an x86_64 box use faas-cli publish -f stack.yaml --platforms linux/amd64 instead of build and push (linux/arm64 for a Raspberry Pi box). The docs say publish uses Docker buildx and may need QEMU.

Tip: a deploy with a wrong image tag can remove your working function. Faasd 0.20.0 does that when the image cannot be pulled (faasd issue 388, open). Run faas-cli push first and check the tag before deploy.

Step 8: Call your function#

Linux#

Run in terminalbash
curl http://<faasd-ip>:8080/function/hello-lab -d "Ada"
echo "Ada" | faas-cli invoke hello-lab
curl -i http://<faasd-ip>:8080/async-function/hello-lab -d "Ada"
faas-cli logs hello-lab

Windows (PowerShell)#

Use curl.exe, because plain curl is a PowerShell alias with other options:

Run in terminalpowershell
curl.exe http://<faasd-ip>:8080/function/hello-lab -d "Ada"
"Ada" | faas-cli invoke hello-lab
curl.exe -i http://<faasd-ip>:8080/async-function/hello-lab -d "Ada"
faas-cli logs hello-lab

Mac (Terminal)#

Same commands as Linux.

Check it worked. The first two commands print Hello Ada, from my lab!. The async call answers 202 Accepted at once and gives no result: the docs say you need a callback header (X-Callback-Url) to receive one, and the route needs POST. We did not run these commands.

Tip: nobody has to log in to call /function/.... The gateway protects only /system/... and /ui/. We confirmed it in gateway/main.go at tag 0.27.13, and the docs say function authentication is up to you. Keep the gateway private or put a login in front.

Put it behind HTTPS (with or without Traefik)#

This is for a server with a domain, or a home name with a local certificate. Over plain http:// the admin password travels in clear text. faasd is not a Docker container, so Traefik's Docker labels cannot see it.

By default faasd listens on all interfaces. If Caddy runs on the same box, bind the gateway to localhost (a later reinstall may overwrite the file):

Run in terminalbash
sudo cp /var/lib/faasd/docker-compose.yaml /var/lib/faasd/docker-compose.yaml.bak
sudo sed -i 's/- "8080:8080"/- "127.0.0.1:8080:8080"/' /var/lib/faasd/docker-compose.yaml
sudo grep -n 8080 /var/lib/faasd/docker-compose.yaml
sudo systemctl restart faasd

Afterwards port 8080 answers only on the box; other computers use the HTTPS name.

With Traefik#

Run Traefik on another machine (the faasd box has no Docker). Use the file provider with the entrypoint https and resolver le from our Traefik guide. Add --providers.file.directory=/dynamic to Traefik's command, mount a folder as /dynamic:ro, save faasd.yml in it, and allow port 8080 from the Traefik machine only:

File contentyaml
http:
  routers:
    faasd:
      rule: "Host(`faas.example.com`)"
      entryPoints:
        - https
      service: faasd
      tls:
        certResolver: le
  services:
    faasd:
      loadBalancer:
        servers:
          - url: "http://<faasd-ip>:8080"

These are the file-provider form of the labels traefik.http.routers.faasd.entrypoints=https and traefik.http.routers.faasd.tls.certresolver=le. The file provider watches for changes by default.

Without Traefik: Caddy#

The official faasd TLS page uses Caddy. These are the Debian and Ubuntu install lines from Caddy's docs:

Run in terminalbash
sudo apt install --yes debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo chmod o+r /usr/share/keyrings/caddy-stable-archive-keyring.gpg /etc/apt/sources.list.d/caddy-stable.list
sudo apt update && sudo apt install caddy

The package runs Caddy as a service. Put this in /etc/caddy/Caddyfile for a public name (Let's Encrypt; ports 80 and 443 open; DNS pointing at the box):

File contenttext
faas.example.com {
    reverse_proxy 127.0.0.1:8080
}

At home with no public domain, add tls internal as the first line inside the block and resolve the name with your own DNS. Caddy signs a local certificate; trust its root on each device (steps in our Caddy guide; the service keeps it at /var/lib/caddy/.local/share/caddy/pki/authorities/local/root.crt). Then:

Run in terminalbash
sudo systemctl reload caddy
curl -I https://faas.example.com/healthz

Expected (not captured): HTTP/2 200. On your computer, log in again with the new address, and change the gateway: line in stack.yaml:

Run in terminalbash
export OPENFAAS_URL=https://faas.example.com

Tip: the official TLS page's Caddyfile has an unclosed { in its global block (email example.com and no closing brace). Do not copy that example as it is; use the one above.

Security and testing#

ControlHow
Gateway passwordOnly /system and /ui need it. CE has one shared password: whoever has it is admin
Function routesOpen to anyone who can reach the gateway. Do not publish port 8080
Public exposureOpen bug faasd 387: idle connections can stop the gateway until faasd restarts. Restrict access
Registry loginconfig.json, mode 600, root only. Use a pull-only registry user
Function userThe Python template runs your code as the non-root user app

To publish one function only, let Caddy pass just that path (our example, not from the OpenFaaS docs; deploy through a second, private name):

File contenttext
faas.example.com {
    @hello path /function/hello-lab /function/hello-lab/*
    handle @hello {
        reverse_proxy 127.0.0.1:8080
    }
    respond 404
}

Quick tests:

Run in terminalbash
sudo systemctl status faasd faasd-provider caddy --no-pager
curl -I https://faas.example.com/healthz
faas-cli list
sudo faasd service logs gateway --since 1h

Run it on a schedule#

OpenFaaS has a cron-connector driven by two annotations (topic: cron-function and a schedule). For faasd the docs only say "See Serverless For Everyone Else for detailed instructions": a paid handbook. faasd's compose file has no cron-connector and we verified no setup.

A simple alternative is plain cron on any machine that can reach the address (not run by us). Add with crontab -e:

File contenttext
*/5 * * * * curl -fsS -d "cron" https://faas.example.com/function/hello-lab > /dev/null

Windows users can run curl.exe from Task Scheduler. For containers see Ofelia.

Common mistakes#

MistakeWhy it happensDo this instead
sh: 5: set: Illegal option -o pipefail (faasd 265)Installer piped into sh, which on Debian is dashRun ./hack/install.sh or use bash
Docker on the faasd box; build fails with [Errno 28] No space left on device (faasd 331)Docker and faasd share containerd, iptables and CNIBuild on another computer
unable to pull image ... pull access denied, repository does not exist or may require authorization (faas-cli 972)deploy before push, or an image name the box cannot reachpush first; full registry name in image:
unauthorized access, run "faas-cli login" to setup authentication for this server (faas-cli 972)Logged in as one user, deployed with sudoSame user, no sudo
failed to fetch oauth token: unexpected status: 403 Forbidden (faasd 308)Your docker login is not seen by faasd. The issue names no single causeStep 6; test with a public image first
http: server gave HTTP response to HTTPS client (faasd 97)faasd pulls over HTTPS onlyHTTPS registry or a trusted local CA
ghcr.io/openfaas/gateway:0.27.9: not found (faasd 371)Old compose file pinned an image the project removedInstall from the current release
faasd requires a 64-bit Operating System, see: https://github.com/openfaas/faasd/issues/36432-bit Raspberry Pi OS from an old tutorial64-bit OS; check uname -m
OPENFAAS_URL ignored (faas-cli 1019, open)A non-default gateway: in stack.yaml winsEdit that line or pass --gateway
ERROR: BuildKit is enabled but the buildx component is missing or broken (faas-cli 958, open)Docker Engine without the buildx pluginDocker Desktop, or Docker's own packages
AI assistants: "Install Docker on the faasd server and run faas-cli up there"The file is called docker-compose.yamlRuntime is containerd; Docker builds elsewhere
AI assistants: def handle(req):, --lang python, stack.ymlThe docs' "first Python function" tutorial is from 2017python3-http, handle(event, context), stack.yaml
AI assistants: "faasd is MIT, scales to zero, free for companies"Old posts and the old licenceCE EULA, personal use, no scale to zero

Tip: put your function source and stack.yaml in Git. If the box dies, the docs' answer is a new VM and a fresh deploy.

Tip: use real tags (0.1.0, 0.1.1) in stack.yaml. With latest you cannot tell which build runs.

Tip: after each faas-cli new, check the gateway: line before you deploy to another server.

Troubleshooting#

ProblemSolution
Gateway does not answersudo systemctl status faasd faasd-provider containerd --no-pager, then sudo journalctl -u faasd -u faasd-provider -n 100 --no-pager
A core service misbehavessudo faasd service logs gateway --since 1h (also queue-worker, nats)
Function logsfaas-cli logs hello-lab
Nothing runs after a rebootsudo systemctl enable --now containerd faasd-provider faasd
deploy says 400 or 500Read the whole message: it names the image and the registry error

Exact error texts#

  • Error: failed to dial "/run/containerd/containerd.sock": context deadline exceeded (faasd 48): containerd was not enabled at boot.
  • Error: env-var HOME, not set (faasd 282): installer run from cloud-init; the script now sets HOME.
  • unable to dial to 10.62.0.13:8080, error: dial tcp 10.62.0.13:8080: connect: connection refused (faasd 170): a proxy started too early; release 0.19.6 fixes an early exit.
  • Unexpected status: 500, message: error deleting container ... failed precondition (faasd 293): release 0.19.5 says it fixes this update failure.

Known bugs (open, December 2026)#

Faasd 387: on 0.20.0 idle TCP connections can stop the gateway while faasd still shows active; restart faasd. Faasd 388: a failed image pre-pull on update removes the running function. Python template 71: the test stage is skipped.

Updates and backups#

The CE docs have no upgrade page. The Edge page replaces the binary, upgrades image tags in the Compose file, restarts the services, and warns that a reinstall can overwrite docker-compose.yaml. We did not test an upgrade. Our plan: read the release notes, back up, then run the installer from the new tag (Step 2).

What to back up. /var/lib/faasd (password, secrets, registry login, Compose file, NATS and Prometheus data), /var/lib/faasd-provider and /etc/caddy. Function code lives in Git, images in the registry. We stop faasd briefly for a consistent copy. Save as /usr/local/sbin/faasd-backup.sh on the box:

File contentbash
#!/usr/bin/env bash
set -euo pipefail
out="/var/backups/faasd-$(date +%F).tar.gz"
trap 'systemctl start faasd-provider faasd' EXIT
systemctl stop faasd faasd-provider
tar -czf "$out" /var/lib/faasd /var/lib/faasd-provider /etc/caddy
chmod 600 "$out"

The trap restarts faasd even if tar fails. Run sudo chmod 700 on the script, add 0 3 * * * /usr/local/sbin/faasd-backup.sh to root's crontab (sudo crontab -e; the box is Linux for every reader), and copy the archives off the box. On your computer, keep the functions folder in Git.

Restore test. On a fresh VM install the same faasd version (Step 2), stop both services, run sudo tar -xzf <archive> -C /, start them, then faas-cli list. Your functions should be back. This is our reading, not a tested restore.

Performance and resources#

The docs give no measured numbers and we measured none. The systemd units cap faasd and faasd-provider at MemoryMax=500M each (hack/*.service); watch them with top. The gateway's read_timeout=60s, write_timeout=60s and upstream_timeout=65s limit synchronous calls, so use the async route for longer jobs. CE runs async jobs one at a time (max_inflight=1). A Raspberry Pi 3, 4 or 5 works with a 64-bit OS only.

FAQ#

Is faasd free for my home lab? Yes, for one person's personal, non-commercial projects, under the faasd EULA. Not for work, a business or a client.

Do I need Kubernetes? No. faasd uses containerd and CNI on one host. The Kubernetes version of OpenFaaS is a different install; see our Kubernetes introduction.

Can I run Docker on the same box? The docs say no. Build on another machine.

Can I use another language? Yes. faas-cli template store list shows Node, Go, Java, PHP, C#, Ruby and a Dockerfile template.

Does it scale to zero? Not in CE, per the comparison table. Edge adds it.

What else can run my workloads? See Nomad, Rancher, Doco-CD and Docker Compose.

Sources#

Checked against the official docs on 2026-12-05. Nothing was run on a real machine by DIY Lab Hub; the commands come from the docs, the source at the release tags and the issues above.

Try one of these