landfall 0.5.2 → 0.5.4
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 +17 -5
- package/dist/cli.mjs +132 -111
- package/dist/index.html +163 -17
- package/dist/server-Cj2NicZ7.mjs +9 -0
- package/package.json +1 -1
- package/dist/server-DA-e5nav.mjs +0 -9
package/README.md
CHANGED
|
@@ -245,6 +245,7 @@ lf domains blog --add @ # blog also serves example.com
|
|
|
245
245
|
lf server domain vps --add other.org # more main domains; the first stays primary
|
|
246
246
|
lf server domain vps --primary other.org # switch the primary
|
|
247
247
|
lf server domain vps --rm other.org # drop one; --clear drops all (back to sslip.io)
|
|
248
|
+
lf server domain vps --tunnel-only # new sites get no domain unless -d: reach them with lf tunnel (--no-tunnel-only undoes)
|
|
248
249
|
```
|
|
249
250
|
|
|
250
251
|
`server domain` prints the A records to add: one for the domain and a wildcard `*.example.com`. With those in
|
|
@@ -414,8 +415,9 @@ lf server add vps # register an existing s
|
|
|
414
415
|
lf server add box --host 198.51.100.4 -u ubuntu -i ~/.ssh/box --default
|
|
415
416
|
lf server add web --host 198.51.100.5 -u admin # asks the password once, installs ~/.ssh/landfall_web
|
|
416
417
|
lf server config vps # landfall entry, Traefik settings, ssh login, keys, Host block
|
|
417
|
-
lf server list --all
|
|
418
|
+
lf server list --all --check # which servers landfall can log in to right now
|
|
418
419
|
lf server use vps
|
|
420
|
+
lf config --tunnel-only --keep 3 # defaults for every server; also lists where landfall puts things
|
|
419
421
|
lf server rm vps # forget locally
|
|
420
422
|
lf server uninstall vps # remove landfall from the server (type the name back)
|
|
421
423
|
lf ssh vps -- docker ps
|
|
@@ -446,7 +448,11 @@ other and show up in `lf history`. The pages read the same data the `--json` com
|
|
|
446
448
|
| History | `lf history`, `lf undo` |
|
|
447
449
|
| Settings | `lf server config`, `server domain`, `traefik setup` (Settings…, Dashboard…), `traefik dashboard` |
|
|
448
450
|
|
|
449
|
-
Servers are on the left (★ marks the default).
|
|
451
|
+
Servers are on the left (★ marks the default). The dot next to each says whether landfall's key login works
|
|
452
|
+
(green), sshd refuses it (yellow) or ssh does not answer (red); hover for the reason. It checks on load, every
|
|
453
|
+
minute while the page is open, and on **Check** at the foot of the list (like `lf server list --check`).
|
|
454
|
+
Reachable servers come first; unreachable ones move to a closed **Unreachable** group. Git hosts from
|
|
455
|
+
`~/.ssh/config` are not listed. **Deploy folder…** browses local folders, or takes a dropped
|
|
450
456
|
folder or `.zip` (up to 512 MiB; archives with symlinks or hard links are refused). Destructive actions ask first.
|
|
451
457
|
|
|
452
458
|
- **Login:** through the printed `/login?t=…` link. The token is kept in `~/.config/landfall/ui-token`; delete
|
|
@@ -500,11 +506,12 @@ lf undo -s box -y # revert the last run
|
|
|
500
506
|
| `lf setup <name> --check` | Reports what is set up and what setup would change. Changes nothing. |
|
|
501
507
|
| `lf setup <name> --key-only` | Only installs landfall's ssh key. |
|
|
502
508
|
| `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`. |
|
|
503
|
-
| `lf server list [--all] [--json]` | Lists registered servers. `--all` adds every ssh alias. Alias: `servers`. |
|
|
509
|
+
| `lf server list [--all] [--check] [--json]` | Lists registered servers. `--all` adds every ssh alias except git hosts (github.com, `gitlab.*`, `User git` …). `--check` tries a key login to each: `ok`, `login` (sshd refuses the key) or `down`. Alias: `servers`. |
|
|
504
510
|
| `lf server info [name] [--json]` | Shows OS and release support, kernel, uptime, CPU, RAM, disk, addresses and containers. Alias: `info`. |
|
|
505
511
|
| `lf server config [name] [--json]` | Shows everything landfall and ssh use for a server. Does not connect. |
|
|
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. |
|
|
512
|
+
| `lf server domain [name] [domain...] [--add d] [--primary d] [--rm d] [--clear] [--tunnel-only] [--json]` | Manages main domains (the first is primary) and checks their DNS; `--tunnel-only` makes new sites deploy with no domain. |
|
|
507
513
|
| `lf server use <name>` | Sets the default server. |
|
|
514
|
+
| `lf config [--tunnel-only] [--email e] [--keep n] [--default name] [--unset key] [--json]` | Shows or changes landfall's defaults for every server, and lists every place landfall writes to. A server's own setting wins. |
|
|
508
515
|
| `lf server rm <name>` | Forgets a server locally. The server is untouched. |
|
|
509
516
|
| `lf server uninstall <name> [--volumes] [--keep-setup] [--force]` | Deletes landfall's sites, Traefik and `/opt/landfall`, reverts setup (deploy user, ssh hardening, firewall), and forgets the server. Docker, packages and root's landfall key stay; adopted sites keep running. Alias: `uninstall`. |
|
|
510
517
|
| `lf ssh [name] [-- cmd]` | Opens a shell or runs a one-off command. |
|
|
@@ -557,7 +564,7 @@ lf undo -s box -y # revert the last run
|
|
|
557
564
|
|
|
558
565
|
| local file | content |
|
|
559
566
|
|---|---|
|
|
560
|
-
| `~/.config/landfall/config.json` | registered servers, default server, per-server settings |
|
|
567
|
+
| `~/.config/landfall/config.json` | registered servers, default server, per-server settings, landfall defaults (`lf config`) |
|
|
561
568
|
| `~/.config/landfall/projects.json` | folders deployed from this machine (web UI *Recent*/*Redeploy*) |
|
|
562
569
|
| `~/.config/landfall/ui-token` | web UI login token |
|
|
563
570
|
| `~/.config/landfall/uploads/` | folders dropped into the web UI, removed after a day |
|
|
@@ -589,8 +596,13 @@ On the server:
|
|
|
589
596
|
.env -> ../../.env
|
|
590
597
|
current -> releases/<id>
|
|
591
598
|
journal.log every change, with the shell that reverts it
|
|
599
|
+
/etc/ssh/sshd_config.d/00-landfall.conf ssh hardening from `lf setup`
|
|
592
600
|
```
|
|
593
601
|
|
|
602
|
+
`lf setup` also installs Docker with the compose plugin, ufw, fail2ban and unattended-upgrades, and creates the
|
|
603
|
+
`deploy` user (group docker). Before changing a file, landfall keeps a backup next to it as
|
|
604
|
+
`.<file>.landfall-<run>` (the newest 10). `lf config` and the web UI's *Defaults* dialog list all of these places.
|
|
605
|
+
|
|
594
606
|
`cd -P /opt/landfall/sites/blog/current && docker compose ps` works as usual.
|
|
595
607
|
|
|
596
608
|
## Troubleshooting
|