Table of Contents

Last updated

Configuration Options

Configure Windshift with command-line flags or environment variables. Docker deployments usually use environment variables. The standalone binary can use either style. Use one style for each setting, because the resolution order differs between settings, as listed below.

Production checklist

For a self-hosted production deployment, set these first:

SettingWhy it matters
SSO_SECRETRequired. Signs session cookies and SSO state. Generate once and keep it stable across restarts.
BASE_URLRequired for correct email links, SSO redirects, WebAuthn origins, calendar feeds, and runner callbacks.
ALLOWED_HOSTSOptional browser-origin allowlist. It is derived from BASE_URL for a single-domain deployment; set it explicitly only when you need additional origins.
USE_PROXY=trueRequired when TLS terminates at a reverse proxy. Only enable when Windshift is not directly internet-reachable.
SESSION_IP_BINDINGControls how Windshift handles a session that changes client IP address. Start with the default log mode.
ATTACHMENT_PATHRequired if users upload attachments and you want them persisted outside the database/container filesystem.
POSTGRES_CONNECTION_STRINGRecommended for multi-user production. SQLite is fine for small or single-node installs.

Generate a secret with:

openssl rand -hex 32

Keep the value. Changing SSO_SECRET invalidates existing sessions and can break encrypted SSO/provider credentials.

Configuration precedence

Current releases resolve flags and environment variables for each setting. Avoid setting both forms for one setting.

  • Environment variable wins: PORT, DB_PATH, POSTGRES_CONNECTION_STRING, ATTACHMENT_PATH, LOG_LEVEL, LOG_FORMAT, SSH_PORT, SSH_HOST, MAX_READ_CONNS, MAX_WRITE_CONNS, MAX_USER_CONCURRENCY, POSTGRES_REPLICA_COUNT, POSTGRES_CONNECTION_HEADROOM, DB_REQUEST_TIMEOUT, ALLOW_LOCAL_CONNECTIONS, and WINDSHIFT_MEMORY_LIMIT_MB.
  • CLI flag wins: ALLOWED_HOSTS, BASE_URL, WINDSHIFT_CONTEXT_PATH, LLM_PROVIDERS_FILE, and AI_PROMPTS_DIR.
  • Boolean settings combine: An enabled flag or a true environment variable enables the setting. A flag cannot disable a setting that its environment variable enables. This includes USE_PROXY, DISABLE_PLUGINS, SSH_ENABLED, and CODING_AGENT_ENABLED.

Built-in defaults apply when neither source provides a value. Until releases standardize this behavior, use one configuration style for each setting.

HTTP, proxy, and public URL

FlagEnv varDefaultDescription
--port, -pPORT8080HTTP server port.
--base-urlBASE_URL-Public URL users access Windshift from, for example https://windshift.example.com.
--context-pathWINDSHIFT_CONTEXT_PATH-Optional subpath such as /windshift when served below a domain root.
--allowed-hostsALLOWED_HOSTSderived from BASE_URLComma-separated browser origins for CORS, CSRF, WebAuthn, and SSO redirect validation. This is not a Host-header request filter.
--allowed-port--Extra port used for CORS and WebAuthn origin validation.
--use-proxyUSE_PROXYfalseTrust X-Forwarded-Proto and X-Forwarded-For from trusted proxies.
--allow-insecure-httpALLOW_INSECURE_HTTPfalseAllow browser access via plain http on non-localhost origins. Trusted LANs and testing only.
--additional-proxiesADDITIONAL_PROXIES-Comma-separated trusted proxy IPs in addition to private network ranges.
-FORM_EMBED_ORIGINS-Comma-separated origins permitted to embed public forms.
--no-csrf-falseDisable CSRF protection. Development only.

When USE_PROXY=true, Windshift trusts forwarded headers. Make sure only your reverse proxy can reach the Windshift port. Do not expose the backend port directly to the internet.

ALLOWED_HOSTS configures browser-security middleware. It does not reject requests based on their Host header. For a normal single-domain deployment, leave it unset. Windshift then derives the origin from BASE_URL. An explicit value overrides that derivation.

Plain HTTP is localhost-only by default. A BASE_URL such as http://myhost.internal:8080 fails at startup with Failed to create CORS middleware ... insecure origin patterns. Credentialed CORS refuses insecure origins other than localhost. Serve HTTPS through a reverse proxy with USE_PROXY=true, or directly with --tls-cert and --tls-key. On a trusted LAN, you can set ALLOW_INSECURE_HTTP=true. See Docker for details.

