Skip to main content

Environment variables

Environment variables configure the process or deployment. Workspace checker rules and most operational settings live in the application database instead. See Configuration to choose the correct place to change behavior.

Renamed variables​

When a MAGLANE_* runtime, installer, updater, or deploy setting is unset, the corresponding MAGPIE_* name is accepted as a fallback. Test-only variables use MAGLANE_TEST_* exclusively. See Upgrade to Maglane for the settings the updater preserves.

Apply a setting​

First identify who reads the variable:

ConsumerWhere to set itHow to apply it
Backend running from sourceExport it in that process's shell, or put it in the backend working-directory .env.Restart the Go process. An existing process environment takes precedence over values loaded from .env.
Backend or frontend containerA Compose environment entry or explicitly selected env_file.Recreate that container. docker compose restart keeps the old environment.
Compose itselfInstallation .env or shell, referenced by the selected Compose files.Run Compose with the same project/file selection. Some changes recreate services or select different volumes.
Installer/updater scriptThe script's documented environment inputs.Set them when running the script. They are not backend settings.

Compose's .env supplies substitution values. It does not automatically export every entry into every container. Check docker-compose.yml before assuming an advanced backend variable is forwarded.

For example, to reject authenticated requests when session revocation cannot be checked, create docker-compose.local.yml:

services:
backend:
environment:
AUTH_REVOCATION_FAIL_OPEN: "false"

Include that overlay after the existing production files and recreate the backend:

docker compose -f docker-compose.yml -f docker-compose.production.yml \
-f docker-compose.local.yml up -d --force-recreate backend

Keep any other custom overlays in their existing order. Persist the full file list through COMPOSE_FILE if that is how you operate the installation. docker compose config --quiet checks whether it resolves successfully. The full docker compose config output can contain secrets, so do not paste it into public issues.

Defaults below refer to the backend process unless a Compose override is stated. Sizes are bytes; 1048576 is 1 MiB. Variables ending in _MS, _SECONDS, _MINUTES, _HOURS, or _DAYS use that unit. Duration-string settings accept values such as 500ms, 30s, and 5m; where a numeric fallback is listed, a valid duration string takes precedence.

Core backend​

  • PROXY_ENCRYPTION_KEY: required key for encrypted PostgreSQL proxy usernames and passwords and keyed route fingerprints. It also protects Redis queue credentials when optional queue encryption is enabled. It does not encrypt proxy hosts.
  • JWT_SECRET: optional signing key. Installers generate and save a unique key. When empty, the backend generates /app/data/jwt_secret with mode 0600 and reuses it across restarts. Set one shared explicit key for multiple instances. The old published Compose default is replaced automatically.
  • JWT_TTL_MINUTES (default 10080, allowed 15..10080): access token lifetime.
  • LOG_LEVEL (default info): backend logger level (debug, info, warn, error, fatal).
  • BACKEND_PORT (default 5656): API listen port.
  • backend-port: legacy fallback env for API listen port.

Runtime mode and strict validation​

Production mode can be inferred from any of:

  • APP_ENV
  • ENVIRONMENT
  • GO_ENV
  • MAGLANE_ENV

Values prod or production are treated as production.

  • STRICT_SECRET_VALIDATION: override strict startup validation for JWT_SECRET and PROXY_ENCRYPTION_KEY.
  • DEVELOPMENT_FIXTURES (default false): local development mode that keeps the API, checker settings, and dashboard snapshots available while skipping autonomous jobs and rotating listeners. API-created rotators are saved without opening TCP or UDP listeners. Restart with fixture mode disabled to activate them. Use with the repeatable test dataset to preserve synthetic results. Production mode rejects true.
  • MAGLANE_DEV_PASSWORD: password used only by go run ./cmd/seed-dev-data --reset when it creates missing development accounts. Existing passwords remain unchanged. This variable is not needed by the backend server.

