Environment Variables
ScanPick is configured entirely through environment variables. No config files, no YAML, no JSON settings.
Required
Section titled “Required”| Variable | Description | Example |
|---|---|---|
DATABASE_CONNECTION_STRING | PostgreSQL connection string | Host=localhost;Database=scanpick;Username=scanpick;Password=... |
JWT_SECRET | JWT signing key (64+ characters) | Generated via openssl rand -base64 48 | tr -d '/+=' | head -c 64 |
Optional
Section titled “Optional”| Variable | Default | Description |
|---|---|---|
ASPNETCORE_URLS | http://+:5000 | API listen address |
ASPNETCORE_ENVIRONMENT | Production | Set to Development for detailed errors + Scalar API explorer |
DISABLE_AUTO_SEED | false | Skip automatic database seeding on first startup |
SETUP_TOKEN | (none) | Require first-run setup page before API serves requests |
Connection String Format
Section titled “Connection String Format”Host=<host>;Port=<port>;Database=<database>;Username=<user>;Password=<password>Examples:
# Local Docker PostgreSQLDATABASE_CONNECTION_STRING="Host=localhost;Port=5432;Database=scanpick;Username=scanpick;Password=devpassword"
# Remote PostgreSQL with SSLDATABASE_CONNECTION_STRING="Host=db.example.com;Port=5432;Database=scanpick;Username=scanpick;Password=...;SSL Mode=Require"Setting Variables
Section titled “Setting Variables”Single Binary
Section titled “Single Binary”export DATABASE_CONNECTION_STRING="Host=localhost;Database=scanpick;Username=scanpick;Password=..."export JWT_SECRET="your-64-char-secret"./ScanPick.ApiDocker Compose
Section titled “Docker Compose”Set variables in the .env file in the project root:
POSTGRES_PASSWORD=devpasswordJWT_SECRET=your-64-char-secretDocker (Manual)
Section titled “Docker (Manual)”docker run -e DATABASE_CONNECTION_STRING="..." -e JWT_SECRET="..." scanpick-apiProduction Checklist
Section titled “Production Checklist”- Generate a strong
JWT_SECRET(64+ random characters) - Set
ASPNETCORE_ENVIRONMENTtoProduction - Use a dedicated PostgreSQL user (not
postgressuperuser) - Enable SSL for database connections over the network
- Configure a reverse proxy for TLS termination
- Set up regular PostgreSQL backups
- Verify the API starts successfully and serves the dashboard