Configure a deployment

Configure the required services and settings for a Netstamp deployment.

Configuration in Netstamp comes from three places:

  1. Deployment configuration controls the controller, database, public origin, secrets, and workers through environment variables. Changes require a controller restart.
  2. System settings control access policy, email, and external identity providers at runtime.
  3. 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:

SectionRuntime configuration
AccessAccount creation, email verification, project creation, and credential changes
SMTPMail server, sender, TLS, timeout, and encrypted credentials
OIDCGeneric OpenID Connect provider and encrypted client secret
GoogleGoogle provider, hosted-domain allowlist, and encrypted client secret
GitHubGitHub 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

VariableDefaultPurpose
NETSTAMP_IMAGEyorukot/netstampController image repository
NETSTAMP_VERSIONlatestController and migration image tag
TIMESCALEDB_IMAGEtimescale/timescaledb:2.20.3-pg16Database image
NETSTAMP_PORT3000Host port published to controller port 8080

Pin image values for production. The logical Compose volume is netstamp-postgres.

Controller core

VariableDefaultPurpose
APP_ENVlocalRuntime environment; non-local enables secure session-cookie behavior
DEMO_MODEfalseEnables backend demo restrictions
SERVICE_NAMEcontrollerService identity used by logs and telemetry
LOG_LEVELinfodebug, info, warn, error, dpanic, panic, or fatal
LOG_PSEUDONYM_KEYdevelopment placeholderStable key used to pseudonymize sensitive log identifiers
SYSTEM_SETTINGS_ENCRYPTION_KEYdevelopment placeholderStable key used to encrypt stored administrative secrets
SHUTDOWN_TIMEOUT10sGraceful 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

VariableDefaultPurpose
PUBLIC_BASE_URLemptyPublic origin for callbacks, links, OpenAPI, and probe installers
HTTP_ADDR:8080Controller listen address
WEB_DIRemptyBuilt frontend directory; the production image sets /app/web
REQUEST_TIMEOUT10sRequest context timeout
HTTP_READ_HEADER_TIMEOUT5sHeader read timeout
HTTP_READ_TIMEOUT15sRequest read timeout
HTTP_WRITE_TIMEOUT15sResponse write timeout
HTTP_IDLE_TIMEOUT60sKeep-alive idle timeout
HTTP_TRUSTED_PROXIESemptyComma-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

VariableDefaultPurpose
DATABASE_HOSTlocalhostPostgreSQL host; Compose uses postgres
DATABASE_PORT5432PostgreSQL port
DATABASE_USERnetstampDatabase user
DATABASE_PASSWORDnetstampDatabase password
DATABASE_NAMEnetstampDatabase name
DATABASE_SSLMODEdisablePostgreSQL SSL mode
DB_MAX_CONNS10Maximum connection-pool size
DB_MIN_CONNS0Minimum idle connection-pool size
DB_MAX_CONN_LIFETIME1hMaximum lifetime of a pooled connection
DB_MAX_CONN_IDLE_TIME30mMaximum 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

VariableDefaultPurpose
AUTH_SESSION_HASH_KEYdevelopment placeholderHMAC/hash key for opaque session tokens
AUTH_API_TOKEN_HASH_KEYdevelopment placeholderHMAC/hash key for personal API tokens
AUTH_SESSION_IDLE_TTL24hSession inactivity limit
AUTH_SESSION_ABSOLUTE_TTL168hMaximum session lifetime
AUTH_SESSION_TOUCH_INTERVAL5mMinimum interval between session activity writes
AUTH_SUDO_TTL5mRecent-authentication validity for sensitive actions
AUTH_EXTERNAL_FLOW_TTL10mOAuth/OIDC flow lifetime
AUTH_PASSWORD_RESET_TOKEN_TTL30mPassword-reset link lifetime
AUTH_PASSWORD_RESET_RATE_LIMIT_WINDOW1hPassword-reset rate-limit window
AUTH_PASSWORD_RESET_IP_LIMIT10Requests per IP in the window
AUTH_PASSWORD_RESET_EMAIL_LIMIT3Requests per email in the window
AUTH_ARGON2ID_MEMORY_KIB65536Argon2id memory cost
AUTH_ARGON2ID_ITERATIONS3Argon2id iteration cost
AUTH_ARGON2ID_PARALLELISM4Argon2id parallelism

Changing a hash key invalidates credentials protected by it.

Background workers

