Skip to content

Server Administration

Manage your Formlander server - CLI, backups, logs, and troubleshooting

Everything you need to run Formlander on your server.

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

The installer asks for your domain, then installs Docker, starts a reverse proxy (kamal-proxy) with automatic HTTPS, and runs Formlander behind it. Several apps can share one server: each gets its own domain behind the same proxy.

At the end, the installer prints the admin email ([email protected]) and a random first password. If you lose it, read it on the server:

Terminal window
sudo cat /var/matcha/formlander/storage/initial-admin-password

Change the password in Settings after you sign in. The file is removed when you do.

Upgrading from an older version: if your admin still used the old default password formlander, Formlander replaces it with a random one on start. Read the new one from the file above.

CommandWhat it does
formlander installInstall Formlander
formlander updateBack up the database, pull the latest image, and redeploy with no downtime
formlander reloadRedeploy with the current configuration
formlander restore-dbPick a backup and restore it
formlander change-admin-passwordSet a new admin password without the old one
formlander checkCheck the server’s security settings
formlander versionShow the version

Run them with sudo.

/etc/matcha/config.yml # Domain, image, and environment for each app
/etc/cron.d/formlander-update # Nightly update
/var/matcha/formlander/
├── backups/ # Database backups
├── logs/
│ └── update.log # Output of the nightly update
└── storage/
├── formlander.production.db # Database
├── initial-admin-password # First password, until you change it
├── logs/ # App logs
└── uploads/ # Files sent with submissions

Each app has an entry in /etc/matcha/config.yml. Add environment variables under env, then run sudo formlander reload:

apps:
formlander:
image: karloscodes/formlander:latest
domain: forms.example.com
env:
FORMLANDER_SESSION_TIMEOUT_SECONDS: "86400"
Terminal window
sudo docker logs -f $(sudo docker ps -qf name=formlander) # App output
sudo tail -f /var/matcha/formlander/logs/update.log # Nightly updates

The container is named formlander or formlander-next. Each deploy starts the other name, so the old one keeps serving until the new one is healthy.

Terminal window
sudo sqlite3 /var/matcha/formlander/storage/formlander.production.db

Every update backs up the database first, so you get one backup per night. The last 3 backups are kept in /var/matcha/formlander/backups/.

Restore one any time with sudo formlander restore-db.

These backups live on the same server. If the server dies, the backups die with it.

Pick one off-server strategy:

StrategyEffortProtection
VPS snapshotsLowYour provider handles it. Turn on weekly snapshots in your VPS dashboard.
rsync to another serverMediumA cron job copies the backups every night.

VPS snapshots are the simplest. Most providers (Hetzner, DigitalOcean, Linode) offer them for a few dollars a month.

rsync example (daily at 2 AM, before the 3 AM update):

Terminal window
0 2 * * * rsync -az /var/matcha/formlander/backups/ user@backup-server:/backups/formlander/

Every night at 3:00 AM, server time, formlander update:

  • updates the formlander command itself,
  • backs up the database,
  • pulls the latest image and redeploys with no downtime.

If you can’t wait for the night, run sudo formlander update yourself.

ResourceMinimum
CPU1 vCPU
RAM512MB
Storage10GB SSD

Network: ports 80 and 443 open, for Let’s Encrypt and HTTPS.

ProblemFix
The site doesn’t loadsudo docker ps shows formlander (or formlander-next) and matcha-proxy. Check the app output with the logs command above.
SSL errorsCheck that DNS points to the server and ports 80 and 443 are open.
A form says “origin not allowed”Add the site’s domain to the form’s Allowed Origins.
Lost admin passwordsudo formlander change-admin-password
Terminal window
sudo rm /etc/cron.d/formlander-update
sudo docker exec matcha-proxy kamal-proxy remove formlander
sudo docker rm -f $(sudo docker ps -aqf name=formlander)
sudo rm -rf /var/matcha/formlander # Deletes your data. Copy the backups first.
sudo rm /usr/local/bin/formlander

Then remove the formlander entry from /etc/matcha/config.yml. If no other app uses the proxy, also run sudo docker rm -f matcha-proxy.