For subpath deployments, include the path in both BASE_URL and WINDSHIFT_CONTEXT_PATH:

BASE_URL=https://example.com/windshift
WINDSHIFT_CONTEXT_PATH=/windshift

Secrets and authentication

FlagEnv varDefaultDescription
-SSO_SECRETrequiredPreferred session and SSO signing/encryption secret.
-SESSION_SECRET-Backward-compatible fallback when SSO_SECRET is unset.
--enable-fallbackENABLE_ADMIN_FALLBACKfalseEnable password-based admin fallback for restrictive SSO setups.
-RECOVER_USER-Recovery helper for emergency user access flows.
-SESSION_VALIDATION_CACHE_TTL5sHow long session-validation results are cached. Accepts a Go duration such as 5s.
-SESSION_IP_BINDINGlogHandle a client-IP change on an existing session. Accepted values are log, strict, and off.

SSO_SECRET is required at startup. SESSION_SECRET is accepted only as a fallback for older deployments.

WebAuthn

FlagEnv varDefaultDescription
-WEBAUTHN_RP_IDBASE_URL hostWebAuthn relying-party ID. Use a hostname, or a full HTTP or HTTPS URL from which Windshift extracts the hostname.
-WEBAUTHN_RP_NAMEWindshiftDisplay name shown by authenticators.

Set BASE_URL and ALLOWED_HOSTS correctly before enabling passkeys/WebAuthn.

The RP ID resolves in this order: WEBAUTHN_RP_ID, then the hostname from BASE_URL, then the process host name. In a container the process host name is the container ID, which no browser will match, so set WEBAUTHN_RP_ID explicitly in containerized deployments. See WebAuthn relying-party ID in containers.

localhost is a valid RP ID. The development exception also permits WebAuthn over HTTP when the host is localhost. A single-label hostname such as windshift is not a valid RP ID for passkeys. Use a dotted hostname or localhost.

Windshift accepts values such as https://windshift.example.com:8443 for WEBAUTHN_RP_ID. Windshift stores only windshift.example.com as the protocol RP ID.

Database

FlagEnv varDefaultDescription
--dbDB_PATHwindshift.dbSQLite database file path.
--postgres-connection-string, --pg-connPOSTGRES_CONNECTION_STRING-PostgreSQL connection string. When set, PostgreSQL is used instead of SQLite.
-DB_TYPE-Set to postgres to build a connection string from POSTGRES_* variables.
-POSTGRES_SSLMODEdisableTLS mode for a connection built from the split POSTGRES_* variables: disable, allow, prefer, require, verify-ca, or verify-full. Use require or stricter for remote or managed PostgreSQL.
-POSTGRES_HOSTpostgresHost used when DB_TYPE=postgres and no connection string is supplied.
-POSTGRES_PORT5432PostgreSQL port for generated connection strings.
-POSTGRES_USERwindshiftPostgreSQL user for generated connection strings.
-POSTGRES_PASSWORD-PostgreSQL password for generated connection strings.
-POSTGRES_DBwindshiftPostgreSQL database for generated connection strings.
--max-read-connsMAX_READ_CONNS30Read connection pool size. On PostgreSQL this also sizes the pool (max open = this value, max idle = half). Keep it under the server’s max_connections.
--max-write-connsMAX_WRITE_CONNS1SQLite write connection pool size.
--postgres-replica-countPOSTGRES_REPLICA_COUNT1Number of Windshift replicas sharing PostgreSQL, used to validate the aggregate connection budget.
--postgres-connection-headroomPOSTGRES_CONNECTION_HEADROOM10PostgreSQL connections reserved for migrations, administration, and other clients when validating the connection budget.
--db-request-timeoutDB_REQUEST_TIMEOUT12sMaximum database-work duration for normal HTTP requests. Accepts a Go duration such as 12s or 1m.
--max-user-concurrencyMAX_USER_CONCURRENCY16Maximum simultaneous in-flight /api requests per authenticated user. 0 disables the cap.

Use POSTGRES_CONNECTION_STRING when possible. Use POSTGRES_* variables when Docker Compose or a secret manager makes separate values easier.

Process memory and cache budget

