Reference
Reference: site file
aliases
| Syntax | aliases: [<string>, ...] |
| Default | none |
| Context | site file |
| Reload | applies on reload |
Further domains served by the same site.
cache
| Syntax | cache: {...} |
| Default | none |
| Context | site file |
| Reload | applies on reload |
Response cache for the site; absent: no caching.
cache.bypass_cookies
| Syntax | bypass_cookies: [<string>, ...] |
| Default | [] |
| Context | cache |
| Reload | applies on reload |
Cookie-name prefixes that mark a personalised request (added to the profile’s).
cache.bypass_paths
| Syntax | bypass_paths: [<string>, ...] |
| Default | [] |
| Context | cache |
| Reload | applies on reload |
Path prefixes that are never cached (added to the profile’s).
cache.bypass_query
| Syntax | bypass_query: [<string>, ...] |
| Default | [] |
| Context | cache |
| Reload | applies on reload |
Query parameters that disable caching (added to the profile’s).
cache.default_ttl
| Syntax | default_ttl: <duration> (e.g. 30s) |
| Default | none |
| Context | cache |
| Reload | applies on reload |
Freshness for 200 responses that carry no caching headers at all. Default: none (only explicitly cacheable responses are stored).
cache.enabled
| Syntax | enabled: true | false |
| Default | true |
| Context | cache |
| Reload | applies on reload |
Cache this application’s responses.
cache.stale_while_revalidate
| Syntax | stale_while_revalidate: <duration> (e.g. 30s) |
| Default | none |
| Context | cache |
| Reload | applies on reload |
Serve stale entries this long while refreshing in the background.
domain
| Syntax | domain: <string> |
| Default | required |
| Context | site file |
| Reload | applies on reload |
The site’s main domain.
htaccess
| Syntax | htaccess: true | false |
| Default | none |
| Context | site file |
| Reload | applies on reload |
Read Apache .htaccess files below root (ADR-0031).
https_redirect
| Syntax | https_redirect: true | false |
| Default | none |
| Context | site file |
| Reload | applies on reload |
Redirect plain HTTP to HTTPS (the www. redirect follows it).
name
| Syntax | name: <string> |
| Default | none |
| Context | site file |
| Reload | applies on reload |
Application name; default derived from domain.
node
| Syntax | node: true | <string> | [<string>, ...] | {...} |
| Default | none |
| Context | site file |
| Reload | applies on reload |
Node.js: the command as a string or list, or the Node.js settings.
node.command
| Syntax | command: [<string>, ...] |
| Default | [] |
| Context | node |
| Reload | applies on reload |
Command started by scalws (no shell), e.g. [node, server.js]; the application listens on PORT.
node.env
| Syntax | env: {<key>: <string>, ...} |
| Default | empty |
| Context | node |
| Reload | applies on reload |
Environment variables for the process.
node.health_path
| Syntax | health_path: <string> |
| Default | none |
| Context | node |
| Reload | applies on reload |
Optional readiness path; any non-5xx answer counts as ready.
node.listen
| Syntax | listen: unix | tcp |
| Default | unix |
| Context | node |
| Reload | applies on reload |
unix: a socket under runtime_dir passed as PORT; tcp: a free loopback port.
node.response_timeout
| Syntax | response_timeout: <duration> (e.g. 30s) |
| Default | 60s |
| Context | node |
| Reload | applies on reload |
Time to wait for the response headers of the application.
node.startup_timeout
| Syntax | startup_timeout: <duration> (e.g. 30s) |
| Default | 30s |
| Context | node |
| Reload | applies on reload |
Time the process gets to become ready.
node.stop_timeout
| Syntax | stop_timeout: <duration> (e.g. 30s) |
| Default | 10s |
| Context | node |
| Reload | applies on reload |
Time the process gets to exit after SIGTERM before it is killed.
node.upstream
| Syntax | upstream: <string> |
| Default | none |
| Context | node |
| Reload | applies on reload |
Proxy to a Node.js process managed elsewhere instead of starting one.
node.workers
| Syntax | workers: {...} |
| Default | none |
| Context | node |
| Reload | applies on reload |
Number of processes (min); requests are balanced across ready ones.
node.workers.autoscale
| Syntax | autoscale: off | auto | recommend |
| Default | recommend |
| Context | node.workers |
| Reload | applies on reload |
off, recommend (default) or auto (ADR-0014).
node.workers.max
| Syntax | max: <integer> |
| Default | required |
| Context | node.workers |
| Reload | applies on reload |
Upper bound when the pool is scaled.
node.workers.min
| Syntax | min: <integer> |
| Default | required |
| Context | node.workers |
| Reload | applies on reload |
Processes started at the beginning and kept at least.
node.workers.target_concurrency
| Syntax | target_concurrency: <integer> |
| Default | none |
| Context | node.workers |
| Reload | applies on reload |
Concurrent requests one worker is expected to handle well (utilisation basis).
php
| Syntax | php: true | <string> | [<string>, ...] | {...} |
| Default | none |
| Context | site file |
| Reload | applies on reload |
PHP: true (a managed PHP-FPM pool), the address of an existing pool (unix:/run/php/php8.3-fpm.sock) or the PHP settings.
php.fastcgi
| Syntax | fastcgi: <string> |
| Default | none |
| Context | php |
| Reload | applies on reload |
External pool: unix:/path.sock or tcp:host:port. Mutually exclusive with fpm.
php.fpm
| Syntax | fpm: {...} |
| Default | none |
| Context | php |
| Reload | applies on reload |
Managed PHP-FPM pool settings (workers, ini values); not used with fastcgi.
php.fpm.binary
| Syntax | binary: <string> |
| Default | none |
| Context | php.fpm |
| Reload | applies on reload |
PHP-FPM binary; default: php-fpm on PATH, else the newest versioned one (php-fpm8.4, Alpine’s php-fpm84).
php.fpm.env
| Syntax | env: {<key>: <string>, ...} |
| Default | empty |
| Context | php.fpm |
| Reload | applies on reload |
Environment passed to PHP (env[...]).
php.fpm.ini
| Syntax | ini: {<key>: <string>, ...} |
| Default | empty |
| Context | php.fpm |
| Reload | applies on reload |
php_admin_value[...] settings, e.g. memory_limit: 256M.
php.fpm.max_requests
| Syntax | max_requests: <integer> |
| Default | 500 |
| Context | php.fpm |
| Reload | applies on reload |
pm.max_requests; 0 disables recycling.
php.fpm.workers
| Syntax | workers: {...} |
| Default | none |
| Context | php.fpm |
| Reload | applies on reload |
min = pm.start_servers/pm.min_spare_servers, max = pm.max_children.
php.fpm.workers.autoscale
| Syntax | autoscale: off | auto | recommend |
| Default | recommend |
| Context | php.fpm.workers |
| Reload | applies on reload |
off, recommend (default) or auto (ADR-0014).
php.fpm.workers.max
| Syntax | max: <integer> |
| Default | required |
| Context | php.fpm.workers |
| Reload | applies on reload |
Upper bound when the pool is scaled.
php.fpm.workers.min
| Syntax | min: <integer> |
| Default | required |
| Context | php.fpm.workers |
| Reload | applies on reload |
Processes started at the beginning and kept at least.
php.fpm.workers.target_concurrency
| Syntax | target_concurrency: <integer> |
| Default | none |
| Context | php.fpm.workers |
| Reload | applies on reload |
Concurrent requests one worker is expected to handle well (utilisation basis).
php.front_controller
| Syntax | front_controller: <string> |
| Default | none |
| Context | php |
| Reload | applies on reload |
Script that handles requests for paths that do not exist, e.g. /index.php.
php.index
| Syntax | index: [<string>, ...] |
| Default | ["index.php","index.html"] |
| Context | php |
| Reload | applies on reload |
Index files for directory requests, tried in order.
php.response_timeout
| Syntax | response_timeout: <duration> (e.g. 30s) |
| Default | 60s |
| Context | php |
| Reload | applies on reload |
Time to wait for PHP-FPM’s response headers.
php.root
| Syntax | root: <string> |
| Default | none |
| Context | php |
| Reload | applies on reload |
Document root; defaults to the application root.
php.startup_timeout
| Syntax | startup_timeout: <duration> (e.g. 30s) |
| Default | 30s |
| Context | php |
| Reload | applies on reload |
Time the managed PHP-FPM pool gets to become ready.
php.stop_timeout
| Syntax | stop_timeout: <duration> (e.g. 30s) |
| Default | 10s |
| Context | php |
| Reload | applies on reload |
Time the managed pool gets to exit before it is killed.
profile
| Syntax | profile: <string> |
| Default | none |
| Context | site file |
| Reload | applies on reload |
Application profile, e.g. wordpress (deny rules, cache bypass, defaults).
proxy
| Syntax | proxy: true | <string> | [<string>, ...] | {...} |
| Default | none |
| Context | site file |
| Reload | applies on reload |
Reverse proxy: the upstream URL or the proxy settings.
proxy.backends
| Syntax | backends: [{...}, ...] |
| Default | none |
| Context | proxy |
| Reload | applies on reload |
Weighted split per request across pools (alternative to upstream).
proxy.backends[].pool
| Syntax | pool: <string> |
| Default | none |
| Context | proxy.backends[] |
| Reload | applies on reload |
Name of a pool in upstreams; alternative to status.
proxy.backends[].status
| Syntax | status: <integer> |
| Default | none |
| Context | proxy.backends[] |
| Reload | applies on reload |
Answers this share of the requests with this status (500-599) instead of sending them to a pool.
proxy.backends[].weight
| Syntax | weight: <integer> |
| Default | 1 |
| Context | proxy.backends[] |
| Reload | applies on reload |
Share of requests (0..=1000); 0 sends none.
proxy.client
| Syntax | client: hyper | experimental |
| Default | none |
| Context | proxy |
| Reload | applies on reload |
HTTP/1 client used towards this upstream; unset: server.upstream_client.
proxy.connect_timeout
| Syntax | connect_timeout: <duration> (e.g. 30s) |
| Default | 5s |
| Context | proxy |
| Reload | applies on reload |
Time to establish a connection to the upstream.
proxy.preserve_host
| Syntax | preserve_host: true | false |
| Default | true |
| Context | proxy |
| Reload | applies on reload |
Forward the client’s Host header (default) instead of the upstream authority.
proxy.response_timeout
| Syntax | response_timeout: <duration> (e.g. 30s) |
| Default | 60s |
| Context | proxy |
| Reload | applies on reload |
Time allowed for the upstream to return response headers.
proxy.tls_ca_file
| Syntax | tls_ca_file: <string> |
| Default | none |
| Context | proxy |
| Reload | applies on reload |
Extra CA bundle (PEM) trusted for https:// upstreams, in addition to the system roots.
proxy.upstream
| Syntax | upstream: <string> | {...} |
| Default | none |
| Context | proxy |
| Reload | applies on reload |
http://host:port, https://host:port or unix:/absolute/path.sock (one address, no retries), or {pool: name}: a pool from upstreams.
proxy.upstream.pool
| Syntax | pool: <string> |
| Default | required |
| Context | proxy.upstream |
| Reload | applies on reload |
Name of a pool in upstreams.
proxy.websocket
| Syntax | websocket: true | false |
| Default | true |
| Context | proxy |
| Reload | applies on reload |
Allow WebSocket upgrades to be tunnelled to this upstream.
python
| Syntax | python: true | <string> | [<string>, ...] | {...} |
| Default | none |
| Context | site file |
| Reload | applies on reload |
Python: module:app (ASGI through uvicorn) or the Python settings.
python.app
| Syntax | app: <string> |
| Default | none |
| Context | python |
| Reload | applies on reload |
module:callable, e.g. app:app or mysite.wsgi:application.
python.command
| Syntax | command: [<string>, ...] |
| Default | [] |
| Context | python |
| Reload | applies on reload |
Explicit argv. Bind arguments are appended for uvicorn/hypercorn/gunicorn unless the argv already contains {socket} or {port}.
python.env
| Syntax | env: {<key>: <string>, ...} |
| Default | empty |
| Context | python |
| Reload | applies on reload |
Environment variables for the processes.
python.health_path
| Syntax | health_path: <string> |
| Default | none |
| Context | python |
| Reload | applies on reload |
Path requested to decide that a worker is ready and healthy.
python.listen
| Syntax | listen: unix | tcp |
| Default | unix |
| Context | python |
| Reload | applies on reload |
unix: a socket under runtime_dir; tcp: a free loopback port.
python.mode
| Syntax | mode: asgi | wsgi |
| Default | required |
| Context | python |
| Reload | applies on reload |
asgi (uvicorn) or wsgi (gunicorn).
python.process_pool
| Syntax | process_pool: true | false |
| Default | false |
| Context | python |
| Reload | applies on reload |
scalws runs workers.min..max single-worker server processes itself instead of one server with --workers, so the pool can be scaled and restarted live (ADR-0014). Trades the server’s copy-on-write sharing for scaling.
python.response_timeout
| Syntax | response_timeout: <duration> (e.g. 30s) |
| Default | 60s |
| Context | python |
| Reload | applies on reload |
Time to wait for the response headers of the application.
python.server
| Syntax | server: uvicorn | hypercorn | gunicorn |
| Default | none |
| Context | python |
| Reload | applies on reload |
Default: uvicorn for ASGI, gunicorn for WSGI.
python.startup_timeout
| Syntax | startup_timeout: <duration> (e.g. 30s) |
| Default | 30s |
| Context | python |
| Reload | applies on reload |
Time the processes get to become ready.
python.stop_timeout
| Syntax | stop_timeout: <duration> (e.g. 30s) |
| Default | 10s |
| Context | python |
| Reload | applies on reload |
Time the processes get to exit after SIGTERM before they are killed.
python.upstream
| Syntax | upstream: <string> |
| Default | none |
| Context | python |
| Reload | applies on reload |
Proxy to a Python server managed elsewhere instead of starting one.
python.virtualenv
| Syntax | virtualenv: <string> |
| Default | none |
| Context | python |
| Reload | applies on reload |
Virtual environment whose server binary and packages are used.
python.workers
| Syntax | workers: {...} |
| Default | none |
| Context | python |
| Reload | applies on reload |
Worker processes of the application server (min).
python.workers.autoscale
| Syntax | autoscale: off | auto | recommend |
| Default | recommend |
| Context | python.workers |
| Reload | applies on reload |
off, recommend (default) or auto (ADR-0014).
python.workers.max
| Syntax | max: <integer> |
| Default | required |
| Context | python.workers |
| Reload | applies on reload |
Upper bound when the pool is scaled.
python.workers.min
| Syntax | min: <integer> |
| Default | required |
| Context | python.workers |
| Reload | applies on reload |
Processes started at the beginning and kept at least.
python.workers.target_concurrency
| Syntax | target_concurrency: <integer> |
| Default | none |
| Context | python.workers |
| Reload | applies on reload |
Concurrent requests one worker is expected to handle well (utilisation basis).
redirect
| Syntax | redirect: true | <string> | [<string>, ...] | {...} |
| Default | none |
| Context | site file |
| Reload | applies on reload |
Redirect: the target origin or the redirect settings.
redirect.host
| Syntax | host: <string> |
| Default | none |
| Context | redirect |
| Reload | applies on reload |
Replaces the request’s host; unset: taken from the request.
redirect.keep_path
| Syntax | keep_path: true | false |
| Default | true |
| Context | redirect |
| Reload | applies on reload |
Append the request’s path and query to to.
redirect.path
| Syntax | path: <string> |
| Default | none |
| Context | redirect |
| Reload | applies on reload |
Replaces the request’s path; unset: taken from the request.
redirect.port
| Syntax | port: <integer> |
| Default | none |
| Context | redirect |
| Reload | applies on reload |
Replaces the request’s port; unset: the well-known port of a configured scheme, else taken from the request.
redirect.prefix
| Syntax | prefix: <string> |
| Default | none |
| Context | redirect |
| Reload | applies on reload |
Replaces the matched prefix of the request’s path; unset: taken from the request.
redirect.scheme
| Syntax | scheme: http | https |
| Default | none |
| Context | redirect |
| Reload | applies on reload |
Replaces the request’s scheme; unset: taken from the request.
redirect.status
| Syntax | status: <integer> |
| Default | 301 |
| Context | redirect |
| Reload | applies on reload |
301, 302, 303, 307 or 308.
redirect.to
| Syntax | to: <string> |
| Default | none |
| Context | redirect |
| Reload | applies on reload |
Target origin, e.g. https://example.com: scheme and host (and port), no path when keep_path is on. Alternative to the fields scheme, host, port, path and prefix.
resources
| Syntax | resources: {...} |
| Default | none |
| Context | site file |
| Reload | applies on reload |
Tenant resource limits; set them in one site file per tenant.
resources.burst
| Syntax | burst: <integer> |
| Default | none |
| Context | resources |
| Reload | applies on reload |
Token-bucket burst for requests_per_second (default: equal to the rate).
resources.cpu
| Syntax | cpu: <cpu quota> (e.g. "400%") |
| Default | none |
| Context | resources |
| Reload | applies on reload |
cpu.max, e.g. "400%" = four CPUs.
resources.io_bandwidth
| Syntax | io_bandwidth: <size> (e.g. 16KiB) |
| Default | none |
| Context | resources |
| Reload | applies on reload |
io.max: read and write bytes per second each, on every disk holding the tenant’s application roots, e.g. "20MiB".
resources.io_weight
| Syntax | io_weight: <integer> |
| Default | none |
| Context | resources |
| Reload | applies on reload |
io.weight (1-10000, default 100), best effort: needs a weight-capable I/O scheduler.
resources.max_concurrent_requests
| Syntax | max_concurrent_requests: <integer> |
| Default | none |
| Context | resources |
| Reload | applies on reload |
Requests of this tenant processed concurrently; excess gets 503.
resources.memory
| Syntax | memory: <size> (e.g. 16KiB) |
| Default | none |
| Context | resources |
| Reload | applies on reload |
memory.max.
resources.pids
| Syntax | pids: <integer> |
| Default | none |
| Context | resources |
| Reload | applies on reload |
pids.max.
resources.requests_per_second
| Syntax | requests_per_second: <integer> |
| Default | none |
| Context | resources |
| Reload | applies on reload |
Sustained request rate; excess gets 429.
resources.swap
| Syntax | swap: <size> (e.g. 16KiB) |
| Default | none |
| Context | resources |
| Reload | applies on reload |
memory.swap.max when memory is set; default 0 (no swap).
root
| Syntax | root: <string> |
| Default | none |
| Context | site file |
| Reload | applies on reload |
Document root: static files, PHP scripts or the application’s directory.
root_symlinks
| Syntax | root_symlinks: follow | refuse |
| Default | none |
| Context | site file |
| Reload | applies on reload |
Symbolic links in the path of root: follow (default) or refuse (the root must be canonical and is opened without following links; for hosting panels).
routes
| Syntax | routes: [{...}, ...] |
| Default | none |
| Context | site file |
| Reload | applies on reload |
Path-prefix routes with their own runtime.
routes[].allow
| Syntax | allow: [<string>, ...] |
| Default | none |
| Context | routes[] |
| Reload | applies on reload |
Client addresses and CIDR blocks allowed; if set, only these clients (403 else).
routes[].basic_auth
| Syntax | basic_auth: {...} |
| Default | none |
| Context | routes[] |
| Reload | applies on reload |
HTTP basic authentication against an htpasswd file.
routes[].basic_auth.realm
| Syntax | realm: <string> |
| Default | Restricted |
| Context | routes[].basic_auth |
| Reload | applies on reload |
Realm shown by the browser (default Restricted).
routes[].basic_auth.users_file
| Syntax | users_file: <string> |
| Default | required |
| Context | routes[].basic_auth |
| Reload | applies on reload |
Absolute path of an htpasswd file (bcrypt, SHA-256/512 crypt or Apache MD5 entries).
routes[].cors
| Syntax | cors: {...} |
| Default | none |
| Context | routes[] |
| Reload | applies on reload |
Cross-origin resource sharing; preflight requests are answered by ScalWS.
routes[].cors.allow_credentials
| Syntax | allow_credentials: true | false |
| Default | false |
| Context | routes[].cors |
| Reload | applies on reload |
Allow credentials (cookies, authorization); not with allow_origins: ["*"].
routes[].cors.allow_headers
| Syntax | allow_headers: [<string>, ...] |
| Default | ["DNT","Keep-Alive","User-Agent","X-Requested-With","If-Modified-Since","Cache-Control","Content-Type","Range","Authorization"] |
| Context | routes[].cors |
| Reload | applies on reload |
Request headers allowed in preflight answers (ingress-nginx defaults).
routes[].cors.allow_methods
| Syntax | allow_methods: [<string>, ...] |
| Default | ["GET","PUT","POST","DELETE","PATCH","OPTIONS"] |
| Context | routes[].cors |
| Reload | applies on reload |
Methods allowed in preflight answers (default: GET, PUT, POST, DELETE, PATCH, OPTIONS).
routes[].cors.allow_origins
| Syntax | allow_origins: [<string>, ...] |
| Default | required |
| Context | routes[].cors |
| Reload | applies on reload |
Allowed origins, e.g. https://app.example.com, https://*.example.com, or ["*"].
routes[].cors.expose_headers
| Syntax | expose_headers: [<string>, ...] |
| Default | none |
| Context | routes[].cors |
| Reload | applies on reload |
Response headers exposed to the page.
routes[].cors.max_age
| Syntax | max_age: <duration> (e.g. 30s) |
| Default | 1728000s |
| Context | routes[].cors |
| Reload | applies on reload |
How long a preflight answer may be cached, at most 365 days (default 20 days).
routes[].deny
| Syntax | deny: [<string>, ...] |
| Default | none |
| Context | routes[] |
| Reload | applies on reload |
Client addresses and CIDR blocks refused with 403; checked after allow.
routes[].headers
| Syntax | headers: [{...}, ...] |
| Default | none |
| Context | routes[] |
| Reload | applies on reload |
Request headers that must match (all of them).
routes[].headers[].name
| Syntax | name: <string> |
| Default | required |
| Context | routes[].headers[] |
| Reload | applies on reload |
Header name (case-insensitive) or query parameter name.
routes[].headers[].regex
| Syntax | regex: <string> |
| Default | none |
| Context | routes[].headers[] |
| Reload | applies on reload |
Regular expression the value must match (searched anywhere unless anchored).
routes[].headers[].value
| Syntax | value: <string> |
| Default | none |
| Context | routes[].headers[] |
| Reload | applies on reload |
Exact, case-sensitive value.
routes[].https_redirect
| Syntax | https_redirect: true | false |
| Default | none |
| Context | routes[] |
| Reload | applies on reload |
Answer plain-HTTP requests that select this route with a 301 to HTTPS; unset: the application’s https_redirect.
routes[].max_body
| Syntax | max_body: <size> (e.g. 16KiB) |
| Default | none |
| Context | routes[] |
| Reload | applies on reload |
Largest request body; overrides limits.max_request_body_bytes; 413 above.
routes[].methods
| Syntax | methods: [<string>, ...] |
| Default | none |
| Context | routes[] |
| Reload | applies on reload |
Request methods this route matches, e.g. [GET, POST]; empty: any.
routes[].path
| Syntax | path: <string> |
| Default | required |
| Context | routes[] |
| Reload | applies on reload |
Path of the route; how it is compared depends on path_type.
routes[].path_type
| Syntax | path_type: prefix | exact | regex |
| Default | none |
| Context | routes[] |
| Reload | applies on reload |
prefix (default, whole segments, longest first), exact or regex (anchored at the start, in configuration order).
routes[].query
| Syntax | query: [{...}, ...] |
| Default | none |
| Context | routes[] |
| Reload | applies on reload |
Query parameters that must match (all of them, decoded, first occurrence).
routes[].query[].name
| Syntax | name: <string> |
| Default | required |
| Context | routes[].query[] |
| Reload | applies on reload |
Header name (case-insensitive) or query parameter name.
routes[].query[].regex
| Syntax | regex: <string> |
| Default | none |
| Context | routes[].query[] |
| Reload | applies on reload |
Regular expression the value must match (searched anywhere unless anchored).
routes[].query[].value
| Syntax | value: <string> |
| Default | none |
| Context | routes[].query[] |
| Reload | applies on reload |
Exact, case-sensitive value.
routes[].request_headers
| Syntax | request_headers: {...} |
| Default | none |
| Context | routes[] |
| Reload | applies on reload |
Changes to the request headers (after the built-in proxy headers).
routes[].request_headers.add
| Syntax | add: {<key>: <string>, ...} |
| Default | none |
| Context | routes[].request_headers |
| Reload | applies on reload |
Headers added next to any present.
routes[].request_headers.remove
| Syntax | remove: [<string>, ...] |
| Default | none |
| Context | routes[].request_headers |
| Reload | applies on reload |
Headers removed.
routes[].request_headers.set
| Syntax | set: {<key>: <string>, ...} |
| Default | none |
| Context | routes[].request_headers |
| Reload | applies on reload |
Headers set to this value, replacing any present.
routes[].request_timeout
| Syntax | request_timeout: <duration> (e.g. 30s) |
| Default | none |
| Context | routes[] |
| Reload | applies on reload |
Time from the route match until the response head; 504 when exceeded.
routes[].response_headers
| Syntax | response_headers: {...} |
| Default | none |
| Context | routes[] |
| Reload | applies on reload |
Changes to every response of the route, including errors generated by ScalWS.
routes[].response_headers.add
| Syntax | add: {<key>: <string>, ...} |
| Default | none |
| Context | routes[].response_headers |
| Reload | applies on reload |
Headers added next to any present.
routes[].response_headers.remove
| Syntax | remove: [<string>, ...] |
| Default | none |
| Context | routes[].response_headers |
| Reload | applies on reload |
Headers removed.
routes[].response_headers.set
| Syntax | set: {<key>: <string>, ...} |
| Default | none |
| Context | routes[].response_headers |
| Reload | applies on reload |
Headers set to this value, replacing any present.
routes[].rewrite
| Syntax | rewrite: {...} |
| Default | none |
| Context | routes[] |
| Reload | applies on reload |
Path and Host rewrite before the runtime.
routes[].rewrite.host
| Syntax | host: <string> |
| Default | none |
| Context | routes[].rewrite |
| Reload | applies on reload |
Host sent upstream (implies preserve_host: false), host or host:port.
routes[].rewrite.path
| Syntax | path: <string> |
| Default | none |
| Context | routes[].rewrite |
| Reload | applies on reload |
Full path; $1..$9 from a regex route, $0 the match, $$ a literal $; ?... in it sets the query (else the query is kept).
routes[].rewrite.prefix
| Syntax | prefix: <string> |
| Default | none |
| Context | routes[].rewrite |
| Reload | applies on reload |
Replaces the matched prefix (prefix routes only).
routes[].runtime
| Syntax | runtime: {...} |
| Default | required |
| Context | routes[] |
| Reload | applies on reload |
Runtime that handles requests under the path.
routes[].runtime<static>.index
| Syntax | index: [<string>, ...] |
| Default | ["index.html"] |
| Context | routes[].runtime (type: static) |
| Reload | applies on reload |
File names served for a directory request, tried in order.
routes[].runtime<static>.precompressed
| Syntax | precompressed: true | false |
| Default | false |
| Context | routes[].runtime (type: static) |
| Reload | applies on reload |
Serve <file>.br / <file>.gz siblings to clients that accept them.
routes[].runtime<static>.root
| Syntax | root: <string> |
| Default | none |
| Context | routes[].runtime (type: static) |
| Reload | applies on reload |
Document root. Defaults to the application’s root.
routes[].runtime<proxy>.backends
| Syntax | backends: [{...}, ...] |
| Default | none |
| Context | routes[].runtime (type: proxy) |
| Reload | applies on reload |
Weighted split per request across pools (alternative to upstream).
routes[].runtime<proxy>.backends[].pool
| Syntax | pool: <string> |
| Default | none |
| Context | routes[].runtime<proxy>.backends[] |
| Reload | applies on reload |
Name of a pool in upstreams; alternative to status.
routes[].runtime<proxy>.backends[].status
| Syntax | status: <integer> |
| Default | none |
| Context | routes[].runtime<proxy>.backends[] |
| Reload | applies on reload |
Answers this share of the requests with this status (500-599) instead of sending them to a pool.
routes[].runtime<proxy>.backends[].weight
| Syntax | weight: <integer> |
| Default | 1 |
| Context | routes[].runtime<proxy>.backends[] |
| Reload | applies on reload |
Share of requests (0..=1000); 0 sends none.
routes[].runtime<proxy>.client
| Syntax | client: hyper | experimental |
| Default | none |
| Context | routes[].runtime (type: proxy) |
| Reload | applies on reload |
HTTP/1 client used towards this upstream; unset: server.upstream_client.
routes[].runtime<proxy>.connect_timeout
| Syntax | connect_timeout: <duration> (e.g. 30s) |
| Default | 5s |
| Context | routes[].runtime (type: proxy) |
| Reload | applies on reload |
Time to establish a connection to the upstream.
routes[].runtime<proxy>.preserve_host
| Syntax | preserve_host: true | false |
| Default | true |
| Context | routes[].runtime (type: proxy) |
| Reload | applies on reload |
Forward the client’s Host header (default) instead of the upstream authority.
routes[].runtime<proxy>.response_timeout
| Syntax | response_timeout: <duration> (e.g. 30s) |
| Default | 60s |
| Context | routes[].runtime (type: proxy) |
| Reload | applies on reload |
Time allowed for the upstream to return response headers.
routes[].runtime<proxy>.tls_ca_file
| Syntax | tls_ca_file: <string> |
| Default | none |
| Context | routes[].runtime (type: proxy) |
| Reload | applies on reload |
Extra CA bundle (PEM) trusted for https:// upstreams, in addition to the system roots.
routes[].runtime<proxy>.upstream
| Syntax | upstream: <string> | {...} |
| Default | none |
| Context | routes[].runtime (type: proxy) |
| Reload | applies on reload |
http://host:port, https://host:port or unix:/absolute/path.sock (one address, no retries), or {pool: name}: a pool from upstreams.
routes[].runtime<proxy>.upstream.pool
| Syntax | pool: <string> |
| Default | required |
| Context | routes[].runtime<proxy>.upstream |
| Reload | applies on reload |
Name of a pool in upstreams.
routes[].runtime<proxy>.websocket
| Syntax | websocket: true | false |
| Default | true |
| Context | routes[].runtime (type: proxy) |
| Reload | applies on reload |
Allow WebSocket upgrades to be tunnelled to this upstream.
routes[].runtime<respond>.body
| Syntax | body: <string> |
| Default | “ |
| Context | routes[].runtime (type: respond) |
| Reload | applies on reload |
Response body (at most 64 KiB).
routes[].runtime<respond>.content_type
| Syntax | content_type: <string> |
| Default | none |
| Context | routes[].runtime (type: respond) |
| Reload | applies on reload |
Content-Type of the response; default text/plain; charset=utf-8.
routes[].runtime<respond>.status
| Syntax | status: <integer> |
| Default | 200 |
| Context | routes[].runtime (type: respond) |
| Reload | applies on reload |
HTTP status of the fixed response (200-599).
routes[].runtime<redirect>.host
| Syntax | host: <string> |
| Default | none |
| Context | routes[].runtime (type: redirect) |
| Reload | applies on reload |
Replaces the request’s host; unset: taken from the request.
routes[].runtime<redirect>.keep_path
| Syntax | keep_path: true | false |
| Default | true |
| Context | routes[].runtime (type: redirect) |
| Reload | applies on reload |
Append the request’s path and query to to.
routes[].runtime<redirect>.path
| Syntax | path: <string> |
| Default | none |
| Context | routes[].runtime (type: redirect) |
| Reload | applies on reload |
Replaces the request’s path; unset: taken from the request.
routes[].runtime<redirect>.port
| Syntax | port: <integer> |
| Default | none |
| Context | routes[].runtime (type: redirect) |
| Reload | applies on reload |
Replaces the request’s port; unset: the well-known port of a configured scheme, else taken from the request.
routes[].runtime<redirect>.prefix
| Syntax | prefix: <string> |
| Default | none |
| Context | routes[].runtime (type: redirect) |
| Reload | applies on reload |
Replaces the matched prefix of the request’s path; unset: taken from the request.
routes[].runtime<redirect>.scheme
| Syntax | scheme: http | https |
| Default | none |
| Context | routes[].runtime (type: redirect) |
| Reload | applies on reload |
Replaces the request’s scheme; unset: taken from the request.
routes[].runtime<redirect>.status
| Syntax | status: <integer> |
| Default | 301 |
| Context | routes[].runtime (type: redirect) |
| Reload | applies on reload |
301, 302, 303, 307 or 308.
routes[].runtime<redirect>.to
| Syntax | to: <string> |
| Default | none |
| Context | routes[].runtime (type: redirect) |
| Reload | applies on reload |
Target origin, e.g. https://example.com: scheme and host (and port), no path when keep_path is on. Alternative to the fields scheme, host, port, path and prefix.
routes[].runtime<php>.fastcgi
| Syntax | fastcgi: <string> |
| Default | none |
| Context | routes[].runtime (type: php) |
| Reload | applies on reload |
External pool: unix:/path.sock or tcp:host:port. Mutually exclusive with fpm.
routes[].runtime<php>.fpm
| Syntax | fpm: {...} |
| Default | none |
| Context | routes[].runtime (type: php) |
| Reload | applies on reload |
Managed PHP-FPM pool settings (workers, ini values); not used with fastcgi.
routes[].runtime<php>.fpm.binary
| Syntax | binary: <string> |
| Default | none |
| Context | routes[].runtime<php>.fpm |
| Reload | applies on reload |
PHP-FPM binary; default: php-fpm on PATH, else the newest versioned one (php-fpm8.4, Alpine’s php-fpm84).
routes[].runtime<php>.fpm.env
| Syntax | env: {<key>: <string>, ...} |
| Default | empty |
| Context | routes[].runtime<php>.fpm |
| Reload | applies on reload |
Environment passed to PHP (env[...]).
routes[].runtime<php>.fpm.ini
| Syntax | ini: {<key>: <string>, ...} |
| Default | empty |
| Context | routes[].runtime<php>.fpm |
| Reload | applies on reload |
php_admin_value[...] settings, e.g. memory_limit: 256M.
routes[].runtime<php>.fpm.max_requests
| Syntax | max_requests: <integer> |
| Default | 500 |
| Context | routes[].runtime<php>.fpm |
| Reload | applies on reload |
pm.max_requests; 0 disables recycling.
routes[].runtime<php>.fpm.workers
| Syntax | workers: {...} |
| Default | none |
| Context | routes[].runtime<php>.fpm |
| Reload | applies on reload |
min = pm.start_servers/pm.min_spare_servers, max = pm.max_children.
routes[].runtime<php>.fpm.workers.autoscale
| Syntax | autoscale: off | auto | recommend |
| Default | recommend |
| Context | routes[].runtime<php>.fpm.workers |
| Reload | applies on reload |
off, recommend (default) or auto (ADR-0014).
routes[].runtime<php>.fpm.workers.max
| Syntax | max: <integer> |
| Default | required |
| Context | routes[].runtime<php>.fpm.workers |
| Reload | applies on reload |
Upper bound when the pool is scaled.
routes[].runtime<php>.fpm.workers.min
| Syntax | min: <integer> |
| Default | required |
| Context | routes[].runtime<php>.fpm.workers |
| Reload | applies on reload |
Processes started at the beginning and kept at least.
routes[].runtime<php>.fpm.workers.target_concurrency
| Syntax | target_concurrency: <integer> |
| Default | none |
| Context | routes[].runtime<php>.fpm.workers |
| Reload | applies on reload |
Concurrent requests one worker is expected to handle well (utilisation basis).
routes[].runtime<php>.front_controller
| Syntax | front_controller: <string> |
| Default | none |
| Context | routes[].runtime (type: php) |
| Reload | applies on reload |
Script that handles requests for paths that do not exist, e.g. /index.php.
routes[].runtime<php>.index
| Syntax | index: [<string>, ...] |
| Default | ["index.php","index.html"] |
| Context | routes[].runtime (type: php) |
| Reload | applies on reload |
Index files for directory requests, tried in order.
routes[].runtime<php>.response_timeout
| Syntax | response_timeout: <duration> (e.g. 30s) |
| Default | 60s |
| Context | routes[].runtime (type: php) |
| Reload | applies on reload |
Time to wait for PHP-FPM’s response headers.
routes[].runtime<php>.root
| Syntax | root: <string> |
| Default | none |
| Context | routes[].runtime (type: php) |
| Reload | applies on reload |
Document root; defaults to the application root.
routes[].runtime<php>.startup_timeout
| Syntax | startup_timeout: <duration> (e.g. 30s) |
| Default | 30s |
| Context | routes[].runtime (type: php) |
| Reload | applies on reload |
Time the managed PHP-FPM pool gets to become ready.
routes[].runtime<php>.stop_timeout
| Syntax | stop_timeout: <duration> (e.g. 30s) |
| Default | 10s |
| Context | routes[].runtime (type: php) |
| Reload | applies on reload |
Time the managed pool gets to exit before it is killed.
routes[].runtime<node>.command
| Syntax | command: [<string>, ...] |
| Default | [] |
| Context | routes[].runtime (type: node) |
| Reload | applies on reload |
Command started by scalws (no shell), e.g. [node, server.js]; the application listens on PORT.
routes[].runtime<node>.env
| Syntax | env: {<key>: <string>, ...} |
| Default | empty |
| Context | routes[].runtime (type: node) |
| Reload | applies on reload |
Environment variables for the process.
routes[].runtime<node>.health_path
| Syntax | health_path: <string> |
| Default | none |
| Context | routes[].runtime (type: node) |
| Reload | applies on reload |
Optional readiness path; any non-5xx answer counts as ready.
routes[].runtime<node>.listen
| Syntax | listen: unix | tcp |
| Default | unix |
| Context | routes[].runtime (type: node) |
| Reload | applies on reload |
unix: a socket under runtime_dir passed as PORT; tcp: a free loopback port.
routes[].runtime<node>.response_timeout
| Syntax | response_timeout: <duration> (e.g. 30s) |
| Default | 60s |
| Context | routes[].runtime (type: node) |
| Reload | applies on reload |
Time to wait for the response headers of the application.
routes[].runtime<node>.startup_timeout
| Syntax | startup_timeout: <duration> (e.g. 30s) |
| Default | 30s |
| Context | routes[].runtime (type: node) |
| Reload | applies on reload |
Time the process gets to become ready.
routes[].runtime<node>.stop_timeout
| Syntax | stop_timeout: <duration> (e.g. 30s) |
| Default | 10s |
| Context | routes[].runtime (type: node) |
| Reload | applies on reload |
Time the process gets to exit after SIGTERM before it is killed.
routes[].runtime<node>.upstream
| Syntax | upstream: <string> |
| Default | none |
| Context | routes[].runtime (type: node) |
| Reload | applies on reload |
Proxy to a Node.js process managed elsewhere instead of starting one.
routes[].runtime<node>.workers
| Syntax | workers: {...} |
| Default | none |
| Context | routes[].runtime (type: node) |
| Reload | applies on reload |
Number of processes (min); requests are balanced across ready ones.
routes[].runtime<node>.workers.autoscale
| Syntax | autoscale: off | auto | recommend |
| Default | recommend |
| Context | routes[].runtime<node>.workers |
| Reload | applies on reload |
off, recommend (default) or auto (ADR-0014).
routes[].runtime<node>.workers.max
| Syntax | max: <integer> |
| Default | required |
| Context | routes[].runtime<node>.workers |
| Reload | applies on reload |
Upper bound when the pool is scaled.
routes[].runtime<node>.workers.min
| Syntax | min: <integer> |
| Default | required |
| Context | routes[].runtime<node>.workers |
| Reload | applies on reload |
Processes started at the beginning and kept at least.
routes[].runtime<node>.workers.target_concurrency
| Syntax | target_concurrency: <integer> |
| Default | none |
| Context | routes[].runtime<node>.workers |
| Reload | applies on reload |
Concurrent requests one worker is expected to handle well (utilisation basis).
routes[].runtime<python>.app
| Syntax | app: <string> |
| Default | none |
| Context | routes[].runtime (type: python) |
| Reload | applies on reload |
module:callable, e.g. app:app or mysite.wsgi:application.
routes[].runtime<python>.command
| Syntax | command: [<string>, ...] |
| Default | [] |
| Context | routes[].runtime (type: python) |
| Reload | applies on reload |
Explicit argv. Bind arguments are appended for uvicorn/hypercorn/gunicorn unless the argv already contains {socket} or {port}.
routes[].runtime<python>.env
| Syntax | env: {<key>: <string>, ...} |
| Default | empty |
| Context | routes[].runtime (type: python) |
| Reload | applies on reload |
Environment variables for the processes.
routes[].runtime<python>.health_path
| Syntax | health_path: <string> |
| Default | none |
| Context | routes[].runtime (type: python) |
| Reload | applies on reload |
Path requested to decide that a worker is ready and healthy.
routes[].runtime<python>.listen
| Syntax | listen: unix | tcp |
| Default | unix |
| Context | routes[].runtime (type: python) |
| Reload | applies on reload |
unix: a socket under runtime_dir; tcp: a free loopback port.
routes[].runtime<python>.mode
| Syntax | mode: asgi | wsgi |
| Default | required |
| Context | routes[].runtime (type: python) |
| Reload | applies on reload |
asgi (uvicorn) or wsgi (gunicorn).
routes[].runtime<python>.process_pool
| Syntax | process_pool: true | false |
| Default | false |
| Context | routes[].runtime (type: python) |
| Reload | applies on reload |
scalws runs workers.min..max single-worker server processes itself instead of one server with --workers, so the pool can be scaled and restarted live (ADR-0014). Trades the server’s copy-on-write sharing for scaling.
routes[].runtime<python>.response_timeout
| Syntax | response_timeout: <duration> (e.g. 30s) |
| Default | 60s |
| Context | routes[].runtime (type: python) |
| Reload | applies on reload |
Time to wait for the response headers of the application.
routes[].runtime<python>.server
| Syntax | server: uvicorn | hypercorn | gunicorn |
| Default | none |
| Context | routes[].runtime (type: python) |
| Reload | applies on reload |
Default: uvicorn for ASGI, gunicorn for WSGI.
routes[].runtime<python>.startup_timeout
| Syntax | startup_timeout: <duration> (e.g. 30s) |
| Default | 30s |
| Context | routes[].runtime (type: python) |
| Reload | applies on reload |
Time the processes get to become ready.
routes[].runtime<python>.stop_timeout
| Syntax | stop_timeout: <duration> (e.g. 30s) |
| Default | 10s |
| Context | routes[].runtime (type: python) |
| Reload | applies on reload |
Time the processes get to exit after SIGTERM before they are killed.
routes[].runtime<python>.upstream
| Syntax | upstream: <string> |
| Default | none |
| Context | routes[].runtime (type: python) |
| Reload | applies on reload |
Proxy to a Python server managed elsewhere instead of starting one.
routes[].runtime<python>.virtualenv
| Syntax | virtualenv: <string> |
| Default | none |
| Context | routes[].runtime (type: python) |
| Reload | applies on reload |
Virtual environment whose server binary and packages are used.
routes[].runtime<python>.workers
| Syntax | workers: {...} |
| Default | none |
| Context | routes[].runtime (type: python) |
| Reload | applies on reload |
Worker processes of the application server (min).
routes[].runtime<python>.workers.autoscale
| Syntax | autoscale: off | auto | recommend |
| Default | recommend |
| Context | routes[].runtime<python>.workers |
| Reload | applies on reload |
off, recommend (default) or auto (ADR-0014).
routes[].runtime<python>.workers.max
| Syntax | max: <integer> |
| Default | required |
| Context | routes[].runtime<python>.workers |
| Reload | applies on reload |
Upper bound when the pool is scaled.
routes[].runtime<python>.workers.min
| Syntax | min: <integer> |
| Default | required |
| Context | routes[].runtime<python>.workers |
| Reload | applies on reload |
Processes started at the beginning and kept at least.
routes[].runtime<python>.workers.target_concurrency
| Syntax | target_concurrency: <integer> |
| Default | none |
| Context | routes[].runtime<python>.workers |
| Reload | applies on reload |
Concurrent requests one worker is expected to handle well (utilisation basis).
routes[].runtime<container>.command
| Syntax | command: [<string>, ...] |
| Default | [] |
| Context | routes[].runtime (type: container) |
| Reload | applies on reload |
Arguments after the image; {port} is replaced by the port scalws chose.
routes[].runtime<container>.drop_capabilities
| Syntax | drop_capabilities: true | false |
| Default | false |
| Context | routes[].runtime (type: container) |
| Reload | applies on reload |
Drop all Linux capabilities.
routes[].runtime<container>.engine
| Syntax | engine: podman | docker |
| Default | podman |
| Context | routes[].runtime (type: container) |
| Reload | applies on reload |
Container engine: podman or docker.
routes[].runtime<container>.engine_path
| Syntax | engine_path: <string> |
| Default | none |
| Context | routes[].runtime (type: container) |
| Reload | applies on reload |
Engine binary; default podman / docker from PATH.
routes[].runtime<container>.env
| Syntax | env: {<key>: <string>, ...} |
| Default | empty |
| Context | routes[].runtime (type: container) |
| Reload | applies on reload |
Environment variables for the containers.
routes[].runtime<container>.health_path
| Syntax | health_path: <string> |
| Default | none |
| Context | routes[].runtime (type: container) |
| Reload | applies on reload |
Path requested to decide that a container is ready and healthy.
routes[].runtime<container>.image
| Syntax | image: <string> |
| Default | required |
| Context | routes[].runtime (type: container) |
| Reload | applies on reload |
Image reference, e.g. docker.io/library/nginx:1.27.
routes[].runtime<container>.mounts
| Syntax | mounts: [{...}, ...] |
| Default | [] |
| Context | routes[].runtime (type: container) |
| Reload | applies on reload |
Host directories mounted into the containers.
routes[].runtime<container>.mounts[].read_only
| Syntax | read_only: true | false |
| Default | true |
| Context | routes[].runtime<container>.mounts[] |
| Reload | applies on reload |
Mount read-only.
routes[].runtime<container>.mounts[].source
| Syntax | source: <string> |
| Default | required |
| Context | routes[].runtime<container>.mounts[] |
| Reload | applies on reload |
Host path (absolute).
routes[].runtime<container>.mounts[].target
| Syntax | target: <string> |
| Default | required |
| Context | routes[].runtime<container>.mounts[] |
| Reload | applies on reload |
Path inside the container (absolute).
routes[].runtime<container>.network
| Syntax | network: bridge | host |
| Default | bridge |
| Context | routes[].runtime (type: container) |
| Reload | applies on reload |
bridge: publish port on a loopback port; host: share the host network.
routes[].runtime<container>.port
| Syntax | port: <integer> |
| Default | none |
| Context | routes[].runtime (type: container) |
| Reload | applies on reload |
Port the application listens on inside the container (bridge networking).
routes[].runtime<container>.pull
| Syntax | pull: missing | always | never |
| Default | missing |
| Context | routes[].runtime (type: container) |
| Reload | applies on reload |
When the image is pulled: missing, always or never.
routes[].runtime<container>.read_only
| Syntax | read_only: true | false |
| Default | false |
| Context | routes[].runtime (type: container) |
| Reload | applies on reload |
Read-only root filesystem (a tmpfs is mounted at /tmp).
routes[].runtime<container>.response_timeout
| Syntax | response_timeout: <duration> (e.g. 30s) |
| Default | 60s |
| Context | routes[].runtime (type: container) |
| Reload | applies on reload |
Time to wait for the response headers of the application.
routes[].runtime<container>.startup_timeout
| Syntax | startup_timeout: <duration> (e.g. 30s) |
| Default | 120s |
| Context | routes[].runtime (type: container) |
| Reload | applies on reload |
Time a container gets to become ready (includes pulling the image).
routes[].runtime<container>.stop_timeout
| Syntax | stop_timeout: <duration> (e.g. 30s) |
| Default | 10s |
| Context | routes[].runtime (type: container) |
| Reload | applies on reload |
Time a container gets to stop before it is killed.
routes[].runtime<container>.user
| Syntax | user: <string> |
| Default | none |
| Context | routes[].runtime (type: container) |
| Reload | applies on reload |
User the container runs as (--user).
routes[].runtime<container>.workers
| Syntax | workers: {...} |
| Default | none |
| Context | routes[].runtime (type: container) |
| Reload | applies on reload |
Number of containers (min at start; scaled between min and max).
routes[].runtime<container>.workers.autoscale
| Syntax | autoscale: off | auto | recommend |
| Default | recommend |
| Context | routes[].runtime<container>.workers |
| Reload | applies on reload |
off, recommend (default) or auto (ADR-0014).
routes[].runtime<container>.workers.max
| Syntax | max: <integer> |
| Default | required |
| Context | routes[].runtime<container>.workers |
| Reload | applies on reload |
Upper bound when the pool is scaled.
routes[].runtime<container>.workers.min
| Syntax | min: <integer> |
| Default | required |
| Context | routes[].runtime<container>.workers |
| Reload | applies on reload |
Processes started at the beginning and kept at least.
routes[].runtime<container>.workers.target_concurrency
| Syntax | target_concurrency: <integer> |
| Default | none |
| Context | routes[].runtime<container>.workers |
| Reload | applies on reload |
Concurrent requests one worker is expected to handle well (utilisation basis).
runtime
| Syntax | runtime: {...} |
| Default | none |
| Context | site file |
| Reload | applies on reload |
The full runtime syntax of scalws.yaml, instead of a shorthand above.
runtime<static>.index
| Syntax | index: [<string>, ...] |
| Default | ["index.html"] |
| Context | runtime (type: static) |
| Reload | applies on reload |
File names served for a directory request, tried in order.
runtime<static>.precompressed
| Syntax | precompressed: true | false |
| Default | false |
| Context | runtime (type: static) |
| Reload | applies on reload |
Serve <file>.br / <file>.gz siblings to clients that accept them.
runtime<static>.root
| Syntax | root: <string> |
| Default | none |
| Context | runtime (type: static) |
| Reload | applies on reload |
Document root. Defaults to the application’s root.
runtime<proxy>.backends
| Syntax | backends: [{...}, ...] |
| Default | none |
| Context | runtime (type: proxy) |
| Reload | applies on reload |
Weighted split per request across pools (alternative to upstream).
runtime<proxy>.backends[].pool
| Syntax | pool: <string> |
| Default | none |
| Context | runtime<proxy>.backends[] |
| Reload | applies on reload |
Name of a pool in upstreams; alternative to status.
runtime<proxy>.backends[].status
| Syntax | status: <integer> |
| Default | none |
| Context | runtime<proxy>.backends[] |
| Reload | applies on reload |
Answers this share of the requests with this status (500-599) instead of sending them to a pool.
runtime<proxy>.backends[].weight
| Syntax | weight: <integer> |
| Default | 1 |
| Context | runtime<proxy>.backends[] |
| Reload | applies on reload |
Share of requests (0..=1000); 0 sends none.
runtime<proxy>.client
| Syntax | client: hyper | experimental |
| Default | none |
| Context | runtime (type: proxy) |
| Reload | applies on reload |
HTTP/1 client used towards this upstream; unset: server.upstream_client.
runtime<proxy>.connect_timeout
| Syntax | connect_timeout: <duration> (e.g. 30s) |
| Default | 5s |
| Context | runtime (type: proxy) |
| Reload | applies on reload |
Time to establish a connection to the upstream.
runtime<proxy>.preserve_host
| Syntax | preserve_host: true | false |
| Default | true |
| Context | runtime (type: proxy) |
| Reload | applies on reload |
Forward the client’s Host header (default) instead of the upstream authority.
runtime<proxy>.response_timeout
| Syntax | response_timeout: <duration> (e.g. 30s) |
| Default | 60s |
| Context | runtime (type: proxy) |
| Reload | applies on reload |
Time allowed for the upstream to return response headers.
runtime<proxy>.tls_ca_file
| Syntax | tls_ca_file: <string> |
| Default | none |
| Context | runtime (type: proxy) |
| Reload | applies on reload |
Extra CA bundle (PEM) trusted for https:// upstreams, in addition to the system roots.
runtime<proxy>.upstream
| Syntax | upstream: <string> | {...} |
| Default | none |
| Context | runtime (type: proxy) |
| Reload | applies on reload |
http://host:port, https://host:port or unix:/absolute/path.sock (one address, no retries), or {pool: name}: a pool from upstreams.
runtime<proxy>.upstream.pool
| Syntax | pool: <string> |
| Default | required |
| Context | runtime<proxy>.upstream |
| Reload | applies on reload |
Name of a pool in upstreams.
runtime<proxy>.websocket
| Syntax | websocket: true | false |
| Default | true |
| Context | runtime (type: proxy) |
| Reload | applies on reload |
Allow WebSocket upgrades to be tunnelled to this upstream.
runtime<respond>.body
| Syntax | body: <string> |
| Default | “ |
| Context | runtime (type: respond) |
| Reload | applies on reload |
Response body (at most 64 KiB).
runtime<respond>.content_type
| Syntax | content_type: <string> |
| Default | none |
| Context | runtime (type: respond) |
| Reload | applies on reload |
Content-Type of the response; default text/plain; charset=utf-8.
runtime<respond>.status
| Syntax | status: <integer> |
| Default | 200 |
| Context | runtime (type: respond) |
| Reload | applies on reload |
HTTP status of the fixed response (200-599).
runtime<redirect>.host
| Syntax | host: <string> |
| Default | none |
| Context | runtime (type: redirect) |
| Reload | applies on reload |
Replaces the request’s host; unset: taken from the request.
runtime<redirect>.keep_path
| Syntax | keep_path: true | false |
| Default | true |
| Context | runtime (type: redirect) |
| Reload | applies on reload |
Append the request’s path and query to to.
runtime<redirect>.path
| Syntax | path: <string> |
| Default | none |
| Context | runtime (type: redirect) |
| Reload | applies on reload |
Replaces the request’s path; unset: taken from the request.
runtime<redirect>.port
| Syntax | port: <integer> |
| Default | none |
| Context | runtime (type: redirect) |
| Reload | applies on reload |
Replaces the request’s port; unset: the well-known port of a configured scheme, else taken from the request.
runtime<redirect>.prefix
| Syntax | prefix: <string> |
| Default | none |
| Context | runtime (type: redirect) |
| Reload | applies on reload |
Replaces the matched prefix of the request’s path; unset: taken from the request.
runtime<redirect>.scheme
| Syntax | scheme: http | https |
| Default | none |
| Context | runtime (type: redirect) |
| Reload | applies on reload |
Replaces the request’s scheme; unset: taken from the request.
runtime<redirect>.status
| Syntax | status: <integer> |
| Default | 301 |
| Context | runtime (type: redirect) |
| Reload | applies on reload |
301, 302, 303, 307 or 308.
runtime<redirect>.to
| Syntax | to: <string> |
| Default | none |
| Context | runtime (type: redirect) |
| Reload | applies on reload |
Target origin, e.g. https://example.com: scheme and host (and port), no path when keep_path is on. Alternative to the fields scheme, host, port, path and prefix.
runtime<php>.fastcgi
| Syntax | fastcgi: <string> |
| Default | none |
| Context | runtime (type: php) |
| Reload | applies on reload |
External pool: unix:/path.sock or tcp:host:port. Mutually exclusive with fpm.
runtime<php>.fpm
| Syntax | fpm: {...} |
| Default | none |
| Context | runtime (type: php) |
| Reload | applies on reload |
Managed PHP-FPM pool settings (workers, ini values); not used with fastcgi.
runtime<php>.fpm.binary
| Syntax | binary: <string> |
| Default | none |
| Context | runtime<php>.fpm |
| Reload | applies on reload |
PHP-FPM binary; default: php-fpm on PATH, else the newest versioned one (php-fpm8.4, Alpine’s php-fpm84).
runtime<php>.fpm.env
| Syntax | env: {<key>: <string>, ...} |
| Default | empty |
| Context | runtime<php>.fpm |
| Reload | applies on reload |
Environment passed to PHP (env[...]).
runtime<php>.fpm.ini
| Syntax | ini: {<key>: <string>, ...} |
| Default | empty |
| Context | runtime<php>.fpm |
| Reload | applies on reload |
php_admin_value[...] settings, e.g. memory_limit: 256M.
runtime<php>.fpm.max_requests
| Syntax | max_requests: <integer> |
| Default | 500 |
| Context | runtime<php>.fpm |
| Reload | applies on reload |
pm.max_requests; 0 disables recycling.
runtime<php>.fpm.workers
| Syntax | workers: {...} |
| Default | none |
| Context | runtime<php>.fpm |
| Reload | applies on reload |
min = pm.start_servers/pm.min_spare_servers, max = pm.max_children.
runtime<php>.fpm.workers.autoscale
| Syntax | autoscale: off | auto | recommend |
| Default | recommend |
| Context | runtime<php>.fpm.workers |
| Reload | applies on reload |
off, recommend (default) or auto (ADR-0014).
runtime<php>.fpm.workers.max
| Syntax | max: <integer> |
| Default | required |
| Context | runtime<php>.fpm.workers |
| Reload | applies on reload |
Upper bound when the pool is scaled.
runtime<php>.fpm.workers.min
| Syntax | min: <integer> |
| Default | required |
| Context | runtime<php>.fpm.workers |
| Reload | applies on reload |
Processes started at the beginning and kept at least.
runtime<php>.fpm.workers.target_concurrency
| Syntax | target_concurrency: <integer> |
| Default | none |
| Context | runtime<php>.fpm.workers |
| Reload | applies on reload |
Concurrent requests one worker is expected to handle well (utilisation basis).
runtime<php>.front_controller
| Syntax | front_controller: <string> |
| Default | none |
| Context | runtime (type: php) |
| Reload | applies on reload |
Script that handles requests for paths that do not exist, e.g. /index.php.
runtime<php>.index
| Syntax | index: [<string>, ...] |
| Default | ["index.php","index.html"] |
| Context | runtime (type: php) |
| Reload | applies on reload |
Index files for directory requests, tried in order.
runtime<php>.response_timeout
| Syntax | response_timeout: <duration> (e.g. 30s) |
| Default | 60s |
| Context | runtime (type: php) |
| Reload | applies on reload |
Time to wait for PHP-FPM’s response headers.
runtime<php>.root
| Syntax | root: <string> |
| Default | none |
| Context | runtime (type: php) |
| Reload | applies on reload |
Document root; defaults to the application root.
runtime<php>.startup_timeout
| Syntax | startup_timeout: <duration> (e.g. 30s) |
| Default | 30s |
| Context | runtime (type: php) |
| Reload | applies on reload |
Time the managed PHP-FPM pool gets to become ready.
runtime<php>.stop_timeout
| Syntax | stop_timeout: <duration> (e.g. 30s) |
| Default | 10s |
| Context | runtime (type: php) |
| Reload | applies on reload |
Time the managed pool gets to exit before it is killed.
runtime<node>.command
| Syntax | command: [<string>, ...] |
| Default | [] |
| Context | runtime (type: node) |
| Reload | applies on reload |
Command started by scalws (no shell), e.g. [node, server.js]; the application listens on PORT.
runtime<node>.env
| Syntax | env: {<key>: <string>, ...} |
| Default | empty |
| Context | runtime (type: node) |
| Reload | applies on reload |
Environment variables for the process.
runtime<node>.health_path
| Syntax | health_path: <string> |
| Default | none |
| Context | runtime (type: node) |
| Reload | applies on reload |
Optional readiness path; any non-5xx answer counts as ready.
runtime<node>.listen
| Syntax | listen: unix | tcp |
| Default | unix |
| Context | runtime (type: node) |
| Reload | applies on reload |
unix: a socket under runtime_dir passed as PORT; tcp: a free loopback port.
runtime<node>.response_timeout
| Syntax | response_timeout: <duration> (e.g. 30s) |
| Default | 60s |
| Context | runtime (type: node) |
| Reload | applies on reload |
Time to wait for the response headers of the application.
runtime<node>.startup_timeout
| Syntax | startup_timeout: <duration> (e.g. 30s) |
| Default | 30s |
| Context | runtime (type: node) |
| Reload | applies on reload |
Time the process gets to become ready.
runtime<node>.stop_timeout
| Syntax | stop_timeout: <duration> (e.g. 30s) |
| Default | 10s |
| Context | runtime (type: node) |
| Reload | applies on reload |
Time the process gets to exit after SIGTERM before it is killed.
runtime<node>.upstream
| Syntax | upstream: <string> |
| Default | none |
| Context | runtime (type: node) |
| Reload | applies on reload |
Proxy to a Node.js process managed elsewhere instead of starting one.
runtime<node>.workers
| Syntax | workers: {...} |
| Default | none |
| Context | runtime (type: node) |
| Reload | applies on reload |
Number of processes (min); requests are balanced across ready ones.
runtime<node>.workers.autoscale
| Syntax | autoscale: off | auto | recommend |
| Default | recommend |
| Context | runtime<node>.workers |
| Reload | applies on reload |
off, recommend (default) or auto (ADR-0014).
runtime<node>.workers.max
| Syntax | max: <integer> |
| Default | required |
| Context | runtime<node>.workers |
| Reload | applies on reload |
Upper bound when the pool is scaled.
runtime<node>.workers.min
| Syntax | min: <integer> |
| Default | required |
| Context | runtime<node>.workers |
| Reload | applies on reload |
Processes started at the beginning and kept at least.
runtime<node>.workers.target_concurrency
| Syntax | target_concurrency: <integer> |
| Default | none |
| Context | runtime<node>.workers |
| Reload | applies on reload |
Concurrent requests one worker is expected to handle well (utilisation basis).
runtime<python>.app
| Syntax | app: <string> |
| Default | none |
| Context | runtime (type: python) |
| Reload | applies on reload |
module:callable, e.g. app:app or mysite.wsgi:application.
runtime<python>.command
| Syntax | command: [<string>, ...] |
| Default | [] |
| Context | runtime (type: python) |
| Reload | applies on reload |
Explicit argv. Bind arguments are appended for uvicorn/hypercorn/gunicorn unless the argv already contains {socket} or {port}.
runtime<python>.env
| Syntax | env: {<key>: <string>, ...} |
| Default | empty |
| Context | runtime (type: python) |
| Reload | applies on reload |
Environment variables for the processes.
runtime<python>.health_path
| Syntax | health_path: <string> |
| Default | none |
| Context | runtime (type: python) |
| Reload | applies on reload |
Path requested to decide that a worker is ready and healthy.
runtime<python>.listen
| Syntax | listen: unix | tcp |
| Default | unix |
| Context | runtime (type: python) |
| Reload | applies on reload |
unix: a socket under runtime_dir; tcp: a free loopback port.
runtime<python>.mode
| Syntax | mode: asgi | wsgi |
| Default | required |
| Context | runtime (type: python) |
| Reload | applies on reload |
asgi (uvicorn) or wsgi (gunicorn).
runtime<python>.process_pool
| Syntax | process_pool: true | false |
| Default | false |
| Context | runtime (type: python) |
| Reload | applies on reload |
scalws runs workers.min..max single-worker server processes itself instead of one server with --workers, so the pool can be scaled and restarted live (ADR-0014). Trades the server’s copy-on-write sharing for scaling.
runtime<python>.response_timeout
| Syntax | response_timeout: <duration> (e.g. 30s) |
| Default | 60s |
| Context | runtime (type: python) |
| Reload | applies on reload |
Time to wait for the response headers of the application.
runtime<python>.server
| Syntax | server: uvicorn | hypercorn | gunicorn |
| Default | none |
| Context | runtime (type: python) |
| Reload | applies on reload |
Default: uvicorn for ASGI, gunicorn for WSGI.
runtime<python>.startup_timeout
| Syntax | startup_timeout: <duration> (e.g. 30s) |
| Default | 30s |
| Context | runtime (type: python) |
| Reload | applies on reload |
Time the processes get to become ready.
runtime<python>.stop_timeout
| Syntax | stop_timeout: <duration> (e.g. 30s) |
| Default | 10s |
| Context | runtime (type: python) |
| Reload | applies on reload |
Time the processes get to exit after SIGTERM before they are killed.
runtime<python>.upstream
| Syntax | upstream: <string> |
| Default | none |
| Context | runtime (type: python) |
| Reload | applies on reload |
Proxy to a Python server managed elsewhere instead of starting one.
runtime<python>.virtualenv
| Syntax | virtualenv: <string> |
| Default | none |
| Context | runtime (type: python) |
| Reload | applies on reload |
Virtual environment whose server binary and packages are used.
runtime<python>.workers
| Syntax | workers: {...} |
| Default | none |
| Context | runtime (type: python) |
| Reload | applies on reload |
Worker processes of the application server (min).
runtime<python>.workers.autoscale
| Syntax | autoscale: off | auto | recommend |
| Default | recommend |
| Context | runtime<python>.workers |
| Reload | applies on reload |
off, recommend (default) or auto (ADR-0014).
runtime<python>.workers.max
| Syntax | max: <integer> |
| Default | required |
| Context | runtime<python>.workers |
| Reload | applies on reload |
Upper bound when the pool is scaled.
runtime<python>.workers.min
| Syntax | min: <integer> |
| Default | required |
| Context | runtime<python>.workers |
| Reload | applies on reload |
Processes started at the beginning and kept at least.
runtime<python>.workers.target_concurrency
| Syntax | target_concurrency: <integer> |
| Default | none |
| Context | runtime<python>.workers |
| Reload | applies on reload |
Concurrent requests one worker is expected to handle well (utilisation basis).
runtime<container>.command
| Syntax | command: [<string>, ...] |
| Default | [] |
| Context | runtime (type: container) |
| Reload | applies on reload |
Arguments after the image; {port} is replaced by the port scalws chose.
runtime<container>.drop_capabilities
| Syntax | drop_capabilities: true | false |
| Default | false |
| Context | runtime (type: container) |
| Reload | applies on reload |
Drop all Linux capabilities.
runtime<container>.engine
| Syntax | engine: podman | docker |
| Default | podman |
| Context | runtime (type: container) |
| Reload | applies on reload |
Container engine: podman or docker.
runtime<container>.engine_path
| Syntax | engine_path: <string> |
| Default | none |
| Context | runtime (type: container) |
| Reload | applies on reload |
Engine binary; default podman / docker from PATH.
runtime<container>.env
| Syntax | env: {<key>: <string>, ...} |
| Default | empty |
| Context | runtime (type: container) |
| Reload | applies on reload |
Environment variables for the containers.
runtime<container>.health_path
| Syntax | health_path: <string> |
| Default | none |
| Context | runtime (type: container) |
| Reload | applies on reload |
Path requested to decide that a container is ready and healthy.
runtime<container>.image
| Syntax | image: <string> |
| Default | required |
| Context | runtime (type: container) |
| Reload | applies on reload |
Image reference, e.g. docker.io/library/nginx:1.27.
runtime<container>.mounts
| Syntax | mounts: [{...}, ...] |
| Default | [] |
| Context | runtime (type: container) |
| Reload | applies on reload |
Host directories mounted into the containers.
runtime<container>.mounts[].read_only
| Syntax | read_only: true | false |
| Default | true |
| Context | runtime<container>.mounts[] |
| Reload | applies on reload |
Mount read-only.
runtime<container>.mounts[].source
| Syntax | source: <string> |
| Default | required |
| Context | runtime<container>.mounts[] |
| Reload | applies on reload |
Host path (absolute).
runtime<container>.mounts[].target
| Syntax | target: <string> |
| Default | required |
| Context | runtime<container>.mounts[] |
| Reload | applies on reload |
Path inside the container (absolute).
runtime<container>.network
| Syntax | network: bridge | host |
| Default | bridge |
| Context | runtime (type: container) |
| Reload | applies on reload |
bridge: publish port on a loopback port; host: share the host network.
runtime<container>.port
| Syntax | port: <integer> |
| Default | none |
| Context | runtime (type: container) |
| Reload | applies on reload |
Port the application listens on inside the container (bridge networking).
runtime<container>.pull
| Syntax | pull: missing | always | never |
| Default | missing |
| Context | runtime (type: container) |
| Reload | applies on reload |
When the image is pulled: missing, always or never.
runtime<container>.read_only
| Syntax | read_only: true | false |
| Default | false |
| Context | runtime (type: container) |
| Reload | applies on reload |
Read-only root filesystem (a tmpfs is mounted at /tmp).
runtime<container>.response_timeout
| Syntax | response_timeout: <duration> (e.g. 30s) |
| Default | 60s |
| Context | runtime (type: container) |
| Reload | applies on reload |
Time to wait for the response headers of the application.
runtime<container>.startup_timeout
| Syntax | startup_timeout: <duration> (e.g. 30s) |
| Default | 120s |
| Context | runtime (type: container) |
| Reload | applies on reload |
Time a container gets to become ready (includes pulling the image).
runtime<container>.stop_timeout
| Syntax | stop_timeout: <duration> (e.g. 30s) |
| Default | 10s |
| Context | runtime (type: container) |
| Reload | applies on reload |
Time a container gets to stop before it is killed.
runtime<container>.user
| Syntax | user: <string> |
| Default | none |
| Context | runtime (type: container) |
| Reload | applies on reload |
User the container runs as (--user).
runtime<container>.workers
| Syntax | workers: {...} |
| Default | none |
| Context | runtime (type: container) |
| Reload | applies on reload |
Number of containers (min at start; scaled between min and max).
runtime<container>.workers.autoscale
| Syntax | autoscale: off | auto | recommend |
| Default | recommend |
| Context | runtime<container>.workers |
| Reload | applies on reload |
off, recommend (default) or auto (ADR-0014).
runtime<container>.workers.max
| Syntax | max: <integer> |
| Default | required |
| Context | runtime<container>.workers |
| Reload | applies on reload |
Upper bound when the pool is scaled.
runtime<container>.workers.min
| Syntax | min: <integer> |
| Default | required |
| Context | runtime<container>.workers |
| Reload | applies on reload |
Processes started at the beginning and kept at least.
runtime<container>.workers.target_concurrency
| Syntax | target_concurrency: <integer> |
| Default | none |
| Context | runtime<container>.workers |
| Reload | applies on reload |
Concurrent requests one worker is expected to handle well (utilisation basis).
security
| Syntax | security: {...} |
| Default | none |
| Context | site file |
| Reload | applies on reload |
Deny paths and rate limits for the site.
security.deny_paths
| Syntax | deny_paths: [<string>, ...] |
| Default | [] |
| Context | security |
| Reload | applies on reload |
Denied paths (added to the profile’s); * matches any characters.
security.ignore_profile_rules
| Syntax | ignore_profile_rules: true | false |
| Default | false |
| Context | security |
| Reload | applies on reload |
Do not apply the profile’s deny rules.
security.rate_limits
| Syntax | rate_limits: [{...}, ...] |
| Default | [] |
| Context | security |
| Reload | applies on reload |
Request rates per client address for matching paths (first match applies).
security.rate_limits[].burst
| Syntax | burst: <integer> |
| Default | none |
| Context | security.rate_limits[] |
| Reload | applies on reload |
Token-bucket burst (default: equal to the rate).
security.rate_limits[].path
| Syntax | path: <string> |
| Default | required |
| Context | security.rate_limits[] |
| Reload | applies on reload |
Path prefix the limit applies to.
security.rate_limits[].requests_per_second
| Syntax | requests_per_second: <integer> |
| Default | required |
| Context | security.rate_limits[] |
| Reload | applies on reload |
Sustained requests per second per client address on this path.
static
| Syntax | static: true | <string> | [<string>, ...] | {...} |
| Default | none |
| Context | site file |
| Reload | applies on reload |
Static files (the default): true or {index: [...], precompressed: true}.
static.index
| Syntax | index: [<string>, ...] |
| Default | ["index.html"] |
| Context | static |
| Reload | applies on reload |
File names served for a directory request, tried in order.
static.precompressed
| Syntax | precompressed: true | false |
| Default | false |
| Context | static |
| Reload | applies on reload |
Serve <file>.br / <file>.gz siblings to clients that accept them.
static.root
| Syntax | root: <string> |
| Default | none |
| Context | static |
| Reload | applies on reload |
Document root. Defaults to the application’s root.
tenant
| Syntax | tenant: <string> |
| Default | none |
| Context | site file |
| Reload | applies on reload |
Tenant (account) of the site; default derived from domain. Sites of one tenant share its resource limits.
tls
| Syntax | tls: auto | manual |
| Default | none |
| Context | site file |
| Reload | applies on reload |
auto: certificate via ACME; manual: from the TLS listeners’ certificates. Default: auto when server.acme.enabled, else manual.
user
| Syntax | user: <string> |
| Default | none |
| Context | site file |
| Reload | applies on reload |
Tenant settings (only once per tenant).
www
| Syntax | www: none | alias | redirect |
| Default | none |
| Context | site file |
| Reload | applies on reload |
www.<domain>: not served (none), served as an alias, or redirected to domain.