GenHTTP Lambda Docs

Running a server

Install

Run the community edition with Docker or Docker Compose - one container, one port, one volume - and the steps that make it ready for others to use.

GenHTTP Lambda runs as one container: the platform, the editor, the admin panel, the APIs and every app share one process, and everything it keeps is in one volume. There is no database server to run, unless you choose PostgreSQL.

Requirements#

  • Docker, on Linux, amd64 or arm64 - a small VPS, a NAS, a home server or a Raspberry Pi with a 64-bit system.
  • One port (8080 inside the container) and one volume (mounted at /data).
  • Memory: the server idles at a few hundred megabytes. A version is kept on disk and read where it is needed, so what its files weigh costs little memory to put online, change or make a draft of. What a request carries is held while it is read: saving 120 MB of pictures as JSON, in base64, took about 430 MB, a zip or an export of them about 150 MB. Plan 1.5 GB for apps that ship close to the production limit of 128 MB, more where several are saved at once.
  • Disk: the last 50 versions of every app are kept - each takes what it changed, as what several of them hold is kept once - and every draft holds a copy of its app’s data. Watch the panel’s Storage section.

With docker run#

Shell

docker run -d --name lambda --restart unless-stopped -p 8080:8080 \
  -v lambda-data:/data \
  -e LAMBDA_PUBLIC_URL=https://lambda.example.com \
  -e LAMBDA_ADMIN_TOKEN=a-long-random-password \
  genhttp/lambda

With Docker Compose#

docker-compose.yml

services:
  lambda:
    image: genhttp/lambda:latest
    ports:
      - "8080:8080"
    environment:
      LAMBDA_PUBLIC_URL: https://lambda.example.com
      LAMBDA_ADMIN_TOKEN: a-long-random-password
      LAMBDA_CONTACT: it@example.com
    volumes:
      - lambda-data:/data
    restart: unless-stopped

volumes:
  lambda-data:

Shell

docker compose up -d

The repository’s samples/community has the same with an .env file, the build agent as an optional profile, and a PostgreSQL overlay.

The settings to start with#

Variable Why
LAMBDA_PUBLIC_URL Where people and agents reach the installation, such as https://lambda.example.com. The apps’ addresses are made from it. Until it is set, they read http://localhost:8080. Once it is set, the server answers only at that name and at localhost.
LAMBDA_ADMIN_TOKEN The password of the admin panel at /admin. Without it, there is no panel and no operator API.
LAMBDA_CONTACT An email address the pages offer - for owners who want an app moved to production, for one.

Everything else has a default; see Configuration.

Check that it runs#

  • The address in LAMBDA_PUBLIC_URL, once HTTPS is in front, shows the installation’s front page, and /admin asks for the admin token. On the server itself, http://localhost:8080/ works too. Once the address is set, other names - the server’s IP address among them - get a page saying nothing is online there.
  • GET /api/v1/system answers with what the installation offers - the image’s health check calls it.
  • The log says where the data is, and what about the configuration needs attention: docker logs lambda.

Before others use it#

  1. HTTPS. Put the server behind your reverse proxy with one entry for the whole host, or let it serve TLS itself - see Addresses, HTTPS and domains.
  2. Decide how apps are addressed. Below /lambda/ on your address is fine for apps you and your team build. To host apps of people you do not know, give the apps a domain of their own - see Security.
  3. Back up the volume, including secrets.key - see Backups and updates.
  4. Say whom it is for under Settings in the panel: Home - you, your household, your friends - as it comes, or Enterprise for a company or another organization, whose pages then suggest apps for work and whose agents build tools for colleagues. See Settings.
  5. Set the limits under Limits in the panel: how long unused apps are kept, how large they may grow, and - for a team installation - that new apps start in production.
  6. Connect your agent - see Connect an agent.

Usage reports#

The community edition sends a short usage report once a day - the version, the machine, which options are on, and counts over the apps; never an app’s name, code, data or anybody’s address. LAMBDA_USAGE_REPORTS=false switches it off. The panel’s Usage report section shows the last report exactly as sent; the list of its contents is in the repository.