FlagEnv varDefaultDescription
--memory-limit-mbWINDSHIFT_MEMORY_LIMIT_MB2048 MiBTotal Windshift process-memory budget. Values below 512 MiB fail at startup.

The environment variable wins when both forms are set. The value uses MiB.

Windshift derives two soft budgets from the process budget:

  • The Go runtime receives a soft heap target equal to 80% of the process budget.
  • BigCache receives 25% of the process budget, capped at 512 MiB.

The cache budget is shared by item, permission, notification, activity, and authentication caches. Cache eviction affects performance, not correctness. Windshift reloads an evicted value from persistent storage.

The Go target is not a hard RSS limit. Database allocations, goroutine stacks, memory-mapped files, and temporary request data can raise process RSS above it. Set the container memory limit to at least the Windshift process budget. Do not set a lower container limit and rely on garbage collection.

Administrators can inspect the resolved budget, cache capacity, entries, hits, misses, and evictions under Admin → Diagnostics → Cache memory.

Files and attachments

FlagEnv varDefaultDescription
--attachment-pathATTACHMENT_PATH-Directory for uploaded attachments.

In Docker, mount a persistent volume at /data and use /data/attachments.

TLS

FlagEnv varDefaultDescription
--tls-cert--TLS certificate path when Windshift terminates TLS directly.
--tls-key--TLS private key path when Windshift terminates TLS directly.
-TLS_SKIP_VERIFYfalseDisable certificate-chain and hostname verification for outbound TLS connections. Use only with trusted self-signed destinations.

Most deployments should terminate TLS at a reverse proxy and run Windshift over an internal network.

Keep TLS_SKIP_VERIFY=false in production. If you set it to true, Windshift accepts unverified certificates for outbound HTTPS, SMTP, IMAP, and LDAP connections. This setting affects the whole process, not one integration.

SSH TUI and MCP

FlagEnv varDefaultDescription
--sshSSH_ENABLEDfalseEnable the SSH TUI server.
--ssh-portSSH_PORT23234SSH server port.
--ssh-hostSSH_HOSTlocalhostSSH bind address.
--ssh-key-.ssh/windshift_host_keySSH host key path.
--mcpMCP_ENABLEDfalseEnable the MCP server at /mcp.

Logging and rate limits

FlagEnv varDefaultDescription
--log-levelLOG_LEVELinfodebug, info, warn, or error.
--log-formatLOG_FORMATtexttext, json, or logfmt.
--disable-ip-rate-limitDISABLE_IP_RATE_LIMITfalseDisable IP-based rate limiting. Use only behind trusted controls.

For container production logs, use:

LOG_FORMAT=json
LOG_LEVEL=info

Monitoring

FlagEnv varDefaultDescription
-WINDSHIFT_METRICS_TOKEN-Optional bearer token for the Prometheus /metrics endpoint. When set, requests must send Authorization: Bearer <token>. When unset, the endpoint is public.

The metrics endpoint is public by default. Set the token or restrict the path at the reverse proxy. See Prometheus metrics.

Plugins

FlagEnv varDefaultDescription
--disable-pluginsDISABLE_PLUGINSfalseDisable the plugin system.
-PLUGIN_DIR-Primary plugin directory.
-PLUGIN_DIRS-Extra plugin directories, comma-separated.

Private network egress

FlagEnv varDefaultDescription
--allow-local-connectionsALLOW_LOCAL_CONNECTIONStrueAllow server-side HTTP clients to reach local, loopback, and private-network addresses.

By default, Windshift allows server-side outbound HTTP to local, loopback, and private-network destinations. This affects SCM integrations, Jira import, LLM providers, webhooks, OIDC, and SMTP. Public endpoints work without configuration.

To restore blocking for private-address destinations, set the flag or environment variable to false:

./windshift --allow-local-connections=false
ALLOW_LOCAL_CONNECTIONS=false

Keep the default when Windshift must reach an internal endpoint. Examples include self-hosted Gitea or GitHub Enterprise, Jira Data Center, a private identity provider, a local LLM gateway, and an internal SMTP server:

ALLOW_LOCAL_CONNECTIONS=true

This global switch is not a per-endpoint allowlist. It permits egress to the entire private network. If you set it to false, integrations that use local or private endpoints cannot connect. Use network policy to keep sensitive endpoints, such as cloud metadata services and admin panels, out of reach of the Windshift host.

See Production-ready self-hosting for deployment profiles and a production checklist.

AI and LLM providers

AI features are configured in the Windshift admin UI after startup. Operators can customize the provider catalog and network policy here.

FlagEnv varDefaultDescription
--llm-providersLLM_PROVIDERS_FILE-Path to a custom LLM providers JSON file. Replaces the built-in provider catalog.
--ai-prompts-dirAI_PROMPTS_DIR/data/prompts in DockerDirectory containing custom AI prompt override files.
-LLM_ENDPOINT-Legacy/fallback OpenAI-compatible inference endpoint. Prefer in-app AI connections for normal use.

Windshift’s built-in provider catalog includes Anthropic, OpenAI, Google Gemini, Z.AI, OpenRouter, and Local / Custom. OpenRouter includes a seed model list so admins can select a model immediately. The Refresh button can still fetch the live catalog.

Local and internal LLM endpoints

Windshift allows LLM calls to local and private endpoints by default. Public provider endpoints need no extra configuration. Keep ALLOW_LOCAL_CONNECTIONS=true to use local or private models, such as Ollama, LM Studio, or an internal gateway.

Create a Local / Custom AI connection in the admin UI with the base URL that the Windshift host can reach:

http://host.docker.internal:11434/v1

or:

http://172.17.0.1:11434/v1

If you set ALLOW_LOCAL_CONNECTIONS=false, local or private models cannot receive inference requests or model-list refreshes. See Private network egress for what this switch covers.

The switch is global. It does not allow one host or subnet and block another. To restrict access to specific private services, use network policy outside Windshift.

Custom provider catalog

To add a provider, change default models, or route a provider through a proxy, copy the built-in catalog. Then point Windshift to your copy:

internal/llm/llm_providers.json

Minimal OpenAI-compatible provider:

{
  "providers": [
    {
      "type": "local",
      "name": "Local / Custom",
      "api_format": "openai",
      "base_url": "http://127.0.0.1:11434/v1",
      "models_endpoint": "/v1/models",
      "models_auth_scheme": "bearer",
      "models_response_format": "openai",
      "models": [
        { "id": "llama3.1:8b", "name": "Llama 3.1 8B", "max_tokens": 4096 }
      ]
    }
  ]
}

Supported api_format values are:

ValueUse for
openaiOpenAI-compatible chat completions APIs.
anthropicAnthropic Messages API.

Provider model-refresh settings:

FieldDescription
models_endpointEndpoint to fetch a model list, joined with the provider base URL.
models_base_urlOptional separate base URL for the model-list endpoint.
models_auth_schemebearer, anthropic, or google.
models_response_formatopenai, anthropic, or google.
chat_pathOptional chat path override for OpenAI-compatible providers, for example /chat/completions.

AI prompt overrides

Every AI feature uses an embedded system prompt. To override one prompt, place a <name>.txt file in AI_PROMPTS_DIR. Missing files keep the built-in default.

FilenameFeature
plan_my_day.txtPlan My Day
catch_me_up.txtCatch Me Up
find_similar.txtFind Similar
decompose.txtDecompose
release_notes.txtRelease Notes
dependency_analysis.txtDependency Analysis
ai_chat.txtAI Chat
daily_briefing.txtDaily Briefing
summarize_test_plan.txtSummarize Test Plan
coding_agent_initial.txtCoding agent initial run prompt

Default prompts are here:

internal/llm/prompts/

Important: ai_chat.txt contains four runtime placeholders. In order, they are %s (today’s date), %s (current user name), %d (user ID), and %d (assignee ID for “my items” lookups). Preserve all four in this order when you override the prompt.

Operator policy

An operator policy is a deployment-owned JSON file that denies capabilities and sets instance-wide ceilings. It is independent of organization settings and user permissions. Windshift reads it at startup with --operator-policy or WINDSHIFT_OPERATOR_POLICY, and it cannot be edited through the API. A change requires a restart.

The policy is optional. Without it, the instance keeps self-managed behavior, and a limit of zero adds no ceiling. Unknown fields, invalid capabilities, and negative ceilings reject startup. The file must be a JSON object of at most 64 KiB.

{
  "deny": ["server_scripts", "generic_mail"],
  "limits": {
    "attachment_bytes": 104857600,
    "concurrent_requests": 200,
    "requests_per_minute": 6000,
    "automation_steps_per_day": 50000,
    "ai_tokens_per_day": 2000000,
    "concurrent_ai": 4
  },
  "ai": {
    "allowed_models": ["claude-sonnet-4-5", "gpt-5"],
    "denied_features": ["decompose"],
    "max_output_tokens": 8192,
    "call_token_reservation": 40000
  },
  "imports": {
    "admission_directory": "/data/import-admissions",
    "slots": 2,
    "wait_seconds": 60
  }
}

Denied capabilities

CapabilityDenies
instance_lifecycleInstance lifecycle operations.
maintenanceMaintenance operations.
runtime_diagnosticsRuntime diagnostics endpoints.
plugin_execPlugin CLI command execution.
ldapLDAP directories.
server_scriptsAction scripts and other server-side scripts.
importsImport commands and the Jira import wizard.
mail_transport_managementManaging the mail transport.
generic_mailSending mail outside notifications.
aiAI features.
ai_connection_managementManaging AI connections.
mailSending mail.

Limits

LimitUnit
attachment_bytesLargest attachment.
blob_bytesLargest stored blob.
concurrent_requestsConcurrent requests.
concurrent_streamsConcurrent streams.
requests_per_minuteRequests per minute.
script_timeout_msAction script timeout.
concurrent_scriptsConcurrent action scripts.
automation_steps_per_dayAutomation steps per day.
mail_recipients_per_dayMail recipients per day.
ai_tokens_per_dayAI tokens per day.
concurrent_aiConcurrent AI calls.

Mail, AI, and imports

  • mail.mode is tenant, disabled, or managed. A managed relay requires a host, port, a verified TLS transport, relay abuse controls, and a fixed bare sender address.
  • ai.allowed_models restricts the models an administrator can select. ai.denied_features disables named AI features. A daily AI token allowance requires an affordable call reservation and an output cap.
  • imports.admission_directory adds a bounded import admission queue with 1 to 64 slots and a 1 to 3600 second wait.

Response behavior

A denied capability returns 403 operator_restricted. A storage ceiling returns 413 operator_limit_exceeded. Work admission returns 429 operator_limit_exceeded with Retry-After. Usage is counted across restarts, so a restart does not grant a fresh allowance. An unavailable required budget store fails closed.

System administrators can read the effective controls. Public capability discovery exposes only denials and the mail mode.

Coding agent runner

See Coding Agent Runner for the full deployment guide.

The coding-agent system is opt-in. Enable it with --enable-coding-agent or CODING_AGENT_ENABLED=true. The Windshift server dispatches runs to windshift-runner hosts. It does not run agent containers. The server reads only these two variables:

Flag / Env varDefaultDescription
--enable-coding-agent / CODING_AGENT_ENABLEDfalseEnable the coding-agent system (orchestration only).
CODING_AGENT_WS_API_URLBASE_URL + /apiAPI URL agent containers use to reach Windshift. Override when BASE_URL is not reachable from containers. Must end in /api.

Configure the agent image, Docker binary, worktree and cache location, concurrency, and container resource limits on the runner host. Use WSRUNNER_* variables, not Windshift server variables. See Coding Agent Runner for the runner Compose file and the full WSRUNNER_* configuration table.

Notifications and Jira

Env varDefaultDescription
NOTIFICATION_FLUSH_INTERVALbuilt-inNotification write-batcher flush interval, Go duration such as 5s.
NOTIFICATION_BATCH_SIZEbuilt-inNotification write-batcher batch size.
NOTIFICATION_SYNC_INTERVALbuilt-inNotification synchronization interval.
WINDSHIFT_NOTIFICATION_BATCH_INTERVALbuilt-inEmail notification batch scheduler cadence.
JIRA_CAPTURE_PAYLOADS-Directory for Jira import request/response payload debugging.

Examples

Minimal SQLite

SSO_SECRET=$(openssl rand -hex 32) \
BASE_URL=http://localhost:8080 \
./windshift --db /data/windshift.db

Production behind a reverse proxy

./windshift \
  --postgres-connection-string "$POSTGRES_CONNECTION_STRING" \
  --use-proxy \
  --allowed-hosts windshift.example.com \
  --base-url https://windshift.example.com \
  --attachment-path /data/attachments \
  --log-level info \
  --log-format json

Local LLM on the host

ALLOW_LOCAL_CONNECTIONS=true \
./windshift --base-url http://localhost:8080

Then add a Local / Custom AI connection in the UI with http://localhost:11434/v1.