Quickstart
This page takes a new linux/amd64 host from nothing to a first published HTTPS
service on PORTAVIUM v1.0.0. It ends with a verification check you can repeat at any
time. The whole procedure takes about fifteen minutes, plus DNS propagation.
Two things will be used throughout and you should have them ready:
- a management name for the WebUI (for example
proxy.example.com) reachable only through your management network; - a service name you want to publish (for example
docs.example.com), with control of its DNS records.
The commands below use the reserved example names from this documentation. Replace them with your own.
1. Prerequisites
On the node that will serve traffic:
- Platform:
linux/amd64. This is the only platform published for v1.0.0. - Docker Engine with the Compose v2 plugin; the commands use
docker compose. - Root or
sudo, and a directory dedicated to PORTAVIUM (/opt/portaviumhere). - Addresses: one public IPv4 address, and an IPv6 address if the node should serve IPv6. Both are published on ports 80 and 443.
- Inbound TCP 80 and 443 reachable from the internet. Port 80 is used for ACME HTTP-01 challenges and for the HTTP-to-HTTPS redirect.
- DNS control for the names you publish, including
Aand, when the node serves IPv6,AAAArecords. A short TTL (60 s) while bringing a name up. - An email address for the ACME account, and the address of the authoritative nameserver for your zone.
- A restricted path to port 8081. The Compose file publishes the WebUI on the node's own addresses; restricting it is your responsibility. Never expose it to the internet.
The stack runs three containers (database, data plane, controller). Size the host like any Caddy plus PostgreSQL deployment; no benchmark figures are published for v1.0.0.
2. Download the deployment files
sudo install -d -m 0755 /opt/portavium
cd /opt/portavium
sudo curl -fsSLO https://docs.portavium.net/files/portavium-deployment.yaml
sudo curl -fsSLo .env.example https://docs.portavium.net/files/portavium-variables.example
sudo mv portavium-deployment.yaml compose.yaml
sudo chmod 0644 compose.yaml
compose.yaml is the deployment that was exercised for the release; the rest of this
page uses it unchanged. Keep a copy of both files with your deployment record.
The published filenames avoid the .env and compose.yaml request paths that a stock
WAF rule set refuses; the content is the Compose file and the variables template.
3. Create the directories and the secrets
cd /opt/portavium
sudo install -d -m 0755 data data/postgres data/caddy data/tls data/secrets
sudo install -d -m 0750 -o root -g 10001 secrets
sudo install -d -m 0700 config
umask 077
sudo openssl rand -hex 24 > secrets/postgres_password.txt
sudo openssl rand -hex 32 > secrets/cert-encryption.key
sudo chown root:10001 secrets secrets/postgres_password.txt secrets/cert-encryption.key
sudo chmod 0750 secrets
sudo chmod 0640 secrets/postgres_password.txt secrets/cert-encryption.key
sudo chown -R 10001:10001 data/caddy data/tls data/secrets
The certificate encryption key decrypts the stored TLS private keys. Back it up together with the database, or a restored database cannot serve HTTPS.
PostgreSQL requires its data directory to be owned by its own user and mode 0700:
sudo docker run --rm -u 0 -v /opt/portavium/data/postgres:/v \
docker.io/library/postgres:17-alpine \
sh -c 'chown -R postgres:postgres /v && chmod 0700 /v'
4. Set the deployment variables
cd /opt/portavium
sudo cp .env.example .env
sudo chmod 0600 .env
sudo editor .env
The image references in the file are the released v1.0.0 build, pinned by tag and digest. Change only the two address lines:
PUBLIC_IPV4=192.0.2.10
PUBLIC_IPV6=2001:db8::10
If the node has no public IPv6, delete the three IPv6 port entries from compose.yaml,
set PUBLIC_IPV6= (empty) in .env, and set DATA_IPV6= (empty) in
config/controller.env. Do not publish an AAAA record for an address the node cannot
bind.
5. Create the controller environment
The controller reads config/controller.env (mode 0600). Generate it with the password
you just created:
cd /opt/portavium
PGPASS="$(sudo cat secrets/postgres_password.txt)"
sudo bash -c "cat > config/controller.env <<EOF
DATABASE_URL=postgres://revproxy:$PGPASS@10.89.73.2:5432/revproxy?sslmode=disable&connect_timeout=2
MGMT_HOSTNAME=proxy.example.com
PUBLIC_IPV4=192.0.2.10
PUBLIC_IPV6=2001:db8::10
CADDY_ADMIN_URL=http://10.89.71.2:2019
CADDY_ADMIN_LISTEN=10.89.71.2:2019
NODE_NAME=proxy-1
ACME_EMAIL=hostmaster@example.com
AUTHORITATIVE_NS=ns1.example.com:53
RECURSIVE_NS=1.1.1.1:53
MFA_MODE=enforce
NODE_INTERFACE=
EOF"
sudo chmod 0600 config/controller.env
10.89.71.2 and 10.89.73.2 are fixed container addresses inside this Compose file.
They are not addresses of your host and are not changed independently.
MFA_MODE=enforce requires every administrator to enrol a second factor; see
Administrator MFA for the exact sign-in behaviour and for
running without enforcement.
NODE_INTERFACE (optional) is the host interface whose counters the Network card
reports, for example eth0. Empty shows the card without a series.
6. Start the stack
cd /opt/portavium
sudo docker compose --env-file .env config -q
sudo docker compose --env-file .env up -d
sudo docker compose --env-file .env ps
Wait until every service is healthy (the database initialises on the first start), then
confirm the controller answers on the node:
curl -fsSk https://127.0.0.1:8081/healthz
The management listener starts with a self-signed certificate. That is expected; step 8 shows how to replace it.
Port 8081 is the administrative console. Add a host firewall rule that admits your management network and drops everything else, for example with nftables:
sudo nft add table inet portavium
sudo nft add chain inet portavium input '{ type filter hook input priority 0; }'
sudo nft add rule inet portavium input tcp dport 8081 ip saddr 192.0.2.0/28 accept
sudo nft add rule inet portavium input tcp dport 8081 ip6 saddr 2001:db8:ffff::/48 accept
sudo nft add rule inet portavium input tcp dport 8081 drop
Verify from outside the management network that 8081 is closed before continuing.
7. First sign-in and MFA
The controller creates one local administrator on first start and writes the generated credential to a root-only file:
sudo cat /opt/portavium/data/secrets/admin-bootstrap.txt
Open https://proxy.example.com:8081/ through your management path and sign in as
admin. With MFA_MODE=enforce, the first sign-in runs enrolment before any session
exists:

- The password step is verified.
- The enrolment secret is shown as a scannable code and as text. Add it to an authenticator application.
- Enter the current six-digit code to activate the factor.
- The ten recovery codes are shown once. Store them offline.
Then rotate the bootstrap password under Accounts → Change my password, and delete the bootstrap file:
sudo shred -u /opt/portavium/data/secrets/admin-bootstrap.txt
The bootstrap account is not forced to change its password; created administrators are (see Administrator MFA). Create one named account per person under Accounts → Create administrator, so every change is attributable to a person.
To give the management listener a trusted certificate, run this once, on a node whose management name resolves to its published addresses:
cd /opt/portavium
sudo docker compose --env-file .env exec -T controller \
/usr/local/bin/revproxy-controller -mode issue-management
If the management name is not publicly resolvable, keep the self-signed certificate and reach the console through your management path.
8. Publish the first host
For a first end-to-end check you do not need an external origin: the Compose file ships a
synthetic origin under the smoke profile.
cd /opt/portavium
sudo docker compose --env-file .env --profile smoke up -d smoke-upstream
It listens on 10.89.72.10:8080 on the data network and echoes the request it receives.
Create the upstream
Upstreams → New upstream:
- Name:
docs-origin - Scheme:
http - Address:
10.89.72.10, Port:8080 - Connect timeout:
2000ms, response timeout:30000ms - Save to desired state.
Create the host
Hosts → New host:
- Display name:
docs - Host type: Proxy host
- Host names:
docs.example.com(replace with your name) - Serving: on
- Upstream:
docs-origin - Access policy: inherit the deployment default
- Minimum TLS version:
TLS 1.2 - Redirect HTTP to HTTPS: on
- Save to desired state.
Save and apply
Revisions → Save revision with a message such as Add docs host. A saved revision is
not served. Select Apply revision and watch the phases: ID_INDEX, VALIDATE,
ACTIVATE, CONFIG_READBACK, VERIFY.
The first Apply succeeds even when the host has no certificate yet; the host is reported
as blocked on certificate. There are then two ways forward.
Automatic issuance (a name you control). Create both records first:
docs.example.com. 60 IN A 192.0.2.10
docs.example.com. 60 IN AAAA 2001:db8::10
The control plane preflights DNS, opens an HTTP-01 order, installs the certificate, re-applies the live revision and starts serving HTTPS. No second Apply is needed. If DNS is not ready, issuance is deferred and retried; publishing the records is the only action required.
Import a certificate (no public name). Use Certificates → Import with the PEM chain and the unencrypted private key; the names you assign must be covered by the certificate's SANs. Then save and apply a revision. An imported certificate is never renewed by the control plane.
9. Verification check
From a host outside your network, with a name that resolves to the node:
curl -sS -o /dev/null -w 'ipv4 %{http_code}\n' https://docs.example.com/
curl -sS -o /dev/null -w 'ipv6 %{http_code}\n' https://docs.example.com/ --ipv6
Both must return the status your origin serves, with a certificate issued to the name. A
403 usually means the access policy or the WAF; a 404 means the host is not in the
live revision.
If you used the synthetic origin and an imported self-signed certificate, verify locally instead:
curl -sS --resolve docs.example.com:443:127.0.0.1 --cacert your-ca.pem \
https://docs.example.com/
The Dashboard shows the host as serving, its effective destination and HTTPS
SERVED once the route and a ready certificate are both in the verified document.

When the first route is verified you can remove the synthetic origin:
cd /opt/portavium
sudo docker compose --env-file .env --profile smoke rm -sf smoke-upstream