landfall 0.4.6 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +90 -41
- package/dist/cli.mjs +234 -210
- package/dist/index.html +182 -164
- package/dist/server-DA-e5nav.mjs +9 -0
- package/package.json +2 -2
- package/dist/server-c9LxeAd1.mjs +0 -5
package/README.md
CHANGED
|
@@ -12,7 +12,8 @@ cd my-site && lf deploy -s vps # live at https://my-site.203-0-113-7.sslip.
|
|
|
12
12
|
- **No agent on the server.** Every site is a plain Docker Compose project under `/opt/landfall`, so you can read, run and fix it by hand.
|
|
13
13
|
- **Your compose.yaml is the site.** App, database, worker: `docker compose up` runs it locally, `lf deploy` runs the same file behind HTTPS.
|
|
14
14
|
- **Every change is journaled** on the server and can be undone with `lf undo`.
|
|
15
|
-
- **
|
|
15
|
+
- **The CLI is the product.** Every feature is an `lf` command first, usable from scripts, CI and agents.
|
|
16
|
+
The web UI (`lf ui`) is a front end for those commands: each button runs one and shows it.
|
|
16
17
|
|
|
17
18
|
`lf` is short for `landfall`. Both commands are installed.
|
|
18
19
|
|
|
@@ -28,7 +29,7 @@ cd my-site && lf deploy -s vps # live at https://my-site.203-0-113-7.sslip.
|
|
|
28
29
|
- [Firewall](#firewall)
|
|
29
30
|
- [History and undo](#history-and-undo)
|
|
30
31
|
- [Managing servers](#managing-servers)
|
|
31
|
-
- [
|
|
32
|
+
- [Web UI](#web-ui)
|
|
32
33
|
- [Using landfall from scripts and agents](#using-landfall-from-scripts-and-agents)
|
|
33
34
|
- [Command reference](#command-reference)
|
|
34
35
|
- [Files and config](#files-and-config)
|
|
@@ -37,7 +38,7 @@ cd my-site && lf deploy -s vps # live at https://my-site.203-0-113-7.sslip.
|
|
|
37
38
|
|
|
38
39
|
## Install
|
|
39
40
|
|
|
40
|
-
You need Node.js 22+ plus `ssh`, `ssh-copy-id` and `tar` on your machine. The server must run Ubuntu or Debian
|
|
41
|
+
You need Node.js 22.4+ plus `ssh`, `ssh-copy-id` and `tar` on your machine. The server must run Ubuntu or Debian
|
|
41
42
|
and accept a login as root or as a user with passwordless sudo. landfall installs Docker itself.
|
|
42
43
|
|
|
43
44
|
```sh
|
|
@@ -54,7 +55,7 @@ lf <command> --help # every option of one command
|
|
|
54
55
|
| **site** | One Compose project on a server: your `compose.yaml`, or one landfall generates for a static folder, a Dockerfile or a prebuilt image. Services with `x-landfall: { port }` are routed through Traefik. |
|
|
55
56
|
| **project file** | `./.landfall.json`, written by the first `lf deploy`: `{ "name", "server", "domains" }`. Commands that take `[name]` default to this site, and `-s` defaults to its server. |
|
|
56
57
|
| **main domain** | Optional per-server domain (`lf server domain vps example.com`). Sites then default to `<site>.example.com`, and a bare name like `shop` means `shop.example.com`. Without one, sites get `<site>.<ip-with-dashes>.sslip.io` (e.g. `blog.203-0-113-7.sslip.io`), which resolves without any DNS setup. |
|
|
57
|
-
| **release** | Every deploy creates one, with an id like `20260122143005`. The last 5 are kept. `lf rollback` switches between them. |
|
|
58
|
+
| **release** | Every deploy creates one, with an id like `20260122143005`. The last 5 are kept (`--keep n` for more). `lf rollback` switches between them, back and forth. |
|
|
58
59
|
| **run** | One landfall invocation that changed something on a server. Runs are listed by `lf history` and reverted by `lf undo`. |
|
|
59
60
|
|
|
60
61
|
How defaults resolve, for every command:
|
|
@@ -71,7 +72,7 @@ lf setup vps --host 203.0.113.7
|
|
|
71
72
|
```
|
|
72
73
|
|
|
73
74
|
1. Creates `~/.ssh/landfall_vps` and installs it with `ssh-copy-id`. You type the root password once.
|
|
74
|
-
2. Installs Docker, ufw (allowing ssh, 80 and 443), fail2ban and unattended-upgrades.
|
|
75
|
+
2. Installs Docker, ufw (allowing ssh, 80 and 443, plus 443/udp for HTTP/3), fail2ban and unattended-upgrades.
|
|
75
76
|
3. Creates the user `deploy` in the docker group and disables ssh password login. Root keeps key-only access.
|
|
76
77
|
4. Writes `Host vps` to `~/.ssh/config`, creating the file if needed. `ssh vps` now logs in as `deploy`.
|
|
77
78
|
5. Starts Traefik, which gets Let's Encrypt certificates for every site.
|
|
@@ -101,13 +102,16 @@ first and prints what is done (`✓`), what it will do (`→`) and what it refus
|
|
|
101
102
|
| step | skipped when |
|
|
102
103
|
|---|---|
|
|
103
104
|
| firewall | ufw is off and enabling it would block a public port that something listens on (Postgres on 5432, WireGuard on 51820/udp, …). Docker-published ports stay reachable because Docker's NAT bypasses ufw. If Docker uses nftables or has no IPv6 NAT, they would be blocked, so setup skips the firewall. |
|
|
104
|
-
| ssh hardening | other users still log in with a password |
|
|
105
|
+
| ssh hardening | other users still log in with a password. Afterwards setup checks the effective config with `sshd -T`, so a drop-in that turns passwords back on is reported. |
|
|
105
106
|
| traefik | 80/443 are held by something that is not Traefik, or by a `traefik` that landfall didn't create. If it is your own Traefik, setup offers `lf traefik use` instead. |
|
|
106
107
|
|
|
107
108
|
Docker that is installed but stopped gets started. A missing compose, or the old v1 `docker-compose`, is replaced
|
|
108
109
|
with the newest release. An existing Docker is never reinstalled. In a terminal, setup asks about each conflict
|
|
109
110
|
(the default is no). `-y` never accepts a conflict. Only `--force` does. Existing sites are never touched.
|
|
110
111
|
|
|
112
|
+
Running setup again is safe. If root's key login is gone after hardening, setup logs in as the sudo user it
|
|
113
|
+
remembered from the first run (`--dashboard-user` and `--email` are checked before anything changes).
|
|
114
|
+
|
|
111
115
|
### Setup flags
|
|
112
116
|
|
|
113
117
|
| flag | effect |
|
|
@@ -157,7 +161,9 @@ The first deploy writes `.landfall.json`. Commit it:
|
|
|
157
161
|
```
|
|
158
162
|
|
|
159
163
|
Local `.env*` files are never used on the server: each site has its own `.env` there. Pass variables with
|
|
160
|
-
`-e`/`--env-file`, or later with `lf env`. `--
|
|
164
|
+
`-e`/`--env-file`, or later with `lf env`. `--env-file -` reads the lines from stdin, so secrets stay out of `ps`.
|
|
165
|
+
`--keep 10` keeps more releases. A deploy is refused when another Compose project on the server already uses the
|
|
166
|
+
site's project name, since `docker compose` would otherwise take over its containers.
|
|
161
167
|
|
|
162
168
|
### Compose sites
|
|
163
169
|
|
|
@@ -206,7 +212,7 @@ volumes:
|
|
|
206
212
|
- Variables in `compose.yaml` come from the site's `.env` on the server (`-e`, `--env-file`, `lf env`).
|
|
207
213
|
`${VAR:?}` makes a missing one fail the deploy before anything changes.
|
|
208
214
|
- Your own `traefik.*` labels win: a service with its own router keeps them and landfall adds only the network.
|
|
209
|
-
- `-f other.yaml` deploys another file; it is saved in `.landfall.json`. Sites need Docker Compose 2.24 or newer
|
|
215
|
+
- `-f other.yaml` deploys another file from the project folder; it is saved in `.landfall.json`. Sites need Docker Compose 2.24 or newer
|
|
210
216
|
on the server (`lf update --compose`).
|
|
211
217
|
|
|
212
218
|
The static, Dockerfile and image kinds are Compose sites too: landfall writes their `compose.yaml` for you.
|
|
@@ -257,12 +263,13 @@ lf logs -f # follow logs (-n 500 for more lines)
|
|
|
257
263
|
lf logs blog db # one service
|
|
258
264
|
lf rollback # previous release (--to <id> for a specific one)
|
|
259
265
|
lf env API_KEY=abc # set env (container is recreated); -u KEY removes one
|
|
266
|
+
lf env --env-file - < .env.prod # the same from a file or stdin, values never in ps
|
|
260
267
|
lf restart | stop | start
|
|
261
268
|
lf domains # where DNS points, whether HTTPS answers
|
|
262
269
|
lf domains --add www.example.com # also --rm, --set (updates .landfall.json)
|
|
263
270
|
lf domains --rm @ # take the main domain off; the last one leaves the site running, unrouted
|
|
264
271
|
lf auth -u anna # login in front of the site (asks for the password, -p passes it)
|
|
265
|
-
lf auth -
|
|
272
|
+
lf auth --password-stdin < pw.txt # the same for user admin, password from stdin
|
|
266
273
|
lf auth --rm-user anna | --off
|
|
267
274
|
lf open
|
|
268
275
|
lf tunnel blog # http://localhost:<port> straight to its container: test it without a domain
|
|
@@ -282,14 +289,14 @@ back. Domain and login changes are journaled, so `lf undo` reverts them.
|
|
|
282
289
|
```sh
|
|
283
290
|
lf updates # packages (security marked, reboot needed), images, Docker/compose versions
|
|
284
291
|
lf update # upgrade packages and pull newer images (asks first)
|
|
285
|
-
lf update --
|
|
292
|
+
lf update --security # only security updates (apt, dnf/yum); images stay
|
|
286
293
|
lf update --packages --reboot # reboot afterwards if needed
|
|
287
294
|
lf update --images # Traefik and image sites: pull, recreate
|
|
288
295
|
lf update blog --images # one site
|
|
289
296
|
lf update --compose # newest compose, where landfall installed it
|
|
290
297
|
```
|
|
291
298
|
|
|
292
|
-
Package upgrades (apt-get, dnf/yum, apk) cannot be undone. Image and compose updates record the previous version,
|
|
299
|
+
Package upgrades (apt-get, dnf/yum, apk, zypper) cannot be undone. `--security` and `--reboot` imply `--packages`. Image and compose updates record the previous version,
|
|
293
300
|
so `lf undo` restores it. landfall never touches images pinned by digest, Dockerfile sites or foreign containers.
|
|
294
301
|
Version-pinned tags show the newest tag of the same shape (`traefik:v3.6` → `traefik:v3.7`).
|
|
295
302
|
|
|
@@ -314,8 +321,8 @@ publishes 80/443 to it. Sites work the same in both modes:
|
|
|
314
321
|
| ufw | Docker's NAT bypasses ufw for 80/443 | ufw applies |
|
|
315
322
|
|
|
316
323
|
HTTP/3 (QUIC) is on by default: Traefik also listens on 443/udp, and browsers switch to it after their first
|
|
317
|
-
HTTP/2 request. Setup's firewall opens 443/udp; with `--host-network` on a server whose ufw is
|
|
318
|
-
`lf traefik setup`
|
|
324
|
+
HTTP/2 request. Setup's firewall opens 443/udp (only with HTTP/3 on); with `--host-network` on a server whose ufw is active,
|
|
325
|
+
`lf traefik setup` opens 80/tcp, 443/tcp and 443/udp. `--no-http3` turns it off (remembered). In the web UI (`lf ui`)
|
|
319
326
|
these options are in a server's settings under Traefik → Settings….
|
|
320
327
|
|
|
321
328
|
Traefik only answers hosts it has a certificate for (`sniStrict`). A domain pointed at the server but served
|
|
@@ -325,11 +332,18 @@ for the seconds until Let's Encrypt issues its certificate. Your own certificate
|
|
|
325
332
|
`/opt/landfall/traefik/dynamic/`: landfall rewrites only `landfall.yml` there. If you edit
|
|
326
333
|
`docker-compose.yml` by hand, `lf traefik setup` shows the diff and stops; `--force` overwrites your edits.
|
|
327
334
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
335
|
+
**Traefik's dashboard.** `lf traefik dashboard` always reaches it through an SSH tunnel: Traefik serves it on
|
|
336
|
+
port 8080 to the server itself only (loopback and the `web` network's gateway), never published. A Traefik set
|
|
337
|
+
up before this needs `lf traefik setup` once. `--dashboard <domain>` also serves it on a domain behind a login;
|
|
338
|
+
the password is generated and printed once (`--dashboard-password` sets your own, `--dashboard-user` the user,
|
|
339
|
+
default `admin`).
|
|
340
|
+
|
|
341
|
+
With your own Traefik, `lf traefik dashboard` tunnels to the entrypoint of the router that serves the dashboard
|
|
342
|
+
on a domain and sends that domain along (TLS name and Host), so its login still applies. Without such a router,
|
|
343
|
+
`--port 8080` tunnels to its API port (api.insecure).
|
|
344
|
+
|
|
345
|
+
Image, network mode, HTTP/3, e-mail, staging and dashboard are remembered per server, so re-running
|
|
346
|
+
`lf traefik setup` keeps them.
|
|
333
347
|
|
|
334
348
|
**Using a Traefik you already run.** If 80/443 belong to your own Traefik container, landfall does not install a second one:
|
|
335
349
|
|
|
@@ -339,7 +353,7 @@ lf traefik use proxy-traefik-1 -s vps # or name it
|
|
|
339
353
|
```
|
|
340
354
|
|
|
341
355
|
Containers you run yourself behind that Traefik (compose projects with `traefik.http.routers.*.rule` labels)
|
|
342
|
-
show up in `lf ls` and the
|
|
356
|
+
show up in `lf ls` and the web UI as "not deployed by landfall", with their domains and folder. landfall
|
|
343
357
|
never touches them; deploying one of their domains warns, since Traefik would send visitors to only one.
|
|
344
358
|
`lf adopt <project>` turns one into a site (see [Running without landfall](#running-without-landfall)).
|
|
345
359
|
|
|
@@ -366,7 +380,8 @@ lf firewall enable | disable # enable installs ufw if needed and all
|
|
|
366
380
|
- Changes run as root or with sudo. If the user has neither (like `deploy`), landfall uses root's key login.
|
|
367
381
|
- A change that would block the ssh port, or `enable` while ports in use have no rule, is refused. `--force` overrides.
|
|
368
382
|
- Docker-published ports bypass ufw, so a deny rule doesn't close them. Bind them to `127.0.0.1` in their compose file instead.
|
|
369
|
-
- `update` replaces the rule. If ufw rejects the new rule,
|
|
383
|
+
- `update` replaces the rule in the same place, since ufw stops at the first match. If ufw rejects the new rule,
|
|
384
|
+
the old one is put back. `rm` and its undo also keep the rule's position.
|
|
370
385
|
|
|
371
386
|
## History and undo
|
|
372
387
|
|
|
@@ -386,8 +401,11 @@ lf undo --all # everything, newest first
|
|
|
386
401
|
compose updates.
|
|
387
402
|
- **Not undoable:** `sites rm`, restarts, package upgrades, and a firewall rule that replaced an existing one.
|
|
388
403
|
- Steps revert newest first, each as the user that made it. The first failure stops the rest.
|
|
404
|
+
- Undoing an older run is refused while a later run still changed the same site, Traefik or file: undo the
|
|
405
|
+
later one first, or pass `--force`.
|
|
389
406
|
- Undo changes the server only. Local `~/.config/landfall` and `.landfall.json` stay as they are.
|
|
390
407
|
- Overwritten files are backed up as `.<name>.landfall-<run>-<n>`, and the newest 10 are kept per file.
|
|
408
|
+
- Two undos at once on the same server wait for each other, and a step already undone is skipped.
|
|
391
409
|
|
|
392
410
|
## Managing servers
|
|
393
411
|
|
|
@@ -408,24 +426,52 @@ lf ssh vps -- docker ps
|
|
|
408
426
|
only steps in when the key does not work. It then puts the working `IdentityFile` first, drops lines whose file is
|
|
409
427
|
gone, and keeps a backup as `~/.ssh/config.landfall-bak`.
|
|
410
428
|
|
|
411
|
-
##
|
|
429
|
+
## Web UI
|
|
430
|
+
|
|
431
|
+
```sh
|
|
432
|
+
lf ui # starts on 127.0.0.1:4777 and opens your browser
|
|
433
|
+
lf ui --no-open # only print the login link
|
|
434
|
+
```
|
|
412
435
|
|
|
413
|
-
The web
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
436
|
+
The web UI is a front end for the CLI. Every action runs a plain `lf` command as a subprocess, streams its
|
|
437
|
+
output into a side panel and shows the command (`$ lf rollback blog -s vps --to 20260122143005 -y`), so
|
|
438
|
+
anything you do there you can repeat in a terminal or a script. Runs started there are journaled like any
|
|
439
|
+
other and show up in `lf history`. The pages read the same data the `--json` commands print:
|
|
440
|
+
|
|
441
|
+
| page | commands |
|
|
442
|
+
|---|---|
|
|
443
|
+
| Sites | `lf ls`, `sites info`, `deploy`, `rollback`, `logs`, `restart`/`stop`/`start`, `env`, `domains`, `auth`, `tunnel`, `sites rm` |
|
|
444
|
+
| Updates | `lf updates`, `lf update` |
|
|
445
|
+
| Firewall | `lf firewall` and its subcommands |
|
|
446
|
+
| History | `lf history`, `lf undo` |
|
|
447
|
+
| Settings | `lf server config`, `server domain`, `traefik setup` (Settings…, Dashboard…), `traefik dashboard` |
|
|
448
|
+
|
|
449
|
+
Servers are on the left (★ marks the default). **Deploy folder…** browses local folders, or takes a dropped
|
|
450
|
+
folder or `.zip` (up to 512 MiB; archives with symlinks or hard links are refused). Destructive actions ask first.
|
|
451
|
+
|
|
452
|
+
- **Login:** through the printed `/login?t=…` link. The token is kept in `~/.config/landfall/ui-token`; delete
|
|
453
|
+
that file to rotate it.
|
|
454
|
+
- **Local only:** it listens on `127.0.0.1` and refuses requests with a foreign `Host` or `Origin`.
|
|
455
|
+
- Running `lf ui` again while it runs just opens the page. If another program has port 4777, it takes the next
|
|
456
|
+
free one (an explicit `--port` fails instead).
|
|
457
|
+
- **Limits:** at most 20 commands run at once. Passwords and env values are handed to the `lf` subprocess
|
|
458
|
+
through env vars and stdin, never on its command line.
|
|
459
|
+
- **No screen scraping:** commands report results the UI needs (deploy URL, tunnel address, setup checks, a
|
|
460
|
+
refusal that `--force` would override) on a separate channel, so the UI never parses CLI text.
|
|
419
461
|
|
|
420
462
|
## Using landfall from scripts and agents
|
|
421
463
|
|
|
422
|
-
|
|
464
|
+
Everything is a plain command; the web UI only runs those and prints each one (`$ lf logs blog -s vps -f`).
|
|
423
465
|
|
|
424
466
|
- **No prompts:** `-y` accepts confirmations and takes defaults. Without a terminal, prompts are never shown. A
|
|
425
467
|
command that would ask then **fails** and tells you to pass `-y`. It never silently goes ahead.
|
|
426
|
-
- **Passwords:** pass them with `--password-stdin` or `$LANDFALL_PASSWORD` (`setup`, `server add`)
|
|
427
|
-
|
|
428
|
-
`
|
|
468
|
+
- **Passwords:** pass them with `--password-stdin` or `$LANDFALL_PASSWORD` (`setup`, `server add`), and
|
|
469
|
+
`lf auth --password-stdin`. Any `--…password` option also falls back to `$LANDFALL_SECRET_<NAME>`, e.g.
|
|
470
|
+
`LANDFALL_SECRET_DASHBOARD_PASSWORD`.
|
|
471
|
+
Env values: `lf env --env-file -` / `lf deploy --env-file -` read them from stdin.
|
|
472
|
+
- **JSON output:** `--json` works on `ls`, `info`, `server list`, `server config`, `server domain`, `domains`,
|
|
473
|
+
`firewall`, `updates` and `history`. The web UI reads the very same JSON. `ls --json --others` gives the full
|
|
474
|
+
overview; `domains --json` lists the server's addresses under `ips`.
|
|
429
475
|
- **Dry runs:** `lf setup <name> --check` changes nothing. `lf updates` only reports.
|
|
430
476
|
- **Exit codes:** `0` means success, `1` means error (the message starts with `error:` on stderr), and `2` means unknown command.
|
|
431
477
|
- **Safety rails:** `-y` never overrides a safety refusal, for example a firewall change that would lock out ssh, or
|
|
@@ -454,7 +500,7 @@ lf undo -s box -y # revert the last run
|
|
|
454
500
|
| `lf setup <name> --check` | Reports what is set up and what setup would change. Changes nothing. |
|
|
455
501
|
| `lf setup <name> --key-only` | Only installs landfall's ssh key. |
|
|
456
502
|
| `lf server add <name> [--host ip] [-u user] [-p port] [-i key] [--password-stdin] [--domain d] [--default]` | Registers a server without installing anything on it. Writes `Host <name>` to `~/.ssh/config`. |
|
|
457
|
-
| `lf server list [--all]` | Lists registered servers. `--all` adds every ssh alias. Alias: `servers`. |
|
|
503
|
+
| `lf server list [--all] [--json]` | Lists registered servers. `--all` adds every ssh alias. Alias: `servers`. |
|
|
458
504
|
| `lf server info [name] [--json]` | Shows OS and release support, kernel, uptime, CPU, RAM, disk, addresses and containers. Alias: `info`. |
|
|
459
505
|
| `lf server config [name] [--json]` | Shows everything landfall and ssh use for a server. Does not connect. |
|
|
460
506
|
| `lf server domain [name] [domain...] [--add d] [--primary d] [--rm d] [--clear] [--json]` | Manages main domains (the first is primary) and checks their DNS. |
|
|
@@ -473,12 +519,13 @@ lf undo -s box -y # revert the last run
|
|
|
473
519
|
| `lf ls [--json] [--others]` | Lists sites on the server with their status, plus containers Traefik routes that landfall did not deploy (read only; `--json --others` gives `{sites, others}`). Alias: `sites list`. |
|
|
474
520
|
| `lf sites info [name]` | Shows services, domains and release history. |
|
|
475
521
|
| `lf domains [name] [--add d] [--rm d] [--set d] [--json]` | Lists domains with their DNS and HTTPS state, or changes them. Removing the last one leaves the site unrouted. |
|
|
476
|
-
| `lf auth [name] -u user [-p pw]` / `--rm-user u` / `--off` | Puts basic-auth login in front of a site. |
|
|
522
|
+
| `lf auth [name] -u user [-p pw \| --password-stdin]` / `--rm-user u` / `--off` | Puts basic-auth login in front of a site. |
|
|
477
523
|
| `lf open [name]` | Opens the site in the browser. |
|
|
478
524
|
| `lf logs [name] [service] [-f] [-n lines]` | Shows logs of all services, or one. |
|
|
479
|
-
| `lf env [name] [K=V...] [-u K]` | Shows or changes the site's `.env`. Recreates the services. |
|
|
525
|
+
| `lf env [name] [K=V...] [--env-file f\|-] [-u K]` | Shows or changes the site's `.env`. Recreates the services. |
|
|
480
526
|
| `lf rollback [name] [--to id]` | Switches to the previous release, or to the given one. |
|
|
481
527
|
| `lf restart` / `stop` / `start [name] [service]` | Restarts, stops or starts the site, or one service. |
|
|
528
|
+
| `lf tunnel [name] [service] [--port p] [-l local] [--lan]` | Opens a site, one of its services or any container on localhost through an SSH tunnel. |
|
|
482
529
|
| `lf sites rm <name> [--volumes]` | Deletes the site and its files. Named volumes stay unless `--volumes`. |
|
|
483
530
|
| `lf adopt <project> [--name n]` | Makes a Compose project you started yourself a site, so `ls`, logs, restart and rm work for it. |
|
|
484
531
|
|
|
@@ -489,6 +536,7 @@ lf undo -s box -y # revert the last run
|
|
|
489
536
|
| `lf traefik setup [--email e] [--dashboard host\|traefik\|off] [--staging] [--image img] [--host-network] [--no-http3] [--force]` | Installs or reconfigures landfall's Traefik. `--force` overwrites hand edits. |
|
|
490
537
|
| `lf traefik use [container] [--network n --entrypoint e --resolver r]` | Routes sites through a Traefik you already run. |
|
|
491
538
|
| `lf traefik rm [--certs]` | Removes landfall's Traefik (undoable), or stops using yours after `traefik use`. |
|
|
539
|
+
| `lf traefik dashboard [-l local] [--lan] [--port p]` | Opens Traefik's dashboard on localhost through an SSH tunnel. |
|
|
492
540
|
| `lf traefik status` / `logs [-f]` / `restart` | Inspects or restarts Traefik. `lf traefik` alone means `status`. |
|
|
493
541
|
| `lf firewall [--json]` | Lists ufw rules and, for each listening port, whether it is reachable. |
|
|
494
542
|
| `lf firewall allow` / `deny <port[/proto]> [--from ip] [--comment c]` | Adds a rule. A deny goes first, so it wins. |
|
|
@@ -497,22 +545,22 @@ lf undo -s box -y # revert the last run
|
|
|
497
545
|
| `lf updates [--no-refresh] [--all] [--json]` | Shows pending OS packages, newer images, and Docker/compose versions. Changes nothing. |
|
|
498
546
|
| `lf update [site...] [--packages] [--security] [--reboot] [--images] [--compose]` | Applies updates. Image and compose updates can be undone. |
|
|
499
547
|
| `lf history [-n 20] [--json]` | Lists what landfall changed on the server, run by run. Alias: `log`. |
|
|
500
|
-
| `lf undo [n \| n.m] [--all] [--force]` | Reverts the latest run, run `n`, step `n.m`, or everything. Alias: `revert`. |
|
|
548
|
+
| `lf undo [n \| n.m] [--all] [--force]` | Reverts the latest run, run `n`, step `n.m`, or everything. Refuses a run when a later one changed the same site or file, unless `--force`. Alias: `revert`. |
|
|
501
549
|
|
|
502
|
-
**
|
|
550
|
+
**Web UI**
|
|
503
551
|
|
|
504
552
|
| command | what it does |
|
|
505
553
|
|---|---|
|
|
506
|
-
| `lf ui [--port 4777] [--no-open]` | Starts the web
|
|
554
|
+
| `lf ui [--port 4777] [--no-open]` | Starts the web UI on 127.0.0.1 and prints a login link. Alias: `web`. |
|
|
507
555
|
|
|
508
556
|
## Files and config
|
|
509
557
|
|
|
510
558
|
| local file | content |
|
|
511
559
|
|---|---|
|
|
512
560
|
| `~/.config/landfall/config.json` | registered servers, default server, per-server settings |
|
|
513
|
-
| `~/.config/landfall/projects.json` | folders deployed from this machine (
|
|
514
|
-
| `~/.config/landfall/ui-token` | web
|
|
515
|
-
| `~/.config/landfall/uploads/` | folders dropped into the
|
|
561
|
+
| `~/.config/landfall/projects.json` | folders deployed from this machine (web UI *Recent*/*Redeploy*) |
|
|
562
|
+
| `~/.config/landfall/ui-token` | web UI login token |
|
|
563
|
+
| `~/.config/landfall/uploads/` | folders dropped into the web UI, removed after a day |
|
|
516
564
|
| `~/.ssh/landfall_<name>` | generated keys |
|
|
517
565
|
| `~/.ssh/config` | `Host <name>` blocks between `# >>> landfall:<name>` markers |
|
|
518
566
|
| `./.landfall.json` | per-project deploy settings |
|
|
@@ -522,12 +570,13 @@ lf undo -s box -y # revert the last run
|
|
|
522
570
|
| `LANDFALL_CONFIG_DIR` | use another directory than `~/.config/landfall` |
|
|
523
571
|
| `LANDFALL_SSH_CONFIG` | use another ssh config file (`ssh -F`) |
|
|
524
572
|
| `LANDFALL_PASSWORD` | login password for `setup`/`server add`/`deploy --host` |
|
|
573
|
+
| `LANDFALL_SECRET_<OPTION>` | value of a `--…password` option, e.g. `LANDFALL_SECRET_PASSWORD` for `lf auth` |
|
|
525
574
|
|
|
526
575
|
On the server:
|
|
527
576
|
|
|
528
577
|
```
|
|
529
578
|
/opt/landfall/
|
|
530
|
-
traefik/docker-compose.yml Traefik, ports 80/443, Let's Encrypt (HTTP-01)
|
|
579
|
+
traefik/docker-compose.yml Traefik, ports 80/443 (+443/udp for HTTP/3), Let's Encrypt (HTTP-01)
|
|
531
580
|
traefik/letsencrypt/acme.json
|
|
532
581
|
proxy.env only with `lf traefik use`
|
|
533
582
|
README how to run sites by hand
|