Configuration
Most of what is described here can also be chosen in the website, under Settings; see Infrastructure. A value given in the environment always wins and is then shown there as fixed.
The server reads its environment variables once, at start-up. Nothing is tied to a particular domain or provider: every address and store is yours to choose.
Basics
| Variable | Default | Meaning |
|---|---|---|
GOVERNATE_PUBLIC_URL | http://<address> | The address people use. Written into every protected file. |
GOVERNATE_ADDR | 127.0.0.1:8080 | Where the server listens. |
GOVERNATE_DATA | data | Folder for everything that is stored locally by default. |
GOVERNATE_ADMIN_PASSWORD | Used only with -create-admin. |
The flags -public-url, -addr and -data do the same and take precedence.
Choose the public address earlyIt is signed into every .gvf. Files protected under one address open at that address.
Where things are kept
| What | Variable | Pages |
|---|---|---|
| Records: users, files, shares, activity | GOVERNATE_DB | Databases |
| File keys | GOVERNATE_KEYS_DB | Databases |
| Protected files | GOVERNATE_FILES | Storage |
| The root key that seals the others | GOVERNATE_ROOTKEY | Keys |
File keys can be kept in a different database, on a different machine with different credentials, from both the records and the protected files.
Document viewer
| Variable | Meaning |
|---|---|
GOVERNATE_VIEWER_URL | The viewer's address as browsers reach it. Empty means no viewer. |
GOVERNATE_WOPI_URL | This server's address as the viewer reaches it. Defaults to the public address. |
GOVERNATE_LOCAL_COLLECTOR | The address of an OpenTelemetry collector that runs beside the server, for example http://127.0.0.1:4318. Set by the installer when its activity collector is chosen. Activity records are copied to it from the start, until an administrator saves another choice under Activity export. |
GOVERNATE_VIEWER_INTERNAL_URL | The viewer's address as this server reaches it, for example http://viewer:9980 on a private network. Defaults to the viewer's address. |
See Document viewer.
Sign-in providers
GOVERNATE_GOOGLE_CLIENT_ID, GOVERNATE_GOOGLE_CLIENT_SECRET, GOVERNATE_ENTRA_TENANT_ID, GOVERNATE_ENTRA_CLIENT_ID, GOVERNATE_ENTRA_CLIENT_SECRET. See Sign-in.
In front of the server
Run a proxy that terminates TLS and forwards to the server. The server sets a strict content security policy itself; the website loads nothing from any other address, fonts included.
Health
GET /api/v1/health answers without signing in, for load balancers and monitoring.