Skip to content
GitAudience

Installation

.md

Install GitAudience with Docker Compose or on your own PostgreSQL, and set the environment variables it reads at startup.

GitAudience ships as one Docker image, notifuse/gitaudience, that holds the server, the background worker and the console. The reference compose.yaml runs it with PostgreSQL 18. For a first install step by step, follow the quickstart; this page is the reference.

What runs

The image has three entry points. The compose file starts each as its own service, from the same image:

ServiceRunsNotes
migrategitaudience migrateCreates or updates the database schema, then exits. api and worker start only once it has finished successfully.
apigitaudience apiThe API uses derived signing keys from the shared master secret.
workergitaudience workerThe worker encrypts GitHub App credentials with the shared master secret.
postgresPostgreSQL 18Its data lives in the gitaudience_pg_data volume. Not published on any port.

Run exactly one api and one worker. The limits on sign-in attempts and the result of the limit check are kept in each process’s memory, so a second copy would not share them.

Requirements

  • Docker Engine and Docker Compose v2.
  • A domain name and a reverse proxy with TLS in front of port 3000. PUBLIC_URL must be an https:// address; http:// is accepted only for localhost and 127.0.0.1, because the session cookie is Secure.
  • An SMTP server. The api sends sign-in codes and invitations through it, and the worker sends alerts.
  • Outbound access to GitHub (api.github.com), to your SMTP server and to check.gitaudience.com. Without check.gitaudience.com, every project stays under the free limit: see Licence and limits.

Install with Docker Compose

Put the deployment files in an empty directory:

gitaudience/
├── compose.yaml
├── backup.sh
└── postgres/
    ├── roles.sql
    └── initdb/
        └── 10-roles.sh

Create .env next to compose.yaml with the required variables, then start:

docker compose up -d

GitAudience uses one non-superuser account that owns its dedicated PostgreSQL 18 database. Give migrate, API and worker the same connection settings. The bootstrap administrator postgres remains available only through the local Unix socket, without a password or network login.

Warning

PostgreSQL reads POSTGRES_PASSWORD when initialising an empty volume. Editing .env does not change an existing password: change the account password in PostgreSQL first, then update the configuration.

The compose file names its project gitaudience, so the database volume is gitaudience_pg_data wherever the directory sits. docker compose down -v deletes it, with all your data.

Behind a reverse proxy

Send every path of your domain to port 3000. One process serves the console, /api and /mcp at the same origin, so the proxy has a single target.

TRUST_PROXY tells the api how many proxies sit in front of it, so it reads the visitor’s IP address from the right X-Forwarded-For entry. The reference compose file sets it to 1. Set it to the number of proxies you run.

The compose file publishes port 3000 on every interface of the server. API_PORT changes the port on the server side. When the proxy runs on the same server, set API_BIND=127.0.0.1 so that port 3000 only answers on the server itself.

Deploy on Coolify

  1. Create a Docker Compose application from https://github.com/Notifuse/gitaudience. Set Base Directory to /deploy and Docker Compose Location to /compose.coolify.yaml. This loads the PostgreSQL initialisation files from deploy/postgres.
  2. Assign your HTTPS domain to the api service on container port 3000, for example https://audience.example.com:3000 in the Coolify domain field. Set PUBLIC_URL to the public address https://audience.example.com.
  3. In Environment Variables, set ROOT_EMAIL, SECRET_KEY (generate it with openssl rand -base64 32), SMTP_HOST, SMTP_PORT and SMTP_FROM_EMAIL. Set SMTP_USERNAME and SMTP_PASSWORD if your relay uses authentication. Use your provider’s port, typically 587 for STARTTLS or 465 for implicit TLS. SMTP_PORT must be available when Coolify resolves the Compose file.
  4. Coolify generates SERVICE_PASSWORD_POSTGRES. On first boot with an empty volume, PostgreSQL uses it for the gitaudience account shared by migrate, api and worker. Keep that value with the database volume and back up SECRET_KEY.
  5. Check that the selected GITAUDIENCE_VERSION tag exists on Docker Hub, then deploy. Check that migrate exits with code 0, /health returns 200, and your owner email receives a sign-in code.

Use your own PostgreSQL

GitAudience uses one non-superuser account that owns its dedicated PostgreSQL 18 database. Give migrate, API and worker the same connection settings. The bootstrap administrator postgres remains available only through the local Unix socket, without a password or network login.

For an external database, have its administrator create one non-superuser owner and a dedicated database. The migrations create the trusted extensions pg_trgm and btree_gin under that owner. Remove the PostgreSQL service and the structured connection settings from the application services, then set the same URL on all three:

DATABASE_URL=postgres://gitaudience:<percent-encoded-password>@<host>:5432/gitaudience

The reference Compose file passes PGHOST, PGPORT, PGDATABASE, PGUSER and POSTGRES_PASSWORD separately. Use these structured settings or DATABASE_URL, never both. Special characters in the password are supported; percent-encode credentials when writing a URL yourself. Keep $ literal according to your environment-file quoting rules.

Environment variables

GitAudience checks its variables at startup. A missing or invalid variable stops the process with a message that names the variable, never its value. An empty variable counts as missing.

Required variables

VariableServiceWhat it is
PUBLIC_URLapi, workerThe address of the console, such as https://audience.example.com. https:// only, except for localhost and 127.0.0.1. See Changing the domain.
ROOT_EMAILapiThe first owner. At every start, GitAudience makes sure this address is an owner who cannot be removed.
SECRET_KEYapi, workerThe API and worker share SECRET_KEY. The API derives separate keys for sign-in and GitHub callback signatures; the worker encrypts GitHub App credentials with the unchanged master key.
SMTP_HOSTapi, workerYour SMTP server.
SMTP_PORTapi, workerIts port, such as 587 or 465.
SMTP_FROM_EMAILapi, workerThe sender address of GitAudience’s emails.
POSTGRES_PASSWORDpostgres, migrate, api, workerPassword of the single application account gitaudience, shared by migrate, API and worker.

The reference Compose file passes PGHOST, PGPORT, PGDATABASE, PGUSER and POSTGRES_PASSWORD separately. Use these structured settings or DATABASE_URL, never both. Special characters in the password are supported; percent-encode credentials when writing a URL yourself. Keep $ literal according to your environment-file quoting rules.

Warning

Keep SECRET_KEY with your backups. Without it, the worker can’t read the secrets of your GitHub Apps: it logs an error that names the cause, and the only way out is to disconnect each App in Settings › GitHub Apps and connect it again.

Optional variables

VariableServiceDefaultWhat it does
GITAUDIENCE_IMAGEcomposenotifuse/gitaudience:v1.5.0The image and its version, such as notifuse/gitaudience:<version>.
GITAUDIENCE_VERSIONcomposev1.5.0Docker image release tag when GITAUDIENCE_IMAGE is not overridden.
SMTP_USERNAME, SMTP_PASSWORDapi, workeremptySMTP login. Give both or neither: without them, mail is sent without authentication; one without the other stops the start.
SMTP_FROM_NAMEapi, workerGitAudienceThe sender name.
SMTP_USE_TLSapi, workertruetrue: TLS from the first byte on port 465, STARTTLS required on any other port. false: no TLS at all, even if the server offers STARTTLS, for a local relay.
TRUST_PROXYapi1 in the compose file, 0 in the imageNumber of proxies in front of the api.
API_PORTcompose3000The port published on the server.
API_BINDcompose—Host interface for the published port; use 127.0.0.1 when the reverse proxy runs on the same host.
LOG_LEVELallinfofatal, error, warn, info, debug, trace or silent.
RELEASE_CHECK_ENABLEDapitruefalse disables update checks from an owner’s browser through check.gitaudience.com. Requests send the installed version, browser language and timezone. Disabled in demo mode.

The image also reads a few variables that the reference compose file does not pass:

VariableServiceDefaultWhat it does
PORTapi3000The port the api listens on inside the container.
GITHUB_URL, GITHUB_API_URLapi, workerhttps://github.com, https://api.github.comThe GitHub addresses, changed only to test against a fake GitHub.

Signing in without email

If SMTP fails, or a user can’t receive codes, an administrator with access to the server can create a one-time sign-in link:

docker compose exec api gitaudience login-link you@example.com

The link works once, for 15 minutes, and only for an active user. Open it in a browser, not in a chat app, whose link preview would use it up. The logs never contain the link or the address.

Health check

GET /health answers 200 with {"status":"ok"} when the api reaches its database within 2 seconds, and 503 with {"status":"unavailable"} otherwise. It needs no session and returns nothing else. The compose file uses it as the health check of the api container. The worker has no health route.

Demo configuration

Use the dedicated demo Compose file in deploy/demo/. It provides automatic public access without a sign-in code, read-only data and a daily reset at 04:00 UTC. Supply POSTGRES_PASSWORD and PUBLIC_URL; DEMO_MODE=true is set by Compose. DEMO_SEED defaults to 1 and DEMO_RESET_CRON to 0 4 * * *. Do not supply SECRET_KEY, ROOT_EMAIL or SMTP settings. Never enable demo mode on a database containing real data.