Skip to content
Formlander

Deployment

Launch Formlander locally or on a server with environment-driven configuration.

Formlander runs on your own server with Chasen: HTTPS, live backups of the database, and an update each night. Pick where you start.

On a fresh Ubuntu or Debian server, as root:

Terminal window
curl -fsSL https://formlander.com/install | sudo bash -s forms.example.com

Put your domain in place of forms.example.com. It installs Chasen (and Docker, when the server has none), and runs Formlander. At the end it prints the admin email and the first password. Run it again to update Formlander now.

If you deploy other apps with Chasen, or you prefer your own terminal:

Terminal window
curl -fsSL https://chasenhq.com/cli | sh
chasen deploy karloscodes/formlander --server [email protected] --domain forms.example.com --auto-update

The first deploy installs Chasen on the server through SSH. --auto-update gives the same nightly update. Without it, run the line again to update.

  • The server needs Ubuntu or Debian, ports 80 and 443 open, and an A record for your domain. HTTPS comes on the first request.
  • Sign in at https://forms.example.com as [email protected], then change the password in Settings. To read the first password again: chasen -a formlander run cat /app/storage/initial-admin-password.
  • Nightly updates. The newest Formlander image deploys each night, with a backup first. The old version keeps running if the new one does not start. New versions come on a weekly train, as release candidates first: see Releases and updates.
  • No settings needed. Chasen gives Formlander its session secret and keeps /app/storage across deploys.
  • Backups. With a bucket (chasen bucket), a live replica copies each change to it as it happens, about a second behind, and the snapshots go there too. Chasen also takes a checked snapshot of the database every hour and before each deploy. Chasen backs up the database, not /app/storage/uploads: if your forms take files, back that folder up yourself.
  • Everyday commands, from your computer after chasen add server [email protected]: chasen -a formlander status, logs, backups, restore, and rollback. On the server itself: sudo chasen-server status formlander. See the Chasen docs.

Formlander is one Docker image, karloscodes/formlander, for amd64 and arm64. Use latest, or a version like 3.6.0.

Terminal window
docker run -d --name formlander \
-p 8080:8080 \
-e FORMLANDER_SESSION_SECRET=$(openssl rand -hex 32) \
-v $(pwd)/storage:/app/storage \
karloscodes/formlander:latest
  • Keep the session secret. A new one signs everybody out.
  • Sign in at http://localhost:8080 as [email protected]. The first password: docker exec formlander cat /app/storage/initial-admin-password.
  • In production, put HTTPS in front, with any reverse proxy that forwards to port 8080: Caddy, Nginx, or a Cloudflare Tunnel. Formlander needs nothing special from it.
  • Health path: /up (also /_health).
  • Webhooks and emails go out from the same process. Keep the container running.

Formlander reads environment variables. A .env file in the working directory works too, and the environment wins over it.

Variable Default Description
FORMLANDER_SESSION_SECRET (required in production) Signs the login sessions. Falls back to PRIVATE_KEY, which Chasen sets
FORMLANDER_ENV development (production in the Docker image) development or production
FORMLANDER_PORT 8080 The HTTP port
FORMLANDER_LOG_LEVEL error (info in development) debug, info, warn, or error
FORMLANDER_DATA_DIR storage (/app/storage in the Docker image) The database, the uploads, and the first password
FORMLANDER_LOGS_DIR storage/logs (/app/logs in the Docker image) Rotated log files. Every line also goes to stdout, so docker logs and chasen logs show them

The data directory (/app/storage in the image) holds everything to keep:

Path Contents
formlander.production.db The SQLite database: forms, submissions, settings. The name ends with the environment
uploads/ Files sent with submissions, 10 MB each at most
initial-admin-password The first password, until you change it

Mount it as a volume: without one, the data is gone with the container.

To back it up, copy the database with SQLite’s online backup, which is safe while Formlander runs, and copy uploads/:

Terminal window
sqlite3 storage/formlander.production.db ".backup backup.db"

To move to a new host, stop the container, copy the data directory, and start it there.

Servers that the older installer set up keep working as they are: the nightly update, the backups, and the formlander commands. Running the install line again on them changes nothing. To move one to Chasen, see Move to Chasen.