» FaaSO is an ALPHA QUALITY functions as a service system «


Setting up a FaaSO Server

This guide will help you set up a FaaSO server which you can use to deploy your applications.

Since FaaSO is a container-based platform, you will need to have Docker installed on your server. This document assumes some basic familiarity with the command line and docker itself.

Getting the FaaSO Server

You can pull its latest image from GitHub:

docker pull ghcr.io/ralsina/faaso:latest
If you are on an ARM64 platform, use faaso-arm64 instead of faaso.

Running the FaaSO Server

It's a normal docker container, so you can run it like this:

$ docker network create faaso-net  # All faaso containers want this network
$ docker run -d --name faaso-proxy-fadmin \
        --rm --network=faaso-net \
        -v /var/run/docker.sock:/var/run/docker.sock \
        -v ${PWD}/secrets:/home/app/secrets \
        -e FAASO_SECRET_PATH=${PWD}/secrets \
        -v ${PWD}/config:/home/app/config \
        -p 127.0.0.1:8888:8888 ghcr.io/ralsina/faaso
Let's break down the command:

What can you change? You can change the port, the secrets and configuration paths. The rest pretty much has to be as shown.

Configuring the FaaSO Server

The FaaSO server configuration is in config/faaso.yaml. Here is a sample showing all the available options with their default values:

password: adminfoo
That's it. The only configuration option is the password for the admin interface. The user is always admin.

Reverse Proxy Configuration

{
        http_port 8888
        https_port 8887
        local_certs
}

http://*:8888 http://127.0.0.1:8888 {
        forward_auth /admin/* http://127.0.0.1:3000 {
                uri /auth
                copy_headers {
                        Authorization
                }
        }

        handle_path /admin/terminal/* {
                reverse_proxy /* http://127.0.0.1:7681
        }
        handle_path /admin/* {
                reverse_proxy /* http://127.0.0.1:3000
        }
      header Access-Control-Allow-Origin "*"

      import funkos
}
The import funkos line has to be there, because config/funkos is where FaaSO configures the reverse proxy for your applications. That file must exist.

IMPORTANT: You need to declare all names the server will respond to. SO, for example, if you want to use faaso.example.com as its public URL, you need to add http://faaso.example.com:8888 to the list of addresses in the Caddyfile, and you need to do this FOR EVERY DOMAIN NAME YOU WANT TO USE.

You can alternatively run the proxy using docker-compose with the following docker-compose.yml (adapt as needed):

version: "3.3"
services:
  faaso:
    container_name: faaso-proxy-fadmin
    networks:
      - faaso-net
    environment:
      - FAASO_SECRET_PATH=${PWD}/secrets
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ${PWD}/secrets:/home/app/secrets
      - ${PWD}/config:/home/app/config
    ports:
      - 8888:8888
    image: faaso
networks:
  faaso-net:
    external: true
Note: While it's technically possible to run the FaaSO server without the container, it makes absolutely no sense.