Deploy any folder to your own Linux server, with HTTPS, in two commands.
landfall (lf) is a CLI. It sets up a server over ssh and runs your sites on it as Docker Compose projects behind
Traefik. Certificates are automatic. Nothing of landfall's runs on the server.
📖 Documentation: ph1p.github.io/landfall
npm i -g landfall # installs both `landfall` and its short name `lf`
lf setup vps --host 203.0.113.7 # a fresh Ubuntu/Debian box gets Docker, a firewall, Traefik and your ssh key
cd my-site && lf deploy -s vps # live at https://my-site.203-0-113-7.sslip.ioNo DNS is needed for the first deploy. Add your own domain later with -d example.com.
No server yet? Try it locally runs the same commands against Docker containers on your machine.
| you want to | landfall gives you |
|---|---|
| put a side project, a static site or an API online | one VPS, one command per deploy, HTTPS without DNS setup |
| run many sites on one cheap server | one Traefik for all of them, a domain per site, logs, env and backups per site |
| deploy from git and CI | branch and tag rules per environment, lf promote test prod, a CI workflow from lf ci init |
| keep a database and its data safe | named volumes, scheduled and offsite backups, restore in one command |
| keep a site up when one server fails | one site on several servers, an edge server that balances and checks them |
| share a server with clients or teammates | tenants: each gets its own rootless Docker, sites and domains, with limits |
| host at home, on a NAS or a Steam Deck | works wherever Docker runs, even without a package manager |
| let an AI agent deploy and operate | no prompts without a terminal, --json reads, clear exit codes, undo |
| see visitors without a third-party service | cookieless analytics on your own server |
- A server is an ssh target. If
ssh vpsworks,lf deploy -s vpsworks. - A site is a Compose project.
docker compose upruns it on your laptop.lf deployruns the same file behind HTTPS. - No agent on the server. Everything lives as plain files under
/opt/landfall. You can fix it by hand. - Every change is journaled.
lf historyshows what landfall changed.lf undoreverts most of it. - Failed deploys roll back. A release whose containers do not start is replaced by the previous one.
- One site, several servers, if you want. List them as
serversin.landfall.json.lf deployswitches one server at a time, andlf sites infoshows where they differ. See Several servers. - The CLI is the product. Scripts, CI jobs, AI agents and the web UI (
lf ui) all run the samelfcommands.
landfall is a good tool to hand to an AI coding agent such as Claude Code, Codex or Cursor. The agent can set up a server, deploy, read logs and fix problems on its own, and you can check every step.
- No hidden prompts. Without a terminal,
lfnever waits for input. A command that would ask fails and says to pass-y. - Clean JSON. Read commands support
--json. Results go to stdout, progress and errors to stderr. - Clear exit codes.
0success,1error,2unknown command.lf check <site>exits1when the site is down. - Safe by default.
-ynever overrides a safety check, such as a firewall rule that would lock out ssh. Only--forcedoes. - Secrets stay out of the command line. Passwords and env values come from stdin or environment variables, never from argv or the journal.
- Every action is reviewable and undoable.
lf history --jsonshows what a run changed.lf undoreverts it. - Docs for machines. llms.txt indexes the docs. Scripts, CI and AI agents is the full contract.
Give your agent this prompt to start:
Use the landfall CLI (`lf`) to deploy this project. Read https://ph1p.github.io/landfall/automation first.
Pass -y, use --json for reads, and run `lf check` after deploying.
- Setting up a VPS by hand takes many steps.
lf setupinstalls Docker, a firewall, Traefik and an ssh key in one command. - Certificates and DNS slow down the first deploy. A new site gets HTTPS on sslip.io right away.
- Many deploy tools run a control plane on your server. landfall installs none. It leaves plain Compose projects behind.
- Deploys should follow git. Rules say which branches and tags each environment takes.
lf promote,lf ci initandlf autodeploykeep to them. - Day-to-day work is spread over many tools. Logs, env and secrets, domains, backups, updates, firewall and scans are all
lfcommands.
npm i -g landfall # or: pnpm add -g landfall
lf --help # all commands
lf <command> --help # one command's optionsYour machine needs Node.js 22.4+, ssh, ssh-copy-id and tar. rsync makes redeploys faster.
The server needs a root login, or a user with passwordless sudo. landfall installs Docker itself:
- Ubuntu and Debian: Docker, ufw, unattended-upgrades, and fail2ban when ssh passwords stay on. No ufw behind an AWS, Google Cloud, Azure, Oracle or Alibaba firewall.
- Fedora, RHEL-likes, Alpine, SUSE (dnf, yum, apk, zypper): Docker and rsync.
- No package manager (Synology DSM, SteamOS): works when Docker is already there. See NAS, Steam Deck and other systems.
lf setup vps --host 203.0.113.7 # once per server: Docker, firewall, Traefik, an ssh key
cd my-site
lf deploy -s vps # → https://my-site.203-0-113-7.sslip.io
lf deploy -s vps -d example.com # or your own domain (point its A record at the server first)
lf deploy # later: redeploy; settings come from ./.landfall.jsonlf deploy looks at the folder and picks what to do:
Apps cover Node.js, Bun, Deno, Python, Go, Rust, Java/Kotlin, .NET, Ruby, PHP and Elixir. See Deploy a site and Compose sites.
lf ls # sites with status
lf logs -f # follow a site's logs
lf env API_KEY=abc # set a variable (recreates the services)
lf domains --add www.example.com # add a domain
lf rollback # go back to the previous release
lf deploy -E prod --tag latest # deploy the newest tag the prod git rule allows
lf volume backup # back up the site's data
lf updates && lf update # list, then apply OS and image updates
lf history && lf undo # what landfall changed; revert the last run
lf ui # all of this in a local web UI| term | meaning |
|---|---|
| server | An ssh target: a ~/.ssh/config alias, or one added with lf server add or lf setup. Pass it as -s <name>. The first one added is the default. |
| site | One Compose project on a server. It is your compose.yaml, or one landfall generates for a static folder, Dockerfile or image. |
| project file | ./.landfall.json, written by the first lf deploy: { "name", "server", "domains" }. |
| main domain | Optional, per server (lf server domain vps example.com). Sites then default to <site>.example.com. Without one, sites get <site>.<ip-with-dashes>.sslip.io. |
| release | One per deploy. The last 5 stay (--keep n). lf rollback switches between them. |
| run | One lf invocation that changed a server. lf history lists runs. lf undo reverts them. |
| group | Opt-in. One site on several servers: "servers": ["a", "b"] in .landfall.json, or -s a,b. The first is the primary. Site commands run on each server; an edge server can balance between them. See Several servers. |
| tenant | Opt-in. A user on your server with its own rootless Docker, sites and Traefik, limited to the domains you give it (lf tenant add). See Tenants. |
The site comes from the argument, else from ./.landfall.json.
The server comes from -s, else from ./.landfall.json, else the default server (lf server use).
Everything is at ph1p.github.io/landfall.
| guide | covers |
|---|---|
| Try it locally | Docker containers as test servers: setup, deploy, several servers, tenants |
| Servers | lf setup, its flags, registering servers, NAS and other systems |
| Deploy a site | site kinds, env and secrets, CI, uploads, environments, main domains |
| Git deploys | branch and tag rules, --ref/--tag, promote, CI, auto-deploy |
| Compose sites | x-landfall, routes, private ports, IP allowlists, volumes |
| Day-to-day | logs, env, secrets, domains, logins, tunnels, restart, removal |
| Scaling and load balancing | replicas, rolling deploys, traffic split |
| Lifecycle hooks | commands or npm scripts around build, deploy, rollback and removal |
| Several servers | groups, private networks, pinned services, an edge in front, drift and lf sync |
| Volumes and backups | scheduled and offsite backups, push and pull data |
| Updates | OS packages, images, Docker Compose, vulnerability scans |
| Traefik | landfall's Traefik, HTTP/3, the dashboard, your own Traefik |
| Server administration | firewall, services, SSH keys, users, swap, hardening |
| Tenants | sharing a server: users with their own rootless Docker, sites and domains |
| Traffic, certificates and checks | request stats, certificate state, HTTPS checks |
| Analytics | visitors, funnels, events and web vitals on your own server, cookieless by default |
| History and undo | the server journal, what lf undo reverts |
| Plugins | exposure checks, fail2ban, Trivy, installing and writing plugins |
| Web UI | lf ui, its pages, its security model |
| Scripts, CI and AI agents | non-interactive use, --json, secrets, exit codes, recipes |
| Reference | every command, file and environment variable |
| Troubleshooting | error messages and fixes |
Working on landfall itself? Read CONTRIBUTING.md. Coding agents read AGENTS.md.
MIT