API hardening​

  • CORS_ALLOWED_ORIGINS (default http://localhost:5050,http://127.0.0.1:5050,http://localhost:4200,http://127.0.0.1:4200): comma-separated browser origin allowlist. Include scheme and port, without a URL path. Use exact origins for the deployed application.
  • SERVER_READ_TIMEOUT_SECONDS (default 30)
  • SERVER_READ_HEADER_TIMEOUT_SECONDS (default 10)
  • SERVER_WRITE_TIMEOUT_SECONDS (default 30): normal API response write timeout. Proxy exports use the separate deadline below.
  • PROXY_EXPORT_TIMEOUT_SECONDS (default 300): total proxy export database and formatting time. The response write deadline adds 5 seconds so an error can be sent when no data has been written.
  • EXPORT_PROXY_READ_TIMEOUT_SECONDS (default 310, frontend container): nginx timeout between reads from the proxy export endpoint, including the initial response. Keep this at least 10 seconds above PROXY_EXPORT_TIMEOUT_SECONDS. Compose passes both export settings from .env; recreate backend and frontend containers after changing them. Configure any external reverse proxy accordingly.
  • SERVER_IDLE_TIMEOUT_SECONDS (default 120)
  • SERVER_SHUTDOWN_TIMEOUT_SECONDS (default 20): graceful API drain timeout.
  • BACKGROUND_SHUTDOWN_TIMEOUT_SECONDS (default 60): time to stop producers, finish usage/statistics writes, and drain filter/source read models after API drain.
  • BACKEND_STOP_GRACE_PERIOD (Compose default 90s): container grace period; keep it above the sum of the API and background timeouts.
  • BACKEND_BIND_ADDRESS (Compose default 127.0.0.1): host address for the API port binding.
  • API_UPLOAD_MAX_BODY_BYTES (default 10485760, 10 MiB): max request size for multipart upload endpoints.
  • API_JSON_MAX_BODY_BYTES (default 1048576, 1 MiB): max request size for JSON endpoints.
  • API_MULTIPART_MEMORY_BYTES (default 1048576, 1 MiB): in-memory budget used by multipart parsing before temp-file spillover.
  • SECURITY_HEADERS_ENABLED (default true): enables base response security headers.

Trusted proxy and outbound safety​

  • TRUSTED_PROXY_CIDRS: comma-separated trusted reverse-proxy CIDRs used for X-Forwarded-For / X-Real-IP parsing.
  • ALLOW_PRIVATE_NETWORK_EGRESS (default false): allows outbound HTTP targets in private/loopback/reserved ranges (disabled by default for safety).

Auth and registration controls​

  • DISABLE_PUBLIC_REGISTRATION: disable public /api/register.
  • ENABLE_PUBLIC_FIRST_ADMIN_BOOTSTRAP: allow first-admin creation through public registration.
  • ALLOW_INSECURE_REGISTRATION_DEFAULTS (base Compose default true): enables public registration and first-admin bootstrap for local setup. Production mode ignores this helper, and the production overlay sets it to false. Explicit registration/bootstrap overrides still apply.
  • AUTH_REVOCATION_FAIL_OPEN (default true): when Redis revocation store is unavailable, allow already-signed/non-expired JWTs.

Auth route rate limiting:

  • AUTH_REQUEST_RATE_LIMIT_WINDOW_SECONDS (default 60)
  • AUTH_LOGIN_RATE_LIMIT_PER_WINDOW (default 60)
  • AUTH_REGISTER_RATE_LIMIT_PER_WINDOW (default 20)
  • AUTH_FORGOT_PASSWORD_RATE_LIMIT_PER_WINDOW (default 10)
  • AUTH_RESET_PASSWORD_RATE_LIMIT_PER_WINDOW (default 20)
  • AUTH_FORGOT_PASSWORD_LIMIT_PER_EMAIL (default 1)
  • AUTH_RESET_PASSWORD_LIMIT_PER_EMAIL (default 5)
  • AUTH_LOGIN_FAILURE_WINDOW_SECONDS (default 900)
  • AUTH_LOGIN_FAILURE_LIMIT_PER_IP (default 30)
  • AUTH_LOGIN_FAILURE_LIMIT_PER_EMAIL (default 10)
  • AUTH_RATE_LIMIT_LOCAL_FALLBACK_MAX_KEYS (default 10000)

Outbound email, password recovery, and invitations​

Mail configuration:

  • MAIL_FROM_ADDRESS: sender address used for outbound auth/recovery and workspace-invitation mail.
  • MAIL_FROM_NAME: optional sender display name.
  • EMAIL_BRAND_IMAGE_URL: optional public absolute https:// image URL shown at the top of branded auth/recovery and invitation emails.
  • SMTP_HOST: SMTP server hostname.
  • SMTP_PORT (default 587): SMTP submission port. Port 587 requires successful STARTTLS; port 465 uses implicit TLS.
  • SMTP_USERNAME: optional SMTP auth username. Set together with SMTP_PASSWORD.
  • SMTP_PASSWORD: optional SMTP auth password. Set together with SMTP_USERNAME.
  • PUBLIC_APP_URL: required when email delivery is enabled. Used to build password-reset links and the fixed /invitations inbox link; request headers are never used as the public base URL.

Password reset behavior:

  • PASSWORD_RESET_TOKEN_TTL_MINUTES (default 30)
  • PASSWORD_RESET_CLEANUP_INTERVAL: duration string for expired-token cleanup, default 1h
  • PASSWORD_RESET_CLEANUP_INTERVAL_MINUTES (default 60): integer fallback for expired-token cleanup

Workspace invitation behavior:

  • WORKSPACE_INVITATION_TTL_HOURS (default 168, allowed 1..720): lifetime of a new invitation in whole hours. Editing an invitation never renews this expiry.

SMTP is optional for invitations. When mail is not configured, pending invitations are still created and remain visible in the in-app inbox.

Durable email outbox worker:

  • EMAIL_OUTBOX_POLL_INTERVAL (default 5s): duration string poll interval
  • EMAIL_OUTBOX_POLL_INTERVAL_SECONDS (default 5): integer fallback poll interval
  • EMAIL_OUTBOX_BATCH_SIZE (default 10)
  • EMAIL_PROCESSING_TIMEOUT (default 15m): duration string for stale in-flight email recovery
  • EMAIL_PROCESSING_TIMEOUT_SECONDS (default 900): integer fallback processing timeout
  • EMAIL_OUTBOX_RETENTION_HOURS (default 24): retain sent rows from sent_at and abandoned rows from their last status update.
  • EMAIL_RETRY_BASE_SECONDS (default 5): exponential backoff base for email retries
  • EMAIL_MAX_ATTEMPTS (default 4): max delivery attempts before abandoning an outbox row

In multi-instance deployments, all backend instances can poll and deliver from the shared outbox concurrently. Stale-message recovery and sent-row cleanup remain leader-coordinated.

Observability and health​

  • ALLOW_PUBLIC_OBSERVABILITY_ENDPOINTS (default non-production true, production false): controls public access to /healthz, /readyz, /metrics.
  • OBSERVABILITY_TOKEN: token accepted via X-Observability-Token when public observability access is disabled.
  • READYZ_ALLOW_REDIS_DEGRADED (default false): allows readyz to return degraded-ready status when Redis is unavailable.
  • CHECK_USAGE_PAUSE_AFTER (default 15m, Go duration): how long metered check usage may stay unwritten to PostgreSQL before the instance pauses checking. Usage keeps being counted and retried, and checking resumes after the next successful write. 0 never pauses. After one minute of failed writes, readyz reports the check_usage component as degraded.

GraphQL guards​

  • GRAPHQL_MAX_DEPTH (default 12)
  • GRAPHQL_MAX_FIELDS (default 250)
  • GRAPHQL_MAX_QUERY_BYTES (default 16384)
  • GRAPHQL_ALLOW_INTROSPECTION (default false)

Redis​

  • REDIS_MODE (default single): single or sentinel.
  • REDIS_URL (default redis://localhost:8946): Redis URL for single mode.
  • redisUrl: legacy REDIS_URL fallback.
  • REDIS_PASSWORD: optional Redis password.
  • REDIS_CONNECT_RETRY_BACKOFF_MS (default 5000): reconnect defer/backoff duration.
  • PROXY_QUEUE_ENCRYPT_CREDENTIALS (default false): encrypt proxy credentials in Redis queue payloads. The default keeps the million-scale checker hot path free of per-check encryption and decryption. Enabling it reduces credential exposure to Redis readers but costs checker throughput.

In default Docker Compose single-mode deployment, the backend points to redis://redis:6379. A Go process on the host instead uses the published port. If both URL names are set, REDIS_URL takes precedence over redisUrl.

For an existing Sentinel deployment:

VariableMeaning
REDIS_MASTER_NAMELogical master name monitored by Sentinel. The default is maglane-master.
REDIS_SENTINEL_ADDRSComma-separated Sentinel host:port addresses reachable from the backend.
REDIS_SENTINEL_PASSWORDAuthentication for the Sentinel servers. REDIS_PASSWORD is for the Redis data service.

REDIS_MODE=sentinel selects the backend client mode. The base Compose stack does not create Sentinel servers or replicas; provide that infrastructure and its connection settings separately.

Database​

VariableBackend defaultBundled Compose behavior
DB_HOSTlocalhostFixed to service name postgres. An external DB requires an overlay changing this entry.
DB_PORT5434Fixed to internal port 5432; host publication is 127.0.0.1:5434.
DB_NAMEmaglaneAlso initializes the PostgreSQL database.
DB_USERNAMEmaglane_userAlso initializes the PostgreSQL role. Installers generate a role name of the form maglane_<random>.
DB_PASSWORDEmptyFalls back to ChangeMeToAStrongDbPassword. Replace before first initialization.
DB_SSLMODErequireDefaults to disable for the bundled private PostgreSQL connection.
DB_AUTO_MIGRATELocal true, production falseExplicitly false in the base stack and production overlay.
DB_MAX_OPEN_CONNS32Per-backend connection pool ceiling.
DB_MAX_IDLE_CONNSValue of DB_MAX_OPEN_CONNSPer-backend idle connection ceiling.
DB_CONN_MAX_LIFETIME300 secondsMaximum connection lifetime.
DB_CONN_MAX_IDLE_TIME60 secondsMaximum idle lifetime.

Changing initialization credentials in .env does not alter a role already stored in postgres_data. Change the database role and its clients together. Do not delete a populated volume to apply a password change.

Accepted TLS modes include disable, allow, prefer, require, verify-ca, and verify-full. For remote databases, choose certificate verification and trust configuration appropriate to your service. See Security.

With automatic migration disabled, run the selected backend image once with --migrate-only before starting the application. For an existing installation, stop all backend writers first and follow Updating.

Rotating proxy listeners​

  • ROTATING_PROXY_PORT_START (default 20000)
  • ROTATING_PROXY_PORT_END (default 20100)
  • ROTATING_PROXY_SYNC_INTERVAL_SECONDS (default 10): interval used by each backend instance to reconcile local rotating listeners.
  • ROTATING_PROXY_UPSTREAM_TIMEOUT_MS (default 30000): upstream connection/request timeout.
  • ROTATING_PROXY_HANDSHAKE_TIMEOUT_MS (default 15000): client handshake timeout.
  • ROTATING_PROXY_MAX_REQUEST_BODY_BYTES (default 10485760, 10 MiB): listener HTTP request body limit.
  • ROTATING_PROXY_SOCKS_MAX_CONCURRENT_CONNECTIONS (default 512): concurrent SOCKS connections per listener.
  • ROTATING_PROXY_MAX_CONCURRENT_TUNNELS (default 1024): CONNECT/SOCKS clients per listener, including handshakes. The SOCKS worker limit also applies.

Multi-instance identity:

  • MAGLANE_INSTANCE_ID (default hostname): stable identifier for backend instance ownership.
  • MAGLANE_INSTANCE_ID_FILE: optional file path fallback source for instance id.
  • MAGLANE_INSTANCE_NAME (default MAGLANE_INSTANCE_ID): human-readable instance label.
  • MAGLANE_INSTANCE_REGION (default Unknown): region label.
  • MAGLANE_INSTANCE_SCOPE: optional scope label.

Optional HTTP/3 TLS files for rotating listeners:

  • ROTATING_PROXY_HTTP3_TLS_CERT_FILE
  • ROTATING_PROXY_HTTP3_TLS_KEY_FILE

Each TLS handshake reloads changed valid files. Invalid or mismatched replacements preserve the last valid certificate.

Queue and startup toggles​

VariableDefaultMeaning
PROXY_QUEUE_SHARDS16, maximum 128Proxy scheduling shards. Keep consistent across replicas.
SCRAPE_QUEUE_SHARDS8, maximum 64Scrape scheduling shards. Keep consistent across replicas.
STARTUP_QUEUE_BOOTSTRAP_ASYNCtrueRebuild queues in the background while readiness remains unavailable until bootstrap completes.

Changing a shard count is an operational change, not a free throughput multiplier. Current readers can encounter older supported shard layouts; measure recovery and backlog behavior and retain the original encryption key.

Queue marker checks run every ten seconds. Missing state triggers PostgreSQL reconstruction; readiness is HTTP 503 after detection until completion.

  • PROXY_ORPHAN_CLEAN_INTERVAL / PROXY_ORPHAN_CLEAN_INTERVAL_MINUTES (default 60 minutes): delay after completed cleanup passes.
  • PROXY_ORPHAN_CLEAN_MAX_RUN_DURATION (default 45s): run budget; drain batches of 5,000 distinct route IDs per table. Route deletion uses at most half of it and examines up to 5,000 route IDs per page. An unfinished pass resumes at the next run, and routes an import is writing are left for the next pass.
  • PROXY_ORPHAN_CLEAN_RETRY_INTERVAL (default 1m): delay after failed or interrupted passes, capped at the normal interval. Committed deletions are retained.

Proxy statistics and timeline maintenance​

Read Results and storage before changing persistence or retention. History retention, replay identity retention, and current-health projections serve different purposes.

Ingestion and stream backpressure​

VariableDefaultMeaning
PROXY_STATISTICS_INGEST_WORKERS4Per-instance persistence workers, clamped to 1 through 32.
PROXY_STATISTICS_REDIS_STREAM_ENABLEDtrueDurable Redis stream path; disabling uses a volatile memory fallback.
PROXY_STATISTICS_REDIS_STREAM_KEYmaglane:proxy_statistics:streamShared stream key.
PROXY_STATISTICS_REDIS_STREAM_GROUPmaglane:proxy_statistics:consumersShared consumer group.
PROXY_STATISTICS_REDIS_STREAM_MAXLEN1000000Stream admission capacity.
PROXY_STATISTICS_REDIS_STREAM_OVERLOAD_POLICYblockBackpressure policy when capacity is exhausted. See the persistence chapter for supported policies.
PROXY_STATISTICS_TENANT_OVERLOAD_POLICIESEmptyPer-workspace overrides under the legacy variable name.
PROXY_STATISTICS_PRODUCER_BLOCK_TIMEOUT_MS500Producer blocking budget.

Keep stream identity settings consistent across instances. Disabling durability changes what can be recovered after a process failure; it is not merely a worker tuning option.

Statistics history retention​

VariableDefaultMeaning
PROXY_STATISTICS_RETENTION_DAYS30Retained check history.
PROXY_STATISTICS_RESPONSE_RETENTION_DAYS7Retained response bodies.
PROXY_STATISTICS_RETENTION_INTERVAL5mDuration-string pass interval.
PROXY_STATISTICS_RETENTION_INTERVAL_MINUTES5Numeric fallback interval.
PROXY_STATISTICS_RETENTION_BATCH_SIZE50000Rows per deletion batch.
PROXY_STATISTICS_RETENTION_MAX_BATCHES240Batch ceiling per pass.
PROXY_STATISTICS_RETENTION_WORKERS4Retention worker count.
PROXY_STATISTICS_RETENTION_MAX_RUN_DURATION4mPass time budget.
PROXY_STATISTICS_RETENTION_DROP_PARTITIONStrueDrop fully expired history partitions when possible.
PROXY_STATISTICS_RETENTION_MAX_PARTITION_DROPS2Partition-drop ceiling per pass.
PROXY_STATISTICS_AUTO_PARTITION_MIGRATIONtruePermit automatic conversion of the existing history table during schema migration.
PROXY_STATISTICS_PARTITION_PRECREATE_MONTHS2Future months prepared for history partitions.
PROXY_STATISTICS_PARTITION_PAST_MONTHSRetention days / 30 + 1, minimum 2Past partition range prepared by migration/maintenance.
PROXY_STATISTICS_LEDGER_RETENTION_BATCH_SIZE50000Replay identities retired per DB batch after durable stream progress.
PROXY_STATISTICS_LEDGER_RETENTION_MAX_BATCHES240Ledger batches per pass, run each minute with a 45-second budget.

Dashboard snapshots​

Dashboard snapshots are stored in PostgreSQL and built on demand by the instance that receives a request for an out-of-date snapshot. The defaults are starting values; measure builds on your largest workspaces before raising them.

VariableDefaultMeaning
DASHBOARD_BUILD_DEADLINE30sDuration string. Deadline of one build, independent of the HTTP write timeout. Each statement's timeout is capped at the remaining budget. The lease lasts the deadline plus 15 seconds.
DASHBOARD_BUILD_CLUSTER_LIMIT4Most builds admitted at once across all backend instances.
DASHBOARD_BUILD_INSTANCE_LIMIT2Most builds one instance runs at once.
DASHBOARD_BUILD_STATEMENT_CONCURRENCY2Most data statements one build runs at once.

Reputation and source summaries​

Reputation refresh uses a durable PostgreSQL queue shared across backend instances. These settings apply per instance:

VariableDefaultMeaning
PROXY_REPUTATION_REFRESH_WORKERS4Concurrent refresh workers, clamped to 1 through 32.
PROXY_REPUTATION_REFRESH_BATCH_SIZE1000Routes claimed per worker batch, clamped to 1 through 5000.
PROXY_REPUTATION_REFRESH_INTERVAL_SECONDS1Idle or error retry delay. Workers continue immediately while work remains.
SCRAPE_SOURCE_STATS_REFRESH_INTERVAL_SECONDS30Interval for coalesced source health counts. Proxy-list projection keeps its own refresh interval.
SCRAPE_SOURCE_STATS_REFRESH_BATCH_SIZE100Source/workspace pairs refreshed per interval, clamped to 1 through 1000.
READ_MODEL_REFRESH_INTERVAL_SECONDS5Interval between proxy-list projection passes.
READ_MODEL_REFRESH_BATCH_SIZE5000Ordinary workspace/route rows per projection prefix, capped at 5000. A projection child deadline can halve only the failed interval's later retry statements; successful intervals return to this width. Owner discovery takes up to this many dirty physical routes; expanded ownership pairs are retained between prefixes. Also the explicit repair's proxy page limit.
READ_MODEL_REFRESH_MAX_BATCHES4Maximum projection statements per normal pass, including reduced retries. Shutdown uses its existing overall drain deadline.
READ_MODEL_REFRESH_TIMEOUT_SECONDS30Per-prefix deadline for background proxy-list refresh and its final source invalidation lookup. Unfinished pairs retry without repeating committed prefixes; this does not extend the overall shutdown deadline.

Monitor maglane_proxy_reputation_refresh_pending and maglane_proxy_reputation_refresh_oldest_age_seconds to check whether refresh workers keep up with ingestion. These gauges describe the shared database backlog. Do not sum them across backend instances.

Statistics stream replays use the stream key and message ID as a durable event identity. Run --migrate-only before starting updated backends to create proxy_statistic_events and proxy_reputation_refreshes. Event identities survive history retention and require storage capacity separate from retained history. The in-memory fallback has no durable stream identity.

Timeline retention​

VariableDefaultMeaning
PROXY_HISTORY_RETENTION_DAYS90Proxy timeline history lifetime.
PROXY_SNAPSHOT_RETENTION_DAYS30Proxy snapshot lifetime.
PROXY_TIMELINE_RETENTION_INTERVAL10mDuration-string pass interval.
PROXY_TIMELINE_RETENTION_INTERVAL_MINUTES10Numeric fallback interval.
PROXY_TIMELINE_RETENTION_BATCH_SIZE50000Rows per batch.
PROXY_TIMELINE_RETENTION_MAX_BATCHES120Batches per pass.
PROXY_TIMELINE_RETENTION_MAX_RUN_DURATION90sPass time budget.

Orphan cleanup has separate controls in Queue and startup toggles.

Worker/tuning envs​

  • SCRAPER_PAGE_POOL_MIN_CAPACITY: obsolete; browser pages are created on demand.
  • SCRAPER_PAGE_POOL_MAX_CAPACITY: concurrent browser scrapes per instance, default 4, clamped to 1 through 64. HTTP fetching does not consume browser capacity. Read at first browser use; restart to change it.
  • SCRAPER_POST_PROCESS_QUEUE_CAPACITY: queued HTML jobs, default 16, clamped to 1 through 4096.
  • SCRAPER_POST_PROCESS_WORKERS (default 8, maximum 64): concurrent HTML post-processing workers.
  • SCRAPER_CAPTURED_MAX_RESPONSE_BODY_BYTES: maximum returned rendered HTML, default 8 MiB. This does not bound Chromium process memory.
  • SCRAPER_FALLBACK_MAX_RESPONSE_BODY_BYTES: maximum HTTP response body, default 8 MiB. The variable name is retained for compatibility.
  • CHECKER_DEFAULT_REQUEST_TIMEOUT_MS (default 10000): fallback request timeout; workspace checker settings select the effective check timeout.
  • CHECKER_MAX_RESPONSE_BODY_BYTES (default 1048576, 1 MiB): maximum judge response body read by a check.

Releases endpoint​

  • GITHUB_TOKEN: optional token for higher GitHub API quota on /api/releases.

Docker Compose resources​

These variables are read by Compose, not by the backend. Limits bound each container. Reservations describe its requested resources; how they are enforced depends on the container runtime and scheduler.

Service prefixCPU limitMemory limitCPU reservationMemory reservation
BACKEND2.001G0.50256M
FRONTEND1.00512M0.25128M
POSTGRES1.501G0.50256M
REDIS1.00512M0.25128M
SEARXNG1.00512M0.10128M

Append _CPU_LIMIT, _MEMORY_LIMIT, _CPU_RESERVATION, or _MEMORY_RESERVATION to the prefix. For example, BACKEND_MEMORY_LIMIT=2G. Larger limits do not automatically increase checker or scraper worker counts.

DOCKER_LOG_MAX_SIZE defaults to 100m and DOCKER_LOG_MAX_FILE to 3 for the bundled rotating JSON logs. Retain enough history for your troubleshooting and performance-validation window.

Component images and versions​

VariableDefaultMeaning
MAGLANE_BACKEND_IMAGEmaglane/backendBackend image repository.
MAGLANE_FRONTEND_IMAGEmaglane/frontendFrontend image repository.
MAGLANE_BACKEND_TAGShared tag fallbackBackend component version.
MAGLANE_FRONTEND_TAGShared tag fallbackFrontend component version.
MAGLANE_IMAGE_TAGlatestCompatibility fallback when a component tag is unset.
SEARXNG_IMAGEsearxng/searxngOptional SearXNG image repository.
SEARXNG_TAGlatestOptional SearXNG image tag.

Set COMPOSE_PROFILES=searxng to start the optional SearXNG service with the stack. See SearXNG.

Keep component versions compatible. Record exact deployed tags or digests for recovery instead of relying on a moving latest tag.

Installer/updater script envs​

These are script inputs. See Installation and Updating for the normal workflows.

VariablePurpose
MAGLANE_INSTALL_DIRInstallation directory selected by the helper. New installations default to maglane/.
MAGLANE_IMAGE_TAGShared image tag when separate component tags are not set.
MAGLANE_BACKEND_TAG, MAGLANE_FRONTEND_TAGComponent-specific tag overrides.
MAGLANE_REPO_OWNER, MAGLANE_REPO_NAME, MAGLANE_REPO_REFDistribution source used by script downloads, normally maglane-io, maglane, master.
MAGLANE_COMPOSE_URLOverride the downloaded base Compose file URL.
MAGLANE_PRODUCTION_COMPOSE_URLOverride the downloaded production overlay URL.
MAGLANE_ENV_EXAMPLE_URLOverride the downloaded example environment URL.
MAGLANE_FORCEInstaller replacement override. 1 deletes an existing installation directory before installing.

Use the update helper for an existing installation. MAGLANE_FORCE=1 is a replacement operation that can remove installation configuration and files; it is not the routine way to resolve an update problem.

Pages publishing​

These settings control the docs deployment script and the Pages publisher from the distribution repository.

VariablePurpose
MAGLANE_DISTRIBUTION_REPOLocal distribution checkout. The docs script looks for ../maglane by default, then falls back to ../magpie.
MAGLANE_PAGES_REMOTEGit remote for the Pages branch.
MAGLANE_PAGES_BRANCHBranch for the published site.
MAGLANE_PAGES_WORKTREEPath to the local Pages worktree.
MAGLANE_DEPLOY_DRY_RUNSet to 1 to validate the build without updating the publishing branch.
MAGLANE_DEPLOY_PUSHSet to 0 to commit the result locally without pushing it.