VariableDefaultPurpose
ASSIGNMENT_REFRESH_WORKER_ENABLEDtrueRetry queued assignment refresh jobs
ASSIGNMENT_REFRESH_WORKER_INTERVAL5sRefresh polling interval
ASSIGNMENT_REFRESH_WORKER_BATCH_SIZE25Jobs claimed per cycle
ASSIGNMENT_REFRESH_WORKER_STALE_TIMEOUT1mReclaim timeout for interrupted work
ALERT_EVALUATION_ENABLEDtrueRun alert evaluation
NOTIFICATION_WORKER_ENABLEDtrueDeliver queued incident notifications
NOTIFICATION_WORKER_INTERVAL5sNotification polling interval
NOTIFICATION_WORKER_BATCH_SIZE25Deliveries claimed per cycle
NOTIFICATION_WORKER_STALE_TIMEOUT1mReclaim timeout for interrupted delivery
NOTIFICATION_HTTP_TIMEOUT10sWebhook, Slack, Discord, and Telegram timeout

Disabling a worker pauses its work; it does not delete configuration or queued jobs.

Tracing

VariableDefaultPurpose
OTEL_EXPORTER_OTLP_TRACES_ENDPOINTemptyOTLP 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.

VariableDefaultPurpose
NETSTAMP_PROBE_CONTROLLER_URLrequiredController origin, without /api/v1
NETSTAMP_PROBE_IDrequiredProbe UUID
NETSTAMP_PROBE_SECRETrequiredProbe runtime secret
NETSTAMP_PROBE_HTTP_TIMEOUT10sRuntime API request timeout
NETSTAMP_PROBE_MAX_WORKERS128Concurrent execution worker limit
NETSTAMP_PROBE_RESULT_QUEUE_SIZE10000Buffered result capacity
NETSTAMP_PROBE_RESULT_BATCH_SIZE100Maximum submission batch size
NETSTAMP_PROBE_RESULT_FLUSH_INTERVAL5sMaximum partial-batch wait
NETSTAMP_PROBE_ASSIGNMENT_TTL10mLocal assignment freshness limit
NETSTAMP_PROBE_SHUTDOWN_TIMEOUT10sGraceful shutdown deadline
NETSTAMP_PROBE_HEARTBEAT_INTERVAL30sHeartbeat cadence
NETSTAMP_PROBE_ASSIGNMENT_POLL_INTERVAL30sAssignment polling cadence
NETSTAMP_PROBE_INITIAL_BACKOFF1sInitial retry delay
NETSTAMP_PROBE_MAX_BACKOFF30sMaximum retry delay
NETSTAMP_PROBE_MAX_ATTEMPTS5Attempts before the current retry cycle fails
NETSTAMP_PROBE_METRICS_ADDRemptyOptional Prometheus listener, such as 127.0.0.1:9091
NETSTAMP_PROBE_PPROF_ADDRemptyOptional pprof listener, such as 127.0.0.1:6060
NETSTAMP_PROBE_LOG_LEVELinfodebug, 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.

VariableDefaultPurpose
VITE_NETSTAMP_API_PROXY_TARGEThttp://localhost:8080Vite development proxy target
VITE_NETSTAMP_DEMO_EMAIL[email protected]Demo-image login email
VITE_NETSTAMP_DEMO_PASSWORDpasswordDemo-image login password
VITE_NETSTAMP_GOOGLE_TAG_IDemptyGoogle tag ID
VITE_NETSTAMP_CLARITY_PROJECT_IDemptyMicrosoft Clarity project ID
VITE_NETSTAMP_META_PIXEL_IDemptyMeta Pixel ID
VITE_NETSTAMP_POSTHOG_KEYemptyPublic PostHog project key
VITE_NETSTAMP_POSTHOG_HOSThttps://us.i.posthog.comPostHog ingest host
VITE_NETSTAMP_PLAUSIBLE_DOMAINemptyDomain reported to Plausible
VITE_NETSTAMP_PLAUSIBLE_SCRIPT_URLhttps://plausible.io/js/script.jsPlausible script URL
VITE_NETSTAMP_UMAMI_WEBSITE_IDemptyUmami website ID
VITE_NETSTAMP_UMAMI_SCRIPT_URLhttps://cloud.umami.is/script.jsUmami script URL
VITE_NETSTAMP_TRACKING_CONSENT_MODEregionalregional, always, or immediate
VITE_NETSTAMP_TRACKING_CONSENT_COUNTRIESbuilt-in regional listISO 3166-1 alpha-2 country codes

Every browser-visible VITE_* value is public; never put a private secret in one.

Documentation build variables

VariableDefaultPurpose
PUBLIC_SITE_URLhttps://netstamp.devCanonical documentation origin
PUBLIC_NETSTAMP_APP_BASE_URLhttps://app.netstamp.devProduct 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.