Make it your own
Environment variables, Config Center, model settings and safe defaults.
OwnPilot v0.8.3 · Source-verified guideTwo places, different purposes
The .env file configures the server, database and deployment-related settings. Config Center manages provider API keys and service settings in PostgreSQL. Use Settings in the web interface after the server is running.
Database connection
For source development against the bundled database, use 127.0.0.1 and port 25432. Inside the Compose network, the gateway uses the postgres service on port 5432. Keep a strong POSTGRES_PASSWORD in .env.
POSTGRES_HOST=127.0.0.1
POSTGRES_PORT=25432
POSTGRES_USER=ownpilot
POSTGRES_DB=ownpilot
# Set POSTGRES_PASSWORD to a strong, unique value.
Provider credentials
Add credentials through Config Center rather than placing provider API keys in the database connection string or website. The product CLI also writes configuration to the same database. Restrict who can access your configuration interface.
Keys and backup continuity
Keep OWNPILOT_ENCRYPTION_KEY consistent across restarts if you supply it. If you use the generated key, back up the data directory that contains it. Changing or losing encryption key material can make stored credentials unreadable.
Review the complete template
Server ports, CORS origins, rate limits, MQTT, logging and security options are documented in the product’s .env.example and gateway-specific template. Read the source for the product revision you actually deploy.
Based on the product’s documented behavior. Check the source for your deployed version.
Product READMEEnvironment template