PetHealth is configured entirely with environment variables. With Docker Compose, put them in a .env file next to docker-compose.yml (env_file: .env), or list them under environment:. Restart the container after changing them.
Required. Secret used to sign sessions. Generate it with openssl rand -hex 32. The server exits on startup if it’s missing. Changing it signs everyone out.
TZ
UTC
Server time zone (e.g. Europe/Madrid, America/Bogota). Used for “today” in emails, the calendar feed and backups. The web app uses each browser’s own date for the dashboard.
PORT
3001
Port inside the container. You normally change the host side of the port mapping instead ("8080:3001").
DATA_DIR
/app/data
Where the database, uploads and backups are stored. Mount a volume here.
true shows “Sign up” on the login screen, so anyone who can reach the app can create an account. Turn it on only while your family creates their accounts.
LOGIN_RATE_LIMIT
10
Failed sign-in/sign-up attempts allowed per IP every 15 minutes. 0 disables the limit.
TRUST_PROXY
false
Set to true when PetHealth is behind a reverse proxy (e.g. for HTTPS on your LAN), so it uses the real client IP for rate limiting and marks cookies Secure over HTTPS. See Remote access & HTTPS.
Local hour (0–23, in TZ) from which the daily digest is sent.
APP_URL
—
The address you use to open PetHealth (e.g. http://192.168.1.50:3000), used for the “Open PetHealth” button in emails and for links in calendar events. If empty, calendar links use the address the calendar app requested, and emails have no button.
Some things aren’t environment variables because each user sets them in the app, under My account: currency, language, the reminder email address, and the calendar link.