Administration
The Administration Port, and how to make the first Administrator.
The daemon serves the Administration Interface on a second listener of the same process: the spend of each Person, the People, who is signed in, the Hosts, the containers and disk of each Person, the provider setup, the System Settings, the Plugins, the restart and the health of the daemon. These answer on the Administration Port alone. The product port serves each Person's own settings. An Administrator sees an Org group after System in the Product App's Settings, with links to each offered view and each configured link. The phone settings list shows the same group. A Member sees no Org group. A loopback address shows the SSH tunnel command below the items.
Every route on the port needs a signed-in Administrator, and a Member gets nothing. Two routes answer without one: the first-run setup and the password sign-in.
Keep it private. The port binds loopback by default, so nothing off the machine reaches it. Reach it over an SSH tunnel:
ssh -L 4401:127.0.0.1:4401 pagis.example.netThen open http://127.0.0.1:4401/ and sign in with an address and a
password.
To reach it from an Administrator's own network, name that interface in
[administration] bind and firewall the port to that network. The daemon
terminates no TLS on this port, so a deployment that exposes it puts a
proxy in front of it. The proxy controls who can reach the Administration Port.
A daemon whose Administration Port is taken names the port and the setting
that moves it. pagis --port moves the product port alone.
A page path prefix
A proxy can serve the Administration Interface under the Public Origin.
Name the path in config.toml:
[administration]
path_prefix = "/admin"The Product App links then open section paths such as
<public_origin>/admin/people. The Administration
Interface reads section paths such as /admin/sessions and keeps navigation
under /admin. With no prefix, it uses the Administration Port origin and
paths such as /sessions.
The prefix starts with /, has no final slash, and has nonempty segments.
Each segment contains letters, digits, -, ., _ or ~. A segment cannot
be . or ... An invalid prefix stops the start and the error names the
setting.
The proxy sends the page paths without removing the prefix, and sends the
administration API routes to the Administration Port. API paths stay at /api/v1/...; they do not take the
prefix. Built assets load from /assets/..., which both ports serve.
The proxy applies the same access controls to the administration API as to
the page.
The offered sections
The Administration Interface reads GET /api/v1/administration/sections
before it draws the navigation. The Product App reads the same sections and
links from the Administration Address in GET /api/v1/user and calls no
route of the Administration Port. A Member receives no Administration
Address. The sections route needs a signed-in Administrator.
It names the offered sections in display order:
{"sections":["spend","people","sessions","hosts","resources","providers","settings","plugins","health","restart"],"links":[]}All sections are offered by default with the Native Parts. A deployment can
hide hosts, providers, settings and restart in config.toml:
[administration]
hide = ["providers", "settings", "restart"]Hide hosts when the deployment serves no Hosts, providers when the
deployment owns provider setup, settings when
the deployment owns the System Settings, and restart when the deployment
owns server restarts. Each name is optional. An unknown name stops the
start, and the error names it. Spend, People, Sessions, Resources, Plugins
and Health are always offered.
A hidden section has no routes. An API request to it answers 404,
also for an Administrator. An address of a
hidden view opens the first offered view. With restart hidden, Settings
shows Save and no Restart now.
A saved change that needs a restart applies at the next start of the server.
Hosts is a list in Sessions and has no navigation item. Sessions shows
the list only when the server offers hosts. A server built without the
Native Parts does not offer hosts.
Navigation links
The operator can name up to three links in config.toml:
[administration]
links = [
{ label = "Servers", url = "https://team.example.com/servers" },
{ label = "Help", url = "https://team.example.com/help" },
]Each label has at most 40 characters, and each URL uses https. An invalid
link stops the start, and the error names the setting. The Administration
Interface reads the links with the offered sections and shows them in the
navigation, in configuration order. The Product App shows them after the
section links in the Org group. Each link opens in the same tab. With
no links, the navigation shows no extra entry.
The role of a Person
The People section has a role control for each Person: Administrator or
Member. An Administrator changes the role through
PUT /api/v1/administration/people/{user_id}/role with
{"role":"administrator"} or {"role":"member"}.
The Org keeps at least one enabled Administrator. A disabled Administrator
does not count. An Administrator can demote themselves when another enabled
Administrator exists. A demotion of the last enabled Administrator answers
409 with a message that states this rule. Each role change adds an audit
event in the Org's Workspace. The next request uses the Person's current role.
The first Administrator
A server boots with an Org and a seeded Workspace and nobody who can sign in. Until the first Administrator exists, the start banner and the sign-in page of the product port say so and name the Administration Port. Two paths close that gap, and both write the same rows:
- From the environment. Set
PAGIS_ADMIN_EMAIL,PAGIS_ADMIN_PASSWORD(at least 12 characters) and the provider key variables (ANTHROPIC_API_KEY,OPENAI_API_KEY,OPENROUTER_API_KEY,DEEPGRAM_API_KEY,ELEVENLABS_API_KEY) before the first start. The daemon reads them at the first start that finds nobody who can sign in, and keeps the keys in its sealed secret file. The variables can stay in the configuration: a later start never overwrites a password that somebody changed. - From a browser. Leave them empty, open the tunnel to 4401 and finish
setup there. Server Setup makes the first Administrator on the
Administration Port only:
POST /api/v1/setuptakes the address, the password and the keys and signs the new Administrator in, and it answers on no other port. Only a person who can reach the Administration Port can make the first Administrator.GET /api/v1/setupnames the model providers the installation takes a key for. The product port answers it too, because its sign-in page names the Administration Port from it. The routes answer only while the installation holds no Client Credential and no Administrator holds a password. They answer410 Gonefrom the first password onwards. The first password is one claim: of two requests at once, one makes the Administrator, and the other answers410 Goneand keeps no provider key.
Either way no Person and no client takes a model key: the Administrator configures the installation one time, for everybody. The providers of these keys therefore get the model requests of every Person: the messages, the memory and the tool results, with the screenshots of the Computers (What the model provider receives). There is no sign-up. The Administrator creates each Person in the Administration Interface, and each new Person gets a seeded Workspace: one Agent, its direct Channel, the Model Aliases and the Report Schedule. The answer shows the Person's invite, a Sign-In Link that is good for seven days and one use. Send it to the Person, who opens it to sign in. A first password is optional (Sign-In Links). The new Workspace takes the timezone of the Administrator's own Workspace until the Person's first sign-in, which takes the timezone of their browser or Client App.
A Schedule that comes due while no provider holds a key starts no Run. It waits, and it runs when an Administrator stores a key.
Nobody on a server answers a model question. The default Model Alias of a
new Person names the models of the Administrator's own route whose provider
holds a key. Each well-known Model Alias has a Model Preference, the models
Pagis selects for it, best first:
| Alias | Model Preference |
|---|---|
default | openai/gpt-6-luna, openrouter/openai/gpt-6-luna, anthropic/claude-sonnet-5-5 |
transcribe | deepgram/nova-3, elevenlabs/scribe_v2, openai/gpt-4o-transcribe, openrouter/openai/gpt-4o-transcribe |
speak | elevenlabs/eleven_flash_v2_5, deepgram/aura-2, openai/gpt-4o-mini-tts, openrouter/google/gemini-3.8-flash-tts |
phone | openai/gpt-live-1, openai/gpt-realtime-2.1 |
A key that the Administrator stores or removes in Providers, and a key
in the environment at a start, gives each alias that no provider with a key
serves the preferred models of the first provider with a key that serves
it. For default, that provider must also list the model; else the alias
takes the newest model the provider lists. A route that still reaches a
provider stays as it is.
The Administrator also sets up the providers in the Administration Interface: the Google OAuth client, the carrier account and its SIP sign-in, and the mail domain. A Person then connects their own Google account, buys an Agent Phone Number or makes an Agent Mailbox in the Product App. A Mailbox Provider needs a domain and capabilities. Migadu and manual providers also use IMAP and SMTP endpoints. A provider supplied by an Embedder can read and send mail without these endpoints. See Agent Mailboxes.
The Google OAuth client
No Person connects a Google account until an Administrator sets up the Google OAuth client. On a Local Installation the owner is the Administrator. A Person then signs in at Google and allows Pagis, and types no client and no account (ADR-0012).
- In the Google Cloud console, enable the Gmail and Google Calendar APIs.
- Make an OAuth client of the type Web application, with the redirect URI that the Administration Interface shows.
- Publish the consent screen, or make it Internal for a Google Workspace organization. While the consent screen is in Testing, Google ends each sign-in after seven days.
- Paste the client ID and the client secret in the Administration
Interface. The secret goes to
secrets.enc.
Removing the client stops every Google Connection from refreshing its token, and each Person connects again against the next client.
For a public consent screen, Google verifies the Installation OAuth Client. The disclosure step in the Product App and the help page Delete the Google data that Pagis holds are the parts of the app that this verification looks for. The disclosure comes before Google's consent screen in both layouts. It says which data Pagis reads, where it copies the data, and what sprites send to their model provider. The help page gives the deletion steps and names the copies that stay. These parts follow the Google Workspace user data and developer policy.