Configuration in Netstamp comes from three places:
- Deployment configuration controls the controller, database, public origin, secrets, and workers through environment variables. Changes require a controller restart.
- System settings control access policy, email, and external identity providers at runtime.
- Build configuration compiles public analytics and documentation values into the web bundles.
Choose the source that owns the setting you want to change. A runtime setting cannot override deployment configuration, and changing a build variable on an existing container does not rebuild its frontend.
Deployment configuration
The controller reads environment variables and an optional .env file from the working directory or server/. Environment variables take precedence over values loaded from .env. Docker Compose reads the project .env and forwards the supported values to the container.
Durations use Go syntax such as 250ms, 5s, 30m, or 168h. Boolean values use true or false. Keep secrets stable, unique, and outside version control.
The release .env.example contains the required secrets and production URL settings. Add only the overrides you need from this page.
Runtime system settings
Settings that operators may change while Netstamp is running are stored by the controller under Admin → System settings:
| Section | Runtime configuration |
|---|---|
| Access | Account creation, email verification, project creation, and credential changes |
| SMTP | Mail server, sender, TLS, timeout, and encrypted credentials |
| OIDC | Generic OpenID Connect provider and encrypted client secret |
| Google provider, hosted-domain allowlist, and encrypted client secret | |
| GitHub | GitHub provider and signup behavior |
SMTP and provider credentials are encrypted with SYSTEM_SETTINGS_ENCRYPTION_KEY. Web analytics are build-time settings and are not configured in the administration UI.
Compose variables
| Variable | Default | Purpose |
|---|---|---|
NETSTAMP_IMAGE | yorukot/netstamp | Controller image repository |
NETSTAMP_VERSION | latest | Controller and migration image tag |
TIMESCALEDB_IMAGE | timescale/timescaledb:2.20.3-pg16 | Database image |
NETSTAMP_PORT | 3000 | Host port published to controller port 8080 |
Pin image values for production. The logical Compose volume is netstamp-postgres.
Controller core
| Variable | Default | Purpose |
|---|---|---|
APP_ENV | local | Runtime environment; non-local enables secure session-cookie behavior |
DEMO_MODE | false | Enables backend demo restrictions |
SERVICE_NAME | controller | Service identity used by logs and telemetry |
LOG_LEVEL | info | debug, info, warn, error, dpanic, panic, or fatal |
LOG_PSEUDONYM_KEY | development placeholder | Stable key used to pseudonymize sensitive log identifiers |
SYSTEM_SETTINGS_ENCRYPTION_KEY | development placeholder | Stable key used to encrypt stored administrative secrets |
SHUTDOWN_TIMEOUT | 10s | Graceful controller shutdown deadline |
Every non-local deployment must replace the database password and all four application keys with independent random values of at least 32 characters.
HTTP and public origin
| Variable | Default | Purpose |
|---|---|---|
PUBLIC_BASE_URL | empty | Public origin for callbacks, links, OpenAPI, and probe installers |
HTTP_ADDR | :8080 | Controller listen address |
WEB_DIR | empty | Built frontend directory; the production image sets /app/web |
REQUEST_TIMEOUT | 10s | Request context timeout |
HTTP_READ_HEADER_TIMEOUT | 5s | Header read timeout |
HTTP_READ_TIMEOUT | 15s | Request read timeout |
HTTP_WRITE_TIMEOUT | 15s | Response write timeout |
HTTP_IDLE_TIMEOUT | 60s | Keep-alive idle timeout |
HTTP_TRUSTED_PROXIES | empty | Comma-separated proxy IP addresses or CIDR prefixes |
PUBLIC_BASE_URL must contain only the scheme and host. Non-local environments require it, and production requires HTTPS.
Database
| Variable | Default | Purpose |
|---|---|---|
DATABASE_HOST | localhost | PostgreSQL host; Compose uses postgres |
DATABASE_PORT | 5432 | PostgreSQL port |
DATABASE_USER | netstamp | Database user |
DATABASE_PASSWORD | netstamp | Database password |
DATABASE_NAME | netstamp | Database name |
DATABASE_SSLMODE | disable | PostgreSQL SSL mode |
DB_MAX_CONNS | 10 | Maximum connection-pool size |
DB_MIN_CONNS | 0 | Minimum idle connection-pool size |
DB_MAX_CONN_LIFETIME | 1h | Maximum lifetime of a pooled connection |
DB_MAX_CONN_IDLE_TIME | 30m | Maximum idle time of a pooled connection |
Use TLS verification when database traffic crosses an untrusted network. The standard Compose stack keeps it on the private Compose network.
Sessions, passwords, and tokens
| Variable | Default | Purpose |
|---|---|---|
AUTH_SESSION_HASH_KEY | development placeholder | HMAC/hash key for opaque session tokens |
AUTH_API_TOKEN_HASH_KEY | development placeholder | HMAC/hash key for personal API tokens |
AUTH_SESSION_IDLE_TTL | 24h | Session inactivity limit |
AUTH_SESSION_ABSOLUTE_TTL | 168h | Maximum session lifetime |
AUTH_SESSION_TOUCH_INTERVAL | 5m | Minimum interval between session activity writes |
AUTH_SUDO_TTL | 5m | Recent-authentication validity for sensitive actions |
AUTH_EXTERNAL_FLOW_TTL | 10m | OAuth/OIDC flow lifetime |
AUTH_PASSWORD_RESET_TOKEN_TTL | 30m | Password-reset link lifetime |
AUTH_PASSWORD_RESET_RATE_LIMIT_WINDOW | 1h | Password-reset rate-limit window |
AUTH_PASSWORD_RESET_IP_LIMIT | 10 | Requests per IP in the window |
AUTH_PASSWORD_RESET_EMAIL_LIMIT | 3 | Requests per email in the window |
AUTH_ARGON2ID_MEMORY_KIB | 65536 | Argon2id memory cost |
AUTH_ARGON2ID_ITERATIONS | 3 | Argon2id iteration cost |
AUTH_ARGON2ID_PARALLELISM | 4 | Argon2id parallelism |
Changing a hash key invalidates credentials protected by it.
Background workers
| Variable | Default | Purpose |
|---|---|---|
ASSIGNMENT_REFRESH_WORKER_ENABLED | true | Retry queued assignment refresh jobs |
ASSIGNMENT_REFRESH_WORKER_INTERVAL | 5s | Refresh polling interval |
ASSIGNMENT_REFRESH_WORKER_BATCH_SIZE | 25 | Jobs claimed per cycle |
ASSIGNMENT_REFRESH_WORKER_STALE_TIMEOUT | 1m | Reclaim timeout for interrupted work |
ALERT_EVALUATION_ENABLED | true | Run alert evaluation |
NOTIFICATION_WORKER_ENABLED | true | Deliver queued incident notifications |
NOTIFICATION_WORKER_INTERVAL | 5s | Notification polling interval |
NOTIFICATION_WORKER_BATCH_SIZE | 25 | Deliveries claimed per cycle |
NOTIFICATION_WORKER_STALE_TIMEOUT | 1m | Reclaim timeout for interrupted delivery |
NOTIFICATION_HTTP_TIMEOUT | 10s | Webhook, Slack, Discord, and Telegram timeout |
Disabling a worker pauses its work; it does not delete configuration or queued jobs.
Tracing
| Variable | Default | Purpose |
|---|---|---|
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT | empty | OTLP HTTP trace-ingest endpoint |
Leave the endpoint empty to disable trace export.
Probe agent
The installer writes the controller URL, ID, and secret. The remaining values are local tuning overrides.
| Variable | Default | Purpose |
|---|---|---|
NETSTAMP_PROBE_CONTROLLER_URL | required | Controller origin, without /api/v1 |
NETSTAMP_PROBE_ID | required | Probe UUID |
NETSTAMP_PROBE_SECRET | required | Probe runtime secret |
NETSTAMP_PROBE_HTTP_TIMEOUT | 10s | Runtime API request timeout |
NETSTAMP_PROBE_MAX_WORKERS | 128 | Concurrent execution worker limit |
NETSTAMP_PROBE_RESULT_QUEUE_SIZE | 10000 | Buffered result capacity |
NETSTAMP_PROBE_RESULT_BATCH_SIZE | 100 | Maximum submission batch size |
NETSTAMP_PROBE_RESULT_FLUSH_INTERVAL | 5s | Maximum partial-batch wait |
NETSTAMP_PROBE_ASSIGNMENT_TTL | 10m | Local assignment freshness limit |
NETSTAMP_PROBE_SHUTDOWN_TIMEOUT | 10s | Graceful shutdown deadline |
NETSTAMP_PROBE_HEARTBEAT_INTERVAL | 30s | Heartbeat cadence |
NETSTAMP_PROBE_ASSIGNMENT_POLL_INTERVAL | 30s | Assignment polling cadence |
NETSTAMP_PROBE_INITIAL_BACKOFF | 1s | Initial retry delay |
NETSTAMP_PROBE_MAX_BACKOFF | 30s | Maximum retry delay |
NETSTAMP_PROBE_MAX_ATTEMPTS | 5 | Attempts before the current retry cycle fails |
NETSTAMP_PROBE_METRICS_ADDR | empty | Optional Prometheus listener, such as 127.0.0.1:9091 |
NETSTAMP_PROBE_PPROF_ADDR | empty | Optional pprof listener, such as 127.0.0.1:6060 |
NETSTAMP_PROBE_LOG_LEVEL | info | debug, info, warn, or error |
All numeric capacities and durations must be greater than zero. Maximum backoff must be at least the initial backoff.
Web application build variables
The browser always calls the same-origin API path generated from the OpenAPI contract (/api/v1). VITE_NETSTAMP_API_PROXY_TARGET only controls the local Vite development proxy and is not compiled into the browser bundle.
Demo credentials are public values compiled only into the dedicated demo image. The remaining values configure optional trackers and are also compiled into the frontend. Changing a container’s runtime environment does not modify an already-built bundle.
| Variable | Default | Purpose |
|---|---|---|
VITE_NETSTAMP_API_PROXY_TARGET | http://localhost:8080 | Vite development proxy target |
VITE_NETSTAMP_DEMO_EMAIL | [email protected] | Demo-image login email |
VITE_NETSTAMP_DEMO_PASSWORD | password | Demo-image login password |
VITE_NETSTAMP_GOOGLE_TAG_ID | empty | Google tag ID |
VITE_NETSTAMP_CLARITY_PROJECT_ID | empty | Microsoft Clarity project ID |
VITE_NETSTAMP_META_PIXEL_ID | empty | Meta Pixel ID |
VITE_NETSTAMP_POSTHOG_KEY | empty | Public PostHog project key |
VITE_NETSTAMP_POSTHOG_HOST | https://us.i.posthog.com | PostHog ingest host |
VITE_NETSTAMP_PLAUSIBLE_DOMAIN | empty | Domain reported to Plausible |
VITE_NETSTAMP_PLAUSIBLE_SCRIPT_URL | https://plausible.io/js/script.js | Plausible script URL |
VITE_NETSTAMP_UMAMI_WEBSITE_ID | empty | Umami website ID |
VITE_NETSTAMP_UMAMI_SCRIPT_URL | https://cloud.umami.is/script.js | Umami script URL |
VITE_NETSTAMP_TRACKING_CONSENT_MODE | regional | regional, always, or immediate |
VITE_NETSTAMP_TRACKING_CONSENT_COUNTRIES | built-in regional list | ISO 3166-1 alpha-2 country codes |
Every browser-visible VITE_* value is public; never put a private secret in one.
Documentation build variables
| Variable | Default | Purpose |
|---|---|---|
PUBLIC_SITE_URL | https://netstamp.dev | Canonical documentation origin |
PUBLIC_NETSTAMP_APP_BASE_URL | https://app.netstamp.dev | Product links from documentation |
The docs support the same optional trackers and consent controls with the PUBLIC_NETSTAMP_* prefix. Google and Meta use only the canonical PUBLIC_NETSTAMP_GOOGLE_TAG_ID and PUBLIC_NETSTAMP_META_PIXEL_ID names.