@lamalibre/create-lamaste 4.0.0
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/LICENSE.md +118 -0
- package/README.md +114 -0
- package/bin/create-lamaste.js +15 -0
- package/package.json +54 -0
- package/scripts/bundle-vendor.js +110 -0
- package/scripts/lamaste-cert-info +62 -0
- package/scripts/lamaste-certbot +96 -0
- package/scripts/lamaste-priv +693 -0
- package/src/index.js +646 -0
- package/src/lib/accounts.js +86 -0
- package/src/lib/binaries.js +137 -0
- package/src/lib/cert-help-page.js +160 -0
- package/src/lib/env.js +132 -0
- package/src/lib/http-redirect.js +38 -0
- package/src/lib/ownership.js +231 -0
- package/src/lib/relay-services.js +103 -0
- package/src/lib/secrets.js +19 -0
- package/src/lib/service-config.js +311 -0
- package/src/lib/summary.js +131 -0
- package/src/lib/wrappers.js +63 -0
- package/src/tasks/gatekeeper.js +233 -0
- package/src/tasks/harden.js +293 -0
- package/src/tasks/mtls.js +193 -0
- package/src/tasks/nginx.js +265 -0
- package/src/tasks/node.js +110 -0
- package/src/tasks/panel.js +408 -0
- package/src/tasks/redeploy.js +438 -0
- package/vendor/docs/00-introduction/how-it-works.md +447 -0
- package/vendor/docs/00-introduction/quickstart.md +472 -0
- package/vendor/docs/00-introduction/what-is-lamaste.md +112 -0
- package/vendor/docs/01-concepts/authentication.md +464 -0
- package/vendor/docs/01-concepts/authorization.md +242 -0
- package/vendor/docs/01-concepts/certificates.md +452 -0
- package/vendor/docs/01-concepts/dns-and-domains.md +343 -0
- package/vendor/docs/01-concepts/mtls.md +490 -0
- package/vendor/docs/01-concepts/nginx-reverse-proxy.md +540 -0
- package/vendor/docs/01-concepts/security-model.md +600 -0
- package/vendor/docs/01-concepts/tickets.md +414 -0
- package/vendor/docs/01-concepts/tunneling.md +367 -0
- package/vendor/docs/02-guides/agent-setup.md +194 -0
- package/vendor/docs/02-guides/certificate-management.md +341 -0
- package/vendor/docs/02-guides/cloud-provisioning.md +406 -0
- package/vendor/docs/02-guides/desktop-app-setup.md +226 -0
- package/vendor/docs/02-guides/disaster-recovery.md +464 -0
- package/vendor/docs/02-guides/first-tunnel.md +230 -0
- package/vendor/docs/02-guides/installation.md +393 -0
- package/vendor/docs/02-guides/managing-users.md +255 -0
- package/vendor/docs/02-guides/onboarding.md +244 -0
- package/vendor/docs/02-guides/standalone-plugin-with-tickets.md +375 -0
- package/vendor/docs/02-guides/static-sites.md +364 -0
- package/vendor/docs/03-architecture/e2e-three-vm-sequences.md +457 -0
- package/vendor/docs/03-architecture/installer-flow.md +151 -0
- package/vendor/docs/03-architecture/installer.md +445 -0
- package/vendor/docs/03-architecture/management-flow.md +288 -0
- package/vendor/docs/03-architecture/nginx-configuration.md +830 -0
- package/vendor/docs/03-architecture/onboarding-flow.md +164 -0
- package/vendor/docs/03-architecture/overview.md +541 -0
- package/vendor/docs/03-architecture/panel-client.md +416 -0
- package/vendor/docs/03-architecture/panel-server.md +695 -0
- package/vendor/docs/03-architecture/state-management.md +529 -0
- package/vendor/docs/03-architecture/system-overview.md +167 -0
- package/vendor/docs/04-api-reference/certificates.md +1141 -0
- package/vendor/docs/04-api-reference/gatekeeper.md +592 -0
- package/vendor/docs/04-api-reference/onboarding.md +473 -0
- package/vendor/docs/04-api-reference/overview.md +404 -0
- package/vendor/docs/04-api-reference/services.md +267 -0
- package/vendor/docs/04-api-reference/settings.md +343 -0
- package/vendor/docs/04-api-reference/sites.md +716 -0
- package/vendor/docs/04-api-reference/system.md +268 -0
- package/vendor/docs/04-api-reference/tickets.md +618 -0
- package/vendor/docs/04-api-reference/tunnels.md +417 -0
- package/vendor/docs/04-api-reference/users.md +333 -0
- package/vendor/docs/05-operations/backup-and-restore.md +342 -0
- package/vendor/docs/05-operations/monitoring.md +285 -0
- package/vendor/docs/05-operations/uninstalling.md +344 -0
- package/vendor/docs/05-operations/upgrades.md +270 -0
- package/vendor/docs/06-reference/config-files.md +1080 -0
- package/vendor/docs/06-reference/glossary.md +528 -0
- package/vendor/docs/06-reference/installer-flags.md +260 -0
- package/vendor/docs/06-reference/ports-and-services.md +244 -0
- package/vendor/docs/06-reference/troubleshooting.md +665 -0
- package/vendor/docs/_index.json +233 -0
- package/vendor/docs/gatekeeper-design.md +953 -0
- package/vendor/docs/package.json +15 -0
- package/vendor/docs/todo/lib-cli-desktop-refactor.md +641 -0
- package/vendor/gatekeeper/dist/boot.d.ts +1 -0
- package/vendor/gatekeeper/dist/boot.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/boot.js +17 -0
- package/vendor/gatekeeper/dist/boot.js.map +1 -0
- package/vendor/gatekeeper/dist/cli/commands/access.d.ts +2 -0
- package/vendor/gatekeeper/dist/cli/commands/access.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/cli/commands/access.js +33 -0
- package/vendor/gatekeeper/dist/cli/commands/access.js.map +1 -0
- package/vendor/gatekeeper/dist/cli/commands/grants.d.ts +2 -0
- package/vendor/gatekeeper/dist/cli/commands/grants.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/cli/commands/grants.js +110 -0
- package/vendor/gatekeeper/dist/cli/commands/grants.js.map +1 -0
- package/vendor/gatekeeper/dist/cli/commands/groups.d.ts +2 -0
- package/vendor/gatekeeper/dist/cli/commands/groups.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/cli/commands/groups.js +98 -0
- package/vendor/gatekeeper/dist/cli/commands/groups.js.map +1 -0
- package/vendor/gatekeeper/dist/cli/index.d.ts +3 -0
- package/vendor/gatekeeper/dist/cli/index.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/cli/index.js +45 -0
- package/vendor/gatekeeper/dist/cli/index.js.map +1 -0
- package/vendor/gatekeeper/dist/index.d.ts +9 -0
- package/vendor/gatekeeper/dist/index.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/index.js +13 -0
- package/vendor/gatekeeper/dist/index.js.map +1 -0
- package/vendor/gatekeeper/dist/lib/authz.d.ts +16 -0
- package/vendor/gatekeeper/dist/lib/authz.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/lib/authz.js +42 -0
- package/vendor/gatekeeper/dist/lib/authz.js.map +1 -0
- package/vendor/gatekeeper/dist/lib/cache-bust.d.ts +15 -0
- package/vendor/gatekeeper/dist/lib/cache-bust.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/lib/cache-bust.js +19 -0
- package/vendor/gatekeeper/dist/lib/cache-bust.js.map +1 -0
- package/vendor/gatekeeper/dist/lib/constants.d.ts +82 -0
- package/vendor/gatekeeper/dist/lib/constants.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/lib/constants.js +79 -0
- package/vendor/gatekeeper/dist/lib/constants.js.map +1 -0
- package/vendor/gatekeeper/dist/lib/grants.d.ts +32 -0
- package/vendor/gatekeeper/dist/lib/grants.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/lib/grants.js +314 -0
- package/vendor/gatekeeper/dist/lib/grants.js.map +1 -0
- package/vendor/gatekeeper/dist/lib/groups.d.ts +10 -0
- package/vendor/gatekeeper/dist/lib/groups.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/lib/groups.js +247 -0
- package/vendor/gatekeeper/dist/lib/groups.js.map +1 -0
- package/vendor/gatekeeper/dist/lib/migration.d.ts +17 -0
- package/vendor/gatekeeper/dist/lib/migration.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/lib/migration.js +79 -0
- package/vendor/gatekeeper/dist/lib/migration.js.map +1 -0
- package/vendor/gatekeeper/dist/lib/migrations/gatekeeper/0001_groups.sql +7 -0
- package/vendor/gatekeeper/dist/lib/migrations/gatekeeper/0002_access_grants.sql +14 -0
- package/vendor/gatekeeper/dist/lib/migrations/gatekeeper/0003_access_request_log.sql +9 -0
- package/vendor/gatekeeper/dist/lib/migrations/migrations/gatekeeper/0001_groups.sql +7 -0
- package/vendor/gatekeeper/dist/lib/migrations/migrations/gatekeeper/0002_access_grants.sql +14 -0
- package/vendor/gatekeeper/dist/lib/migrations/migrations/gatekeeper/0003_access_request_log.sql +9 -0
- package/vendor/gatekeeper/dist/lib/state-db.d.ts +16 -0
- package/vendor/gatekeeper/dist/lib/state-db.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/lib/state-db.js +154 -0
- package/vendor/gatekeeper/dist/lib/state-db.js.map +1 -0
- package/vendor/gatekeeper/dist/lib/templates.d.ts +21 -0
- package/vendor/gatekeeper/dist/lib/templates.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/lib/templates.js +151 -0
- package/vendor/gatekeeper/dist/lib/templates.js.map +1 -0
- package/vendor/gatekeeper/dist/lib/types.d.ts +178 -0
- package/vendor/gatekeeper/dist/lib/types.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/lib/types.js +2 -0
- package/vendor/gatekeeper/dist/lib/types.js.map +1 -0
- package/vendor/gatekeeper/dist/server/index.d.ts +15 -0
- package/vendor/gatekeeper/dist/server/index.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/server/index.js +251 -0
- package/vendor/gatekeeper/dist/server/index.js.map +1 -0
- package/vendor/gatekeeper/dist/server/routes/access-request.d.ts +7 -0
- package/vendor/gatekeeper/dist/server/routes/access-request.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/server/routes/access-request.js +17 -0
- package/vendor/gatekeeper/dist/server/routes/access-request.js.map +1 -0
- package/vendor/gatekeeper/dist/server/routes/authz.d.ts +3 -0
- package/vendor/gatekeeper/dist/server/routes/authz.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/server/routes/authz.js +279 -0
- package/vendor/gatekeeper/dist/server/routes/authz.js.map +1 -0
- package/vendor/gatekeeper/dist/server/routes/diagnostic.d.ts +13 -0
- package/vendor/gatekeeper/dist/server/routes/diagnostic.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/server/routes/diagnostic.js +249 -0
- package/vendor/gatekeeper/dist/server/routes/diagnostic.js.map +1 -0
- package/vendor/gatekeeper/dist/server/routes/grants.d.ts +3 -0
- package/vendor/gatekeeper/dist/server/routes/grants.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/server/routes/grants.js +112 -0
- package/vendor/gatekeeper/dist/server/routes/grants.js.map +1 -0
- package/vendor/gatekeeper/dist/server/routes/groups.d.ts +3 -0
- package/vendor/gatekeeper/dist/server/routes/groups.d.ts.map +1 -0
- package/vendor/gatekeeper/dist/server/routes/groups.js +139 -0
- package/vendor/gatekeeper/dist/server/routes/groups.js.map +1 -0
- package/vendor/gatekeeper/package.json +49 -0
- package/vendor/server/bin/lamaste-server.js +204 -0
- package/vendor/server/package.json +31 -0
- package/vendor/server/src/commands/certs.js +224 -0
- package/vendor/server/src/commands/chisel.js +132 -0
- package/vendor/server/src/commands/logs.js +49 -0
- package/vendor/server/src/commands/plugins.js +321 -0
- package/vendor/server/src/commands/reset-admin.js +478 -0
- package/vendor/server/src/commands/restart.js +94 -0
- package/vendor/server/src/commands/sites.js +257 -0
- package/vendor/server/src/commands/status.js +158 -0
- package/vendor/server/src/commands/tunnels.js +365 -0
- package/vendor/server/src/commands/uninstall.js +326 -0
- package/vendor/server/src/config.js +38 -0
- package/vendor/server/src/exec.js +26 -0
- package/vendor/server/src/logger.js +39 -0
- package/vendor/server/src/ndjson.js +56 -0
- package/vendor/server/src/panel-api.js +85 -0
- package/vendor/server/src/state.js +45 -0
- package/vendor/server-ui/dist/assets/index-B0nWuUyL.js +257 -0
- package/vendor/server-ui/dist/assets/index-BqWWFlTU.css +1 -0
- package/vendor/server-ui/dist/index.html +13 -0
- package/vendor/serverd/package.json +44 -0
- package/vendor/serverd/src/boot.js +13 -0
- package/vendor/serverd/src/index.js +191 -0
- package/vendor/serverd/src/lib/app-error.js +14 -0
- package/vendor/serverd/src/lib/authelia.js +85 -0
- package/vendor/serverd/src/lib/certbot.js +74 -0
- package/vendor/serverd/src/lib/chisel-args.js +6 -0
- package/vendor/serverd/src/lib/chisel-reconcile.js +232 -0
- package/vendor/serverd/src/lib/chisel-runtime.js +46 -0
- package/vendor/serverd/src/lib/chisel-users.js +109 -0
- package/vendor/serverd/src/lib/chisel.js +81 -0
- package/vendor/serverd/src/lib/config.js +190 -0
- package/vendor/serverd/src/lib/constants.js +8 -0
- package/vendor/serverd/src/lib/csr-signing.js +331 -0
- package/vendor/serverd/src/lib/enrollment.js +302 -0
- package/vendor/serverd/src/lib/files.js +19 -0
- package/vendor/serverd/src/lib/gatekeeper-client.js +135 -0
- package/vendor/serverd/src/lib/invite-page.js +281 -0
- package/vendor/serverd/src/lib/ip-utils.js +79 -0
- package/vendor/serverd/src/lib/migrations/state/0001_enrollment_tokens.sql +17 -0
- package/vendor/serverd/src/lib/migrations/state/0002_tickets.sql +70 -0
- package/vendor/serverd/src/lib/migrations/state/0003_plugins.sql +15 -0
- package/vendor/serverd/src/lib/migrations/state/0004_agents.sql +19 -0
- package/vendor/serverd/src/lib/mtls.js +795 -0
- package/vendor/serverd/src/lib/nginx.js +1090 -0
- package/vendor/serverd/src/lib/pki-paths.js +41 -0
- package/vendor/serverd/src/lib/pki-sign.js +103 -0
- package/vendor/serverd/src/lib/plugins.js +538 -0
- package/vendor/serverd/src/lib/push-install.js +390 -0
- package/vendor/serverd/src/lib/revocation.js +112 -0
- package/vendor/serverd/src/lib/services.js +131 -0
- package/vendor/serverd/src/lib/session.js +151 -0
- package/vendor/serverd/src/lib/state-db.js +130 -0
- package/vendor/serverd/src/lib/state.js +140 -0
- package/vendor/serverd/src/lib/storage.js +63 -0
- package/vendor/serverd/src/lib/system-stats.js +58 -0
- package/vendor/serverd/src/lib/tickets.js +1556 -0
- package/vendor/serverd/src/lib/totp.js +76 -0
- package/vendor/serverd/src/lib/tunnel-deps.js +41 -0
- package/vendor/serverd/src/lib/user-access-session.js +142 -0
- package/vendor/serverd/src/lib/user-access.js +52 -0
- package/vendor/serverd/src/middleware/errors.js +63 -0
- package/vendor/serverd/src/middleware/mtls.js +120 -0
- package/vendor/serverd/src/middleware/onboarding-guard.js +30 -0
- package/vendor/serverd/src/middleware/role-guard.js +58 -0
- package/vendor/serverd/src/middleware/twofa-session.js +65 -0
- package/vendor/serverd/src/middleware/user-access-session.js +52 -0
- package/vendor/serverd/src/routes/enrollment.js +120 -0
- package/vendor/serverd/src/routes/health.js +22 -0
- package/vendor/serverd/src/routes/invite.js +163 -0
- package/vendor/serverd/src/routes/management/agents.js +182 -0
- package/vendor/serverd/src/routes/management/certs.js +911 -0
- package/vendor/serverd/src/routes/management/gatekeeper-proxy.js +160 -0
- package/vendor/serverd/src/routes/management/identity.js +107 -0
- package/vendor/serverd/src/routes/management/invitations.js +166 -0
- package/vendor/serverd/src/routes/management/logs.js +218 -0
- package/vendor/serverd/src/routes/management/plugins.js +560 -0
- package/vendor/serverd/src/routes/management/services.js +63 -0
- package/vendor/serverd/src/routes/management/settings.js +325 -0
- package/vendor/serverd/src/routes/management/sites.js +522 -0
- package/vendor/serverd/src/routes/management/storage.js +192 -0
- package/vendor/serverd/src/routes/management/system.js +201 -0
- package/vendor/serverd/src/routes/management/tickets.js +457 -0
- package/vendor/serverd/src/routes/management/tunnels.js +709 -0
- package/vendor/serverd/src/routes/management/users.js +377 -0
- package/vendor/serverd/src/routes/management.js +36 -0
- package/vendor/serverd/src/routes/onboarding/dns.js +101 -0
- package/vendor/serverd/src/routes/onboarding/domain.js +42 -0
- package/vendor/serverd/src/routes/onboarding/index.js +18 -0
- package/vendor/serverd/src/routes/onboarding/provision.js +327 -0
- package/vendor/serverd/src/routes/onboarding/status.js +12 -0
- package/vendor/serverd/src/routes/plugin-router.js +79 -0
- package/vendor/serverd/src/routes/user-access.js +389 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
# Installer Flags
|
|
2
|
+
|
|
3
|
+
> CLI flags, environment variables, and exit codes for `npx @lamalibre/create-lamaste@4.0.0`.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx @lamalibre/create-lamaste@4.0.0 [flags]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The installer runs as root on a fresh Ubuntu 24.04 server. It is completely non-interactive by default — all configuration happens later through the browser-based onboarding wizard.
|
|
12
|
+
|
|
13
|
+
## Flags
|
|
14
|
+
|
|
15
|
+
| Flag | Short | Description |
|
|
16
|
+
| --------------- | ----- | ----------------------------------------------- |
|
|
17
|
+
| `--help` | `-h` | Print help message and exit |
|
|
18
|
+
| `--yes` | `-y` | Skip the confirmation prompt |
|
|
19
|
+
| `--skip-harden` | | Skip OS hardening (swap, UFW, fail2ban, SSH) |
|
|
20
|
+
| `--dev` | | Allow private/non-routable IP addresses |
|
|
21
|
+
| `--force-full` | | Run full installation even on existing installs |
|
|
22
|
+
| `--uninstall` | | Print manual removal guide and exit |
|
|
23
|
+
|
|
24
|
+
### `--help`, `-h`
|
|
25
|
+
|
|
26
|
+
Prints a description of what the installer does, lists all flags, and exits with code 0. Does not modify anything on the system.
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx @lamalibre/create-lamaste@4.0.0 --help
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### `--yes`, `-y`
|
|
33
|
+
|
|
34
|
+
Skips the interactive confirmation prompt that appears before installation begins. Useful for automated deployments or scripts where you cannot press Enter.
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx @lamalibre/create-lamaste@4.0.0 --yes
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Without this flag, the installer displays a banner listing all changes it will make and waits for the user to press Enter or Ctrl+C.
|
|
41
|
+
|
|
42
|
+
### `--skip-harden`
|
|
43
|
+
|
|
44
|
+
Skips all OS hardening tasks:
|
|
45
|
+
|
|
46
|
+
- Swap file creation (1 GB)
|
|
47
|
+
- UFW firewall configuration (ports 22, 443, 9292)
|
|
48
|
+
- fail2ban installation and configuration
|
|
49
|
+
- SSH hardening (disabling password authentication)
|
|
50
|
+
|
|
51
|
+
Everything else (Node.js, nginx, mTLS, panel deployment) still runs.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx @lamalibre/create-lamaste@4.0.0 --skip-harden
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Use this if you manage your own firewall rules, already have fail2ban configured, or are running on a platform that handles security at a different layer.
|
|
58
|
+
|
|
59
|
+
### `--dev`
|
|
60
|
+
|
|
61
|
+
Allows the installer to run on a machine with a private or non-routable IP address (e.g., `192.168.x.x`, `10.x.x.x`). By default, the installer requires a public IP.
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npx @lamalibre/create-lamaste@4.0.0 --dev
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
This is useful for:
|
|
68
|
+
|
|
69
|
+
- Testing the installer in a local VM
|
|
70
|
+
- Running on a server behind a NAT (where the public IP is not directly assigned to the interface)
|
|
71
|
+
|
|
72
|
+
When `--dev` is active, the installer prints the detected IP with a note: `(dev mode — private IP accepted)`.
|
|
73
|
+
|
|
74
|
+
### `--force-full`
|
|
75
|
+
|
|
76
|
+
Forces the installer to run the complete installation pipeline, ignoring skip guards that would normally detect an existing installation. This is useful when an installation is in an inconsistent state and you want to ensure all components are fully deployed.
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npx @lamalibre/create-lamaste@4.0.0 --force-full
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Use this if:
|
|
83
|
+
|
|
84
|
+
- A previous installation was interrupted partway through
|
|
85
|
+
- Components were manually removed and need to be reinstalled
|
|
86
|
+
- You want to ensure every step runs regardless of existing state
|
|
87
|
+
|
|
88
|
+
### `--uninstall`
|
|
89
|
+
|
|
90
|
+
Prints a step-by-step guide for manually removing Lamaste from the server, then exits with code 0. Does not modify anything on the system.
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
npx @lamalibre/create-lamaste@4.0.0 --uninstall
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The printed guide first points to the automated removal, `sudo lamaste-server uninstall`, then covers:
|
|
97
|
+
|
|
98
|
+
1. Stop and disable services (panel, gatekeeper, Chisel, Authelia) and remove their units
|
|
99
|
+
2. Remove nginx configuration
|
|
100
|
+
3. Remove Lamaste directories and binaries (`/etc/lamalibre/lamaste/`, `/opt/lamalibre/lamaste/`, `/var/www/lamaste/`, `/etc/authelia/`, `/var/log/authelia/`, `/usr/local/bin/{chisel,authelia}`, `/usr/local/sbin/lamaste-{priv,certbot,cert-info}`)
|
|
101
|
+
4. Remove the service accounts (`lamaste`, `lamaste-authelia`, group `lamaste-chisel`)
|
|
102
|
+
5. Remove sudoers rules
|
|
103
|
+
6. Remove fail2ban configuration (optional)
|
|
104
|
+
7. Revert SSH hardening (optional)
|
|
105
|
+
8. Revert firewall changes (optional)
|
|
106
|
+
9. Remove swap file (optional)
|
|
107
|
+
10. Remove Let's Encrypt certificates (optional)
|
|
108
|
+
|
|
109
|
+
See also: [Uninstalling](../05-operations/uninstalling.md) for the full documentation.
|
|
110
|
+
|
|
111
|
+
## Environment Variables
|
|
112
|
+
|
|
113
|
+
| Variable | Default | Description |
|
|
114
|
+
| -------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
115
|
+
| `LAMALIBRE_LAMASTE_CONFIG` | `/etc/lamalibre/lamaste/panel.json` | Override the panel config file path (lamalibre-lamaste-serverd) |
|
|
116
|
+
| `NODE_ENV` | — | Set to `development` (or leave unset) to skip mTLS verification and use dev config path; set to `production` for production behavior (lamalibre-lamaste-serverd) |
|
|
117
|
+
|
|
118
|
+
These environment variables affect the **panel server** at runtime, not the installer itself. They are listed here because they are the only environment-level configuration Lamaste uses.
|
|
119
|
+
|
|
120
|
+
The installer sets these in the systemd service unit:
|
|
121
|
+
|
|
122
|
+
```ini
|
|
123
|
+
Environment=NODE_ENV=production
|
|
124
|
+
Environment=CONFIG_FILE=/etc/lamalibre/lamaste/panel.json
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
> **Note:** The systemd unit sets `CONFIG_FILE`, but the panel server code reads `LAMALIBRE_LAMASTE_CONFIG`. The `CONFIG_FILE` variable is not used by the application. In production this has no effect because the code falls back to `/etc/lamalibre/lamaste/panel.json` when `LAMALIBRE_LAMASTE_CONFIG` is unset and `NODE_ENV=production`.
|
|
128
|
+
|
|
129
|
+
## Exit Codes
|
|
130
|
+
|
|
131
|
+
| Code | Meaning |
|
|
132
|
+
| ---- | ------------------------------------------------------------------ |
|
|
133
|
+
| 0 | Success (installation complete, or `--help`/`--uninstall` printed) |
|
|
134
|
+
| 1 | Installation failed (error printed to stderr) |
|
|
135
|
+
|
|
136
|
+
When the installer fails, it prints a boxed error message with the failure reason and a note that you can safely re-run the installer to retry:
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
┌─────────────────────────────────────────────┐
|
|
140
|
+
│ Lamaste installation failed. │
|
|
141
|
+
│ <error message> │
|
|
142
|
+
│ │
|
|
143
|
+
│ You can safely re-run this installer │
|
|
144
|
+
│ to retry. │
|
|
145
|
+
└─────────────────────────────────────────────┘
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Requirements
|
|
149
|
+
|
|
150
|
+
The installer checks these requirements at startup and fails with a descriptive error if any are not met:
|
|
151
|
+
|
|
152
|
+
| Requirement | Check |
|
|
153
|
+
| -------------------------- | ------------------------------ |
|
|
154
|
+
| Root access | `process.getuid() === 0` |
|
|
155
|
+
| Ubuntu 24.04 | Reads `/etc/os-release` |
|
|
156
|
+
| Public IP (unless `--dev`) | Detects via network interfaces |
|
|
157
|
+
|
|
158
|
+
## Installation Phases
|
|
159
|
+
|
|
160
|
+
The installer runs in two sequential phases:
|
|
161
|
+
|
|
162
|
+
**Phase 1: Environment checks**
|
|
163
|
+
|
|
164
|
+
1. Verify root access
|
|
165
|
+
2. Detect operating system (must be Ubuntu 24.04)
|
|
166
|
+
3. Detect IP address (must be public unless `--dev`)
|
|
167
|
+
|
|
168
|
+
**Phase 2: Installation tasks**
|
|
169
|
+
|
|
170
|
+
1. Harden operating system (skipped with `--skip-harden`)
|
|
171
|
+
- Create 1 GB swap file
|
|
172
|
+
- Configure UFW firewall (ports 22, 443, 9292)
|
|
173
|
+
- Install and configure fail2ban
|
|
174
|
+
- Harden SSH configuration
|
|
175
|
+
- Install system dependencies (curl, openssl, nginx, certbot)
|
|
176
|
+
2. Install Node.js 20 LTS
|
|
177
|
+
3. Generate mTLS certificates (CA, client cert, PKCS12 bundle)
|
|
178
|
+
4. Configure nginx (self-signed TLS, mTLS snippet, panel vhost on port 9292)
|
|
179
|
+
5. Deploy Lamaste panel (system user, root-owned install directory, pinned Chisel + Authelia with their units and accounts, server, CLI, client, config, systemd, `lamaste-priv` and wrappers, sudoers)
|
|
180
|
+
6. Deploy Gatekeeper
|
|
181
|
+
|
|
182
|
+
## Idempotency
|
|
183
|
+
|
|
184
|
+
The installer is designed to be re-run safely. Skip guards prevent duplicate work:
|
|
185
|
+
|
|
186
|
+
| Component | Skip Condition |
|
|
187
|
+
| ----------------- | ---------------------------------------------------------------------------- |
|
|
188
|
+
| Swap file | Swap already active |
|
|
189
|
+
| UFW firewall | Already active with required ports |
|
|
190
|
+
| fail2ban | Config exists and service is running |
|
|
191
|
+
| SSH hardening | Settings already correct |
|
|
192
|
+
| Node.js | Already installed at expected version |
|
|
193
|
+
| mTLS certificates | `ca.key` and `client.p12` already exist |
|
|
194
|
+
| Panel config | Existing `panel.json` is merged (preserves domain, email, onboarding status) |
|
|
195
|
+
|
|
196
|
+
Components that are always redeployed on re-run:
|
|
197
|
+
|
|
198
|
+
- Panel server files (`/opt/lamalibre/lamaste/lamaste-serverd/`)
|
|
199
|
+
- Panel client files (`/opt/lamalibre/lamaste/lamaste-server-ui/`)
|
|
200
|
+
- Systemd service unit
|
|
201
|
+
- Sudoers rules
|
|
202
|
+
- nginx vhost configuration
|
|
203
|
+
|
|
204
|
+
## Examples
|
|
205
|
+
|
|
206
|
+
**Fresh install on a new droplet:**
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
ssh root@203.0.113.42
|
|
210
|
+
npx @lamalibre/create-lamaste@4.0.0
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**Automated install (no confirmation prompt):**
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
npx @lamalibre/create-lamaste@4.0.0 --yes
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**Install without OS hardening:**
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
npx @lamalibre/create-lamaste@4.0.0 --yes --skip-harden
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
**Test in a local VM:**
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
npx @lamalibre/create-lamaste@4.0.0 --dev
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**Update an existing installation:**
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
npx @lamalibre/create-lamaste@latest --yes
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**View the uninstall guide:**
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
npx @lamalibre/create-lamaste@4.0.0 --uninstall
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
## Quick Reference
|
|
244
|
+
|
|
245
|
+
| Flag | Effect |
|
|
246
|
+
| --------------- | -------------------------------------- |
|
|
247
|
+
| `--help` / `-h` | Print help, exit 0 |
|
|
248
|
+
| `--yes` / `-y` | Skip confirmation |
|
|
249
|
+
| `--skip-harden` | No swap, UFW, fail2ban, SSH hardening |
|
|
250
|
+
| `--dev` | Allow private IPs |
|
|
251
|
+
| `--force-full` | Full install even on existing installs |
|
|
252
|
+
| `--uninstall` | Print removal guide, exit 0 |
|
|
253
|
+
|
|
254
|
+
| Requirement | Value |
|
|
255
|
+
| ----------- | ------------------------------- |
|
|
256
|
+
| OS | Ubuntu 24.04 |
|
|
257
|
+
| Access | Root |
|
|
258
|
+
| IP | Public (or `--dev` for private) |
|
|
259
|
+
| Exit 0 | Success |
|
|
260
|
+
| Exit 1 | Failure |
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# Ports and Services
|
|
2
|
+
|
|
3
|
+
> Quick reference for port allocation, systemd units, file paths, log locations, and binary locations.
|
|
4
|
+
|
|
5
|
+
## Port Allocation
|
|
6
|
+
|
|
7
|
+
| Port | Binding | Service | Protocol | Purpose |
|
|
8
|
+
| ---- | ----------- | ---------------------------- | -------- | ------------------------------------------------------- |
|
|
9
|
+
| 22 | `0.0.0.0` | sshd | TCP | SSH access (installer only, disposable) |
|
|
10
|
+
| 80 | `0.0.0.0` | nginx | TCP | HTTP — `301` to HTTPS; Let's Encrypt HTTP-01 challenges |
|
|
11
|
+
| 443 | `0.0.0.0` | nginx | TCP | HTTPS — domain-based access (panel, auth, tunnel, apps) |
|
|
12
|
+
| 9292 | `0.0.0.0` | nginx | TCP | HTTPS — IP-based panel access (mTLS, self-signed cert) |
|
|
13
|
+
| 3100 | `127.0.0.1` | lamalibre-lamaste-serverd | TCP | Panel server (Fastify API + static files) |
|
|
14
|
+
| 9090 | `127.0.0.1` | chisel | TCP | Chisel tunnel server (WebSocket) |
|
|
15
|
+
| 9091 | `127.0.0.1` | authelia | TCP | Authelia authentication server |
|
|
16
|
+
| 9294 | `127.0.0.1` | lamalibre-lamaste-gatekeeper | TCP | Tunnel authorization (auth_request target) |
|
|
17
|
+
|
|
18
|
+
**Key points:**
|
|
19
|
+
|
|
20
|
+
- Only nginx listens on public interfaces (`0.0.0.0`)
|
|
21
|
+
- All backend services bind to `127.0.0.1` — they are never directly accessible from the internet
|
|
22
|
+
- Port 9292 is the emergency fallback — it works even if your domain is lost or DNS breaks
|
|
23
|
+
- The UFW firewall only allows ports 22, 80, 443, and 9292. Port 80 serves Let's Encrypt HTTP-01 challenges and otherwise redirects every request to HTTPS (`lamalibre-lamaste-http-redirect`)
|
|
24
|
+
|
|
25
|
+
### Reserved tunnel ports
|
|
26
|
+
|
|
27
|
+
A tunnel's port is also a loopback port on the relay: its vhost proxies to `127.0.0.1:<port>`. The ports of Lamaste's own services can therefore never carry a tunnel:
|
|
28
|
+
|
|
29
|
+
| Port | Service |
|
|
30
|
+
| ---- | ----------------------- |
|
|
31
|
+
| 3100 | Panel server |
|
|
32
|
+
| 9090 | Chisel server |
|
|
33
|
+
| 9091 | Authelia |
|
|
34
|
+
| 9292 | IP-based panel listener |
|
|
35
|
+
| 9294 | Gatekeeper |
|
|
36
|
+
|
|
37
|
+
A tunnel on one of them would publish that internal service on a public hostname. For the panel that is an administrator takeover, not a leak: the panel trusts the client-certificate headers nginx sets. `RESERVED_TUNNEL_PORTS` in `@lamalibre/lamaste@4.0.0` is enforced by the request schema, inside the tunnel workflow, and again when the Chisel grants are rendered. Tunnel ports must also be 1024–65535.
|
|
38
|
+
|
|
39
|
+
## Systemd Units
|
|
40
|
+
|
|
41
|
+
| Unit Name | Type | User | Description |
|
|
42
|
+
| -------------------------------------- | ------ | ------------------------------- | ------------------------------------------- |
|
|
43
|
+
| `lamalibre-lamaste-serverd.service` | simple | lamaste | Panel server (Fastify Node.js API) |
|
|
44
|
+
| `chisel.service` | simple | nobody (group `lamaste-chisel`) | Chisel tunnel server (reverse mode) |
|
|
45
|
+
| `authelia.service` | simple | lamaste-authelia | Authelia authentication server |
|
|
46
|
+
| `lamalibre-lamaste-gatekeeper.service` | simple | lamaste | Gatekeeper tunnel authorization service |
|
|
47
|
+
| `nginx.service` | — | root | nginx reverse proxy (system package) |
|
|
48
|
+
| `fail2ban.service` | — | root | Intrusion prevention (system package) |
|
|
49
|
+
| `certbot.timer` | timer | root | Automatic Let's Encrypt certificate renewal |
|
|
50
|
+
|
|
51
|
+
### Common systemctl Commands
|
|
52
|
+
|
|
53
|
+
| Command | Description |
|
|
54
|
+
| ------------------------------- | --------------------------------------------- |
|
|
55
|
+
| `sudo systemctl status <unit>` | Check service status and recent logs |
|
|
56
|
+
| `sudo systemctl start <unit>` | Start a stopped service |
|
|
57
|
+
| `sudo systemctl stop <unit>` | Stop a running service |
|
|
58
|
+
| `sudo systemctl restart <unit>` | Stop then start a service |
|
|
59
|
+
| `sudo systemctl reload <unit>` | Reload configuration without downtime (nginx) |
|
|
60
|
+
| `sudo systemctl enable <unit>` | Start automatically on boot |
|
|
61
|
+
| `sudo systemctl disable <unit>` | Do not start on boot |
|
|
62
|
+
|
|
63
|
+
### Service Unit Files
|
|
64
|
+
|
|
65
|
+
| Unit | File Path |
|
|
66
|
+
| ------------------------------ | ---------------------------------------------------------- |
|
|
67
|
+
| `lamalibre-lamaste-serverd` | `/etc/systemd/system/lamalibre-lamaste-serverd.service` |
|
|
68
|
+
| `chisel` | `/etc/systemd/system/chisel.service` |
|
|
69
|
+
| `authelia` | `/etc/systemd/system/authelia.service` |
|
|
70
|
+
| `lamalibre-lamaste-gatekeeper` | `/etc/systemd/system/lamalibre-lamaste-gatekeeper.service` |
|
|
71
|
+
| `nginx` | `/lib/systemd/system/nginx.service` (system package) |
|
|
72
|
+
| `fail2ban` | `/lib/systemd/system/fail2ban.service` (system package) |
|
|
73
|
+
| `certbot.timer` | `/lib/systemd/system/certbot.timer` (system package) |
|
|
74
|
+
|
|
75
|
+
### Service Startup Order
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
network.target
|
|
79
|
+
├── nginx.service
|
|
80
|
+
├── lamalibre-lamaste-serverd.service
|
|
81
|
+
├── lamalibre-lamaste-gatekeeper.service
|
|
82
|
+
├── chisel.service
|
|
83
|
+
├── authelia.service
|
|
84
|
+
└── fail2ban.service
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
All services start after `network.target` and are independent of each other. If one service fails, the others continue running.
|
|
88
|
+
|
|
89
|
+
The `chisel` and `authelia` units are written by `create-lamaste` (as root) and hardened (`NoNewPrivileges`, empty `CapabilityBoundingSet`, `ProtectSystem=strict`, `PrivateTmp`, `PrivateDevices`; Authelia also `UMask=027`, `ReadWritePaths=/etc/authelia /var/log/authelia` and `SystemCallFilter=@system-service`). `lamaste-authelia` is a system account with no login shell and no home directory, created by the installer. The panel runs as `lamaste` and can start, stop and restart these services through fixed sudoers lines, but never writes their units.
|
|
90
|
+
|
|
91
|
+
On every start the panel reconciles Chisel in the background (server key, authfile; it also checks that the installed binary is the pinned release and logs an error if not). If the authfile cannot be established it stops and disables `chisel.service` (marker: `/etc/lamalibre/lamaste/chisel-failed-closed`) and retries with backoff (30 s up to 10 min), re-enabling it on success — see [Tunneling](../01-concepts/tunneling.md#startup-reconciliation).
|
|
92
|
+
|
|
93
|
+
### Agent-side services
|
|
94
|
+
|
|
95
|
+
Per agent label, on the agent machine (user-level, no root):
|
|
96
|
+
|
|
97
|
+
| Linux (systemd user units) | macOS (LaunchAgents) | Purpose |
|
|
98
|
+
| --------------------------------------------------- | -------------------------------------- | -------------------------------------------- |
|
|
99
|
+
| `lamalibre-lamaste-chisel-<label>.service` | `com.lamalibre.lamaste.chisel-<label>` | Chisel client; stopped while no tunnels |
|
|
100
|
+
| `lamalibre-lamaste-sync-<label>.service` + `.timer` | `com.lamalibre.lamaste.sync-<label>` | `lamaste-agent sync` every 30 s |
|
|
101
|
+
| `lamalibre-lamaste-panel-<label>.service` | `com.lamalibre.lamaste.panel-<label>` | Optional agent panel (`lamaste-agent panel`) |
|
|
102
|
+
|
|
103
|
+
## Key File Paths
|
|
104
|
+
|
|
105
|
+
### Configuration
|
|
106
|
+
|
|
107
|
+
| Path | Description |
|
|
108
|
+
| -------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
|
109
|
+
| `/etc/lamalibre/lamaste/panel.json` | Panel server configuration |
|
|
110
|
+
| `/etc/lamalibre/lamaste/tunnels.json` | Tunnel definitions |
|
|
111
|
+
| `/etc/lamalibre/lamaste/sites.json` | Static site definitions |
|
|
112
|
+
| `/etc/lamalibre/lamaste/chisel-credentials.json` | Per-agent Chisel credentials |
|
|
113
|
+
| `/etc/lamalibre/lamaste/chisel-users` | Chisel authfile: per-agent credentials + port grants (0640, group `lamaste-chisel`) |
|
|
114
|
+
| `/etc/lamalibre/lamaste/chisel-sentinel` | Sentinel Chisel user password |
|
|
115
|
+
| `/etc/lamalibre/lamaste/ticket-scopes.json` | Ticket scope registry (scopes, instances, assignments) |
|
|
116
|
+
| `/etc/lamalibre/lamaste/tickets.json` | Ticket and session store |
|
|
117
|
+
| `/etc/lamalibre/lamaste/groups.json` | Lamaste group definitions and membership |
|
|
118
|
+
| `/etc/lamalibre/lamaste/access-grants.json` | Generic access grants (principal → resource) |
|
|
119
|
+
| `/etc/lamalibre/lamaste/gatekeeper.json` | Gatekeeper settings (cache TTL, logging) |
|
|
120
|
+
| `/etc/lamalibre/lamaste/access-request-log.json` | Optional denied access log |
|
|
121
|
+
| `/etc/authelia/configuration.yml` | Authelia server configuration |
|
|
122
|
+
| `/etc/authelia/users.yml` | Authelia user database |
|
|
123
|
+
| `/etc/authelia/.secrets.json` | Authelia secrets (JWT, session, encryption) |
|
|
124
|
+
| `/etc/nginx/snippets/lamalibre-lamaste-mtls.conf` | mTLS configuration snippet |
|
|
125
|
+
| `/etc/nginx/snippets/lamalibre-lamaste-authz-cache.conf` | Gatekeeper proxy_cache zone definition |
|
|
126
|
+
| `/etc/sudoers.d/lamaste` | Sudo rules for lamaste user (fixed command lines, no wildcards) |
|
|
127
|
+
| `/usr/local/sbin/lamaste-priv` | Root-owned helper: panel vhosts (allow-listed), Authelia TOTP, self-update |
|
|
128
|
+
| `/usr/local/sbin/lamaste-certbot` | Root-owned certbot wrapper (validated, fixed argv) |
|
|
129
|
+
| `/usr/local/sbin/lamaste-cert-info` | Root-owned read-only Let's Encrypt certificate queries |
|
|
130
|
+
| `/etc/fail2ban/jail.d/lamaste.conf` | fail2ban jail configuration |
|
|
131
|
+
| `/etc/sysctl.d/99-lamaste.conf` | Kernel parameter (swappiness) |
|
|
132
|
+
|
|
133
|
+
### PKI Certificates
|
|
134
|
+
|
|
135
|
+
| Path | Description |
|
|
136
|
+
| ------------------------------------------------ | ---------------------------------------------------- |
|
|
137
|
+
| `/etc/lamalibre/lamaste/pki/ca.key` | Certificate Authority private key (4096-bit RSA) |
|
|
138
|
+
| `/etc/lamalibre/lamaste/pki/ca.crt` | Certificate Authority certificate (10-year validity) |
|
|
139
|
+
| `/etc/lamalibre/lamaste/pki/client.key` | Client certificate private key (4096-bit RSA) |
|
|
140
|
+
| `/etc/lamalibre/lamaste/pki/client.crt` | Client certificate (2-year validity, signed by CA) |
|
|
141
|
+
| `/etc/lamalibre/lamaste/pki/client.p12` | PKCS12 bundle for browser import |
|
|
142
|
+
| `/etc/lamalibre/lamaste/pki/.p12-password` | Password for the PKCS12 bundle |
|
|
143
|
+
| `/etc/lamalibre/lamaste/pki/self-signed.pem` | Self-signed TLS cert for IP:9292 (10-year validity) |
|
|
144
|
+
| `/etc/lamalibre/lamaste/pki/self-signed-key.pem` | Self-signed TLS key for IP:9292 |
|
|
145
|
+
|
|
146
|
+
### Let's Encrypt Certificates
|
|
147
|
+
|
|
148
|
+
| Path | Description |
|
|
149
|
+
| -------------------------------------------- | --------------------------------- |
|
|
150
|
+
| `/etc/letsencrypt/live/<fqdn>/fullchain.pem` | Certificate chain |
|
|
151
|
+
| `/etc/letsencrypt/live/<fqdn>/privkey.pem` | Private key |
|
|
152
|
+
| `/etc/letsencrypt/renewal/<fqdn>.conf` | Auto-renewal configuration |
|
|
153
|
+
| `/etc/letsencrypt/accounts/` | Let's Encrypt account credentials |
|
|
154
|
+
|
|
155
|
+
### nginx Vhosts
|
|
156
|
+
|
|
157
|
+
| Path | Description |
|
|
158
|
+
| -------------------------------------------------------------- | ---------------------------------------- |
|
|
159
|
+
| `/etc/nginx/sites-available/lamalibre-lamaste-http-redirect` | Port 80 catch-all, `301` to HTTPS |
|
|
160
|
+
| `/etc/nginx/sites-available/lamalibre-lamaste-panel-ip` | IP:9292 panel vhost (mTLS, self-signed) |
|
|
161
|
+
| `/etc/nginx/sites-available/lamalibre-lamaste-panel-domain` | Domain panel vhost (mTLS, Let's Encrypt) |
|
|
162
|
+
| `/etc/nginx/sites-available/lamalibre-lamaste-auth` | Authelia portal vhost |
|
|
163
|
+
| `/etc/nginx/sites-available/lamalibre-lamaste-tunnel` | Chisel WebSocket vhost |
|
|
164
|
+
| `/etc/nginx/sites-available/lamalibre-lamaste-app-<subdomain>` | Per-tunnel app vhosts |
|
|
165
|
+
| `/etc/nginx/sites-available/lamalibre-lamaste-site-<uuid>` | Per-static-site vhosts |
|
|
166
|
+
|
|
167
|
+
### Application Files
|
|
168
|
+
|
|
169
|
+
| Path | Description |
|
|
170
|
+
| --------------------------------------------------------- | ------------------------- |
|
|
171
|
+
| `/opt/lamalibre/lamaste/lamaste-serverd/` | Fastify backend (Node.js) |
|
|
172
|
+
| `/opt/lamalibre/lamaste/lamaste-serverd/src/index.js` | Server entry point |
|
|
173
|
+
| `/opt/lamalibre/lamaste/lamaste-serverd/package.json` | Server dependencies |
|
|
174
|
+
| `/opt/lamalibre/lamaste/lamaste-server-ui/` | React frontend |
|
|
175
|
+
| `/opt/lamalibre/lamaste/lamaste-server-ui/dist/` | Built static assets |
|
|
176
|
+
| `/opt/lamalibre/lamaste/lamaste-server-ui/cert-help.html` | Certificate help page |
|
|
177
|
+
| `/var/www/lamaste/` | Static site uploads |
|
|
178
|
+
|
|
179
|
+
## Log Locations
|
|
180
|
+
|
|
181
|
+
| Service | Log Method | View Command |
|
|
182
|
+
| ---------------------------- | --------------- | ------------------------------------------------------------ |
|
|
183
|
+
| lamalibre-lamaste-serverd | journald | `journalctl -u lamalibre-lamaste-serverd` |
|
|
184
|
+
| lamalibre-lamaste-gatekeeper | journald | `journalctl -u lamalibre-lamaste-gatekeeper` |
|
|
185
|
+
| chisel | journald | `journalctl -u chisel` |
|
|
186
|
+
| authelia | journald + file | `journalctl -u authelia` or `/var/log/authelia/authelia.log` |
|
|
187
|
+
| nginx | file | `/var/log/nginx/access.log` and `/var/log/nginx/error.log` |
|
|
188
|
+
| fail2ban | file | `/var/log/fail2ban.log` |
|
|
189
|
+
| certbot | file | `/var/log/letsencrypt/letsencrypt.log` |
|
|
190
|
+
|
|
191
|
+
### Useful Log Commands
|
|
192
|
+
|
|
193
|
+
| Command | Description |
|
|
194
|
+
| -------------------------------------------- | ------------------------------ |
|
|
195
|
+
| `journalctl -u lamalibre-lamaste-serverd -f` | Follow panel logs in real time |
|
|
196
|
+
| `journalctl -u chisel --since "1 hour ago"` | Last hour of Chisel logs |
|
|
197
|
+
| `journalctl -u authelia -n 50` | Last 50 Authelia log entries |
|
|
198
|
+
| `tail -f /var/log/nginx/error.log` | Follow nginx error log |
|
|
199
|
+
| `tail -f /var/log/fail2ban.log` | Follow fail2ban activity |
|
|
200
|
+
| `journalctl --disk-usage` | Check journal disk usage |
|
|
201
|
+
|
|
202
|
+
## Binary Locations
|
|
203
|
+
|
|
204
|
+
| Binary | Path | Source | Version Check |
|
|
205
|
+
| -------- | ------------------------- | ------------------------------------------------------------------------------------------- | -------------------- |
|
|
206
|
+
| Chisel | `/usr/local/bin/chisel` | GitHub release 1.12.0, SHA-256 pinned, installed by `create-lamaste` | `chisel --version` |
|
|
207
|
+
| Authelia | `/usr/local/bin/authelia` | GitHub release 4.39.28, SHA-256 pinned, installed by `create-lamaste` (a newer one is kept) | `authelia --version` |
|
|
208
|
+
| Node.js | `/usr/bin/node` | NodeSource repo | `node --version` |
|
|
209
|
+
| npm | `/usr/bin/npm` | NodeSource repo | `npm --version` |
|
|
210
|
+
| nginx | `/usr/sbin/nginx` | apt package | `nginx -v` |
|
|
211
|
+
| certbot | `/usr/bin/certbot` | apt package | `certbot --version` |
|
|
212
|
+
| openssl | `/usr/bin/openssl` | apt package | `openssl version` |
|
|
213
|
+
|
|
214
|
+
## Quick Reference
|
|
215
|
+
|
|
216
|
+
**Check all service statuses at once:**
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
sudo systemctl status nginx chisel authelia lamalibre-lamaste-serverd lamalibre-lamaste-gatekeeper --no-pager
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**Check which ports are listening:**
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
sudo ss -tlnp | grep -E ':(22|80|443|3100|9090|9091|9292|9294)\s'
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Check disk usage of Lamaste directories:**
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
sudo du -sh /etc/lamalibre/lamaste/ /opt/lamalibre/lamaste/ /var/www/lamaste/ /etc/authelia/ /etc/letsencrypt/ 2>/dev/null
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**Check all Lamaste-related nginx sites:**
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
ls -la /etc/nginx/sites-enabled/lamaste-*
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Validate nginx configuration:**
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
sudo nginx -t
|
|
244
|
+
```
|