PostgreSQL Admin Playbook
Environment Variables
Update
.envwithPGADMIN_DEFAULT_EMAIL,PGADMIN_DEFAULT_PASSWORD, andPGADMIN_CONFIG_SERVER_MODE=True.Master password support is optional; skip
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIREDandPGADMIN_CONFIG_MASTER_PASSWORDif the team does not use it.Keep
.envout of version control and rotate the secrets periodically.
Restart Admin Stack
docker compose -f infrastructure/docker/docker-compose.yml --env-file .env --profile admin down
docker volume rm docker_pgadmin_data
docker compose -f infrastructure/docker/docker-compose.yml --env-file .env --profile admin up -d
Access pgAdmin Securely
SSH into the host with local port forwarding:
ssh -L 5050:127.0.0.1:5050 user@freeinference.org.Open
http://localhost:5050, sign in with the configured email/password. If a master password is configured, unlock with it; otherwise continue directly.
Register Primary Database
In pgAdmin, right-click
Servers→Register→Server.General tab: name the connection (e.g.,
Primary Postgres).Connection tab:
Host name/address:postgresPort:5432Maintenance database: value ofDB_NAMEUsername: value ofDB_USERPassword: value ofDB_PASSWORD
Save and expand the new server to inspect
freeinference_db; leave the defaultpostgresdatabase for maintenance tasks only.
Post-Restart Checks
docker compose psto confirm bindings on127.0.0.1.Run a smoke query via pgAdmin (e.g.,
SELECT 1;).Log findings in the ops channel and schedule password rotation reminders.