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.tomlVariableDefaultWhat it is
portPAGIS_PORT4400The product port.
bindPAGIS_BIND127.0.0.1The Bind Address of the product port. Name the private interface the proxy is on, or 0.0.0.0 for every interface.
public_originPAGIS_PUBLIC_ORIGINDerived from bind and portThe Public Origin: the scheme, host and port a browser reaches the installation at. The CORS answer names it.
trusted_proxyPAGIS_TRUSTED_PROXYNoneThe Trusted Proxy: the one address whose X-Forwarded-For and X-Forwarded-Proto the daemon believes.
[remote_access] enabledPAGIS_REMOTE_ACCESSOffRemote 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] portPAGIS_ADMINISTRATION_PORT4401The Administration Port.
[administration] bindPAGIS_ADMINISTRATION_BIND127.0.0.1Its Bind Address, loopback whatever the product port binds.
[administration] path_prefixNone""The page path prefix under the Public Origin, such as /admin. Empty uses the Administration Port origin. API routes keep their root paths.
[administration] hideNone[]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] linksNone[]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] urlPAGIS_DATABASE_URLNoneThe postgres:// URL of the database that holds the records. A server does not start without it.
[secrets] key_fileNone/run/secrets/pagis-secrets-keyThe Key File (Linux).
[screen] advertise_ipPAGIS_SCREEN_ADVERTISE_IP127.0.0.1The address browsers reach the Media Relay at.
[screen] media_port_first, media_port_lastPAGIS_SCREEN_MEDIA_PORT_FIRST, PAGIS_SCREEN_MEDIA_PORT_LAST50000, 50099The Media Relay's UDP range.
[screen] remote_access_turn_portNone4402The 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_portPAGIS_COMPUTER_EXIT_PORT4403The 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_portPAGIS_COMPUTER_MODEL_PORT4404The 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] enabledNonefalseThe 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_daysNone7How many days the daemon keeps a copy, from 1 to 30. The daily retention sweep deletes an older copy.
[computer] home_exitNonetrueThe 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-key

The 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.

Edit on GitHub

On this page