Remove fixed-host and HTTPS-only deployment requirements so the dashboard works at the container IP on HTTP port 5187. Validate browser mutations against the actual request host and retain access keys and CSRF protection. Ignore legacy public-origin settings and make Proxmox setup hostname-free. Update D14 and regression coverage for version 1.2.3. Refs #25
This commit is contained in:
+17
-14
@@ -1,8 +1,8 @@
|
||||
# Proxmox LXC install and update
|
||||
|
||||
Use the **Proxmox host only to create the container**. Updates run **inside the LXC**.
|
||||
FinalToken uses your existing HTTPS reverse proxy and installs no Caddy or other proxy.
|
||||
The private backend listens on **HTTP port 5187**. This follows
|
||||
Open the dashboard at **`http://<container-ip>:5187`**. No hostname, HTTPS or proxy is required;
|
||||
FinalToken installs no Caddy or other proxy. This follows
|
||||
[D14](decisions.md#d14--self-hosted-dashboard-and-workers).
|
||||
|
||||
## Install the server
|
||||
@@ -12,23 +12,25 @@ As root on the Proxmox host, with Git and Python 3 installed:
|
||||
```bash
|
||||
git clone --branch master --single-branch https://git.finalfactory.de/FinalFactory/FinalToken.git /opt/finaltoken-src && \
|
||||
bash /opt/finaltoken-src/tools/proxmox.sh install --role server --ctid 201 \
|
||||
--storage local-lvm --domain usage.example.com --timezone Europe/Berlin
|
||||
--storage local-lvm --timezone Europe/Berlin
|
||||
```
|
||||
|
||||
Use a free CT id and your storage, hostname and timezone. Omit `--ctid` for the next free id.
|
||||
The hostname is the public hostname on **your existing proxy**, not a certificate request.
|
||||
Use a free CT id and your storage and timezone. Omit `--ctid` for the next free id.
|
||||
The optional legacy `--domain` argument is accepted but does not restrict dashboard access.
|
||||
Add `--dry-run` to validate without creating a CT. Anonymous HTTPS clone needs no Git login.
|
||||
|
||||
Configure your existing reverse proxy:
|
||||
The installer prints the container IP URL. You can also find the address with `hostname -I`
|
||||
inside the CT. HTTP transport is unencrypted. If you choose to use an HTTPS reverse proxy:
|
||||
|
||||
- Public URL: `https://usage.example.com` (your chosen hostname).
|
||||
- Backend: `http://<LXC-IP>:5187`.
|
||||
- Preserve the public `Host` header. Restrict backend network access to your proxy/private network.
|
||||
- Preserve the public `Host` and browser `Origin` headers.
|
||||
- Allow worker metadata POST bodies up to 32 MiB, matching the server's request-size limit.
|
||||
- TLS/certificates stay on your existing proxy. The LXC needs no inbound 80/443 or certificates.
|
||||
|
||||
The server pins its public Host/Origin and uses secure browser cookies. Do not expose this private
|
||||
HTTP backend directly to the Internet or remove authentication. No forwarded-header trust is enabled.
|
||||
The dashboard key, machine keys and CSRF checks remain required. Browser mutation Origins must
|
||||
match the actual request Host; no fixed hostname allowlist applies. HTTPS sessions use Secure
|
||||
cookies, and direct HTTP login works. No forwarded-header trust is enabled.
|
||||
The proxy must not log authorization headers or request bodies containing login responses.
|
||||
|
||||
Read the dashboard key on the CT's root console:
|
||||
@@ -97,8 +99,8 @@ root inside that LXC** to fetch the corrected updater and perform the update:
|
||||
```
|
||||
|
||||
This installs Git in the CT if needed, updates the app, changes the old known loopback listener
|
||||
to `0.0.0.0:5187` and disables **only** `finaltoken-proxy.service`. Point your existing proxy at
|
||||
HTTP port 5187. Keys, public hostname, profiles, history, certificate files and installed packages
|
||||
to `0.0.0.0:5187` and disables **only** `finaltoken-proxy.service`. Open the container IP on
|
||||
HTTP port 5187. Keys, old environment settings, profiles, history, certificate files and installed packages
|
||||
are retained. It does not stop an unrelated `caddy.service` or purge packages/configuration.
|
||||
|
||||
The old server environment is backed up as root-only `server.env.pre-external-proxy`. If the
|
||||
@@ -120,12 +122,13 @@ For a worker-only CT, configure the matching machine/account/key on the existing
|
||||
|
||||
```bash
|
||||
bash tools/proxmox.sh install --ctid 202 --storage local-lvm --role worker \
|
||||
--server-url https://usage.example.com --machine-id lxc_202 \
|
||||
--server-url http://10.0.30.150:5187 --machine-id lxc_202 \
|
||||
--worker-key-file /root/lxc_202.key --email [email protected]
|
||||
```
|
||||
|
||||
The enrollment file holds a FinalToken transport key, not a provider token. The worker's OS user
|
||||
is `finaltoken`; selected provider names are its profile ids. Workers connect outbound over HTTPS.
|
||||
is `finaltoken`; selected provider names are its profile ids. Workers connect outbound over
|
||||
the configured HTTP or HTTPS URL.
|
||||
Use `finaltoken-update` inside worker CTs too.
|
||||
|
||||
## Host and container requirements
|
||||
@@ -139,7 +142,7 @@ when needed. This is not an offline or byte-for-byte reproducible dependency bui
|
||||
|
||||
For static IPv4, add `--ip 192.0.2.20/24 --gateway 192.0.2.1`; `--bridge`, `--vlan`,
|
||||
`--template-storage` and `--template` select host-specific resources. No host firewall, DNS or NAT
|
||||
rules are changed. Your existing proxy must reach the CT on port 5187.
|
||||
rules are changed. Your browser and workers must reach the CT on port 5187.
|
||||
|
||||
The host installer snapshots the selected local checkout, including uncommitted source, through
|
||||
the shared allowlist in `tools/proxmox/source_bundle.py`. It excludes recognized local config,
|
||||
|
||||
Reference in New Issue
Block a user