Settings
The settings of a server, and the Key File that seals its secrets.
A server names its settings in config.toml in the state directory, or in
PAGIS_* variables for a deployment that mounts no file. A variable wins
for the run and is never written back into the file.
config.toml | Variable | Default | What it is |
|---|---|---|---|
port | PAGIS_PORT | 4400 | The product port. |
bind | PAGIS_BIND | 127.0.0.1 | The Bind Address of the product port. Name the private interface the proxy is on, or 0.0.0.0 for every interface. |
public_origin | PAGIS_PUBLIC_ORIGIN | Derived from bind and port | The Public Origin: the scheme, host and port a browser reaches the installation at. The CORS answer names it. |
trusted_proxy | PAGIS_TRUSTED_PROXY | None | The Trusted Proxy: the one address whose X-Forwarded-For and X-Forwarded-Proto the daemon believes. |
[remote_access] enabled | PAGIS_REMOTE_ACCESS | Off | Remote Access: another machine signs in with a Sign-In Link alone, and the TURN server of the live screen runs. The compose deployment turns it on with the tailscale profile (Remote Access at home). |
[administration] port | PAGIS_ADMINISTRATION_PORT | 4401 | The Administration Port. |
[administration] bind | PAGIS_ADMINISTRATION_BIND | 127.0.0.1 | Its Bind Address, loopback whatever the product port binds. |
[administration] path_prefix | None | "" | The page path prefix under the Public Origin, such as /admin. Empty uses the Administration Port origin. API routes keep their root paths. |
[administration] hide | None | [] | The sections the Administration Port does not offer: providers, settings and restart. Each name is optional. An unknown name stops the start and appears in the error. A hidden section has no routes and answers 404. |
[product_app] links | None | [] | Up to three links in the account menu of the Product App. Each link has a label of at most 40 characters and an https URL. |
[database] url | PAGIS_DATABASE_URL | None | The postgres:// URL of the database that holds the records. A server does not start without it. |
[secrets] key_file | None | /run/secrets/pagis-secrets-key | The Key File (Linux). |
[screen] advertise_ip | PAGIS_SCREEN_ADVERTISE_IP | 127.0.0.1 | The address browsers reach the Media Relay at. |
[screen] media_port_first, media_port_last | PAGIS_SCREEN_MEDIA_PORT_FIRST, PAGIS_SCREEN_MEDIA_PORT_LAST | 50000, 50099 | The Media Relay's UDP range. |
[screen] remote_access_turn_port | None | 4402 | The loopback TCP port of the TURN server that carries the live screen through the Funnel in Remote Access. deploy/tailscale-serve.json names 4402. |
[computer] exit_port | PAGIS_COMPUTER_EXIT_PORT | 4403 | The TCP port of the exit listener. The Exit Proxy of each Agent's Computer in Home mode sends its connections there, and the daemon carries them through the Person's Home Exit. It binds every interface and answers a Computer's token alone. The egress rules open it to the Computers and close it to everything else (PAGIS_EXIT_PORT of deploy/egress.sh). A server without those rules keeps the port closed in its firewall. A Local Installation opens no exit listener. |
[computer] model_port | PAGIS_COMPUTER_MODEL_PORT | 4404 | The TCP port of the Harness Model Endpoint. The coding harness of a Coding Session in a Computer sends its model requests there, and the daemon sends each one to the provider with the Org's key, under the Spend Cap. It binds every interface on both kinds of installation and answers the token of a running Coding Session alone. The egress rules open it to the Computers and close it to everything else (PAGIS_MODEL_PORT of deploy/egress.sh). A server without those rules keeps the port closed in its firewall. |
[model_request_capture] enabled | None | false | The Model Request Capture System Setting: whether the daemon keeps a copy of each model request of a Run and the answer of the provider (ADR-0031). Only an Administrator reads a copy, on the page of the Run. Turning it off deletes every copy. A Backup holds none. |
[model_request_capture] retention_days | None | 7 | How many days the daemon keeps a copy, from 1 to 30. The daily retention sweep deletes an older copy. |
[computer] home_exit | None | true | The Home Exit System Setting: whether the People of the server may send their Computers' connections through a Home Exit. An Administrator turns it off in the Settings view of the Administration Interface. |
bind = "10.0.1.7"
public_origin = "https://pagis.example.net"
trusted_proxy = "10.0.1.6"
[administration]
port = 4401
bind = "127.0.0.1"
[product_app]
links = [
{ label = "Servers", url = "https://team.example.net/servers" },
{ label = "Help", url = "https://team.example.net/help" },
{ label = "Account", url = "https://team.example.net/account" },
]
[database]
url = "postgres://pagis:<password>@127.0.0.1:5432/pagis"Bind the private interface the proxy is on, not 0.0.0.0, where the
network allows it. The daemon then answers the proxy alone, and a firewall
rule is a second line of defence rather than the only one.
An Administrator changes the port, the Docker endpoint, the log level, the
anonymous analytics, the Model Request Capture and the Home Exit in the
Settings view of the
Administration Interface, and the daemon writes config.toml itself. The timezone is each Person's own: their browser or
Client App reports it at their first sign-in, and they change it in
Settings → Timezone of the Product App. The clock of the server is
never a Person's timezone.
A change to the port, the log level or Remote Access takes effect on a
restart. The daemon then exits with code 75, and a supervisor starts it
again: the Client App, or the restart policy of the compose deployment.
Each of them sets PAGIS_SUPERVISED=1, and the Settings view then waits for
the new process. A daemon that a person started by hand has no supervisor, so
the Settings view says to run pagis again. A supervisor of your own, such as
a systemd unit with Restart=on-failure, sets PAGIS_SUPERVISED=1 too.
--port and PAGIS_PORT override the port of config.toml for one run, and
the Settings view shows both ports while they differ.
When the deployment owns these controls, set [administration] hide to
the sections it owns. With settings hidden, the Administration Interface
shows no Settings view, and the System Settings routes answer 404.
With restart hidden, the restart route answers 404. Settings shows
Save in place of Save and restart, and no Restart now. A saved
change that needs a restart says that it applies at the next start of the
server. Remote Access also saves without a restart request.
The operator owns [product_app] links in config.toml. They are not a
System Setting. A signed-in Person sees them in the account menu beside
their name, or in You on a phone. Each link opens in the same tab.
The Server refuses a list with more than three links, a label with more
than 40 characters, or a URL that is not valid https. With no links,
the Product App shows no extra entry. A change takes effect when the
Server starts again.
The log level applies to the daemon's own lines. The libraries it uses log
warnings and errors alone. PAGIS_LOG replaces the whole filter with a
tracing directive such as debug or info,tantivy=debug.
The Key File
On Linux the daemon reads the Installation Key, which seals
secrets.enc, from the Key File. The file holds 64 hexadecimal characters
and nothing else. The daemon refuses a file that a group or another user
can read, and it does not start without the file.
head -c 32 /dev/urandom | od -An -tx1 | tr -d ' \n' > pagis-secrets-key
chmod 600 pagis-secrets-keyThe key never sits in config.toml and never goes into a backup: an
archive that holds both is a lock beside its key. Keep it where the
deployment keeps its other secrets. A restored server without it opens no
stored secret.