Skip to content

Server Configuration ​

The server is configured via server-config.yaml. All settings can also be overridden with environment variables.

Full reference ​

yaml
server:
  port: 3000
  host: "0.0.0.0"
  sessionExpiryDays: 30
  web:
    enabled: true
  # baseUrl: "https://your-public-domain.com"

log:
  level: "info"
  json: false

database:
  url: "${DATABASE_URL}"
  maxConnections: 10

push:
  allowPrivateEndpoints: false

mediabridge:
  url: "http://localhost:9090"
  healthCheckInterval: 5000

Settings ​

server ​

SettingDefaultEnv OverrideDescription
port3000PORTHTTP port the server listens on
host0.0.0.0HOSTBind address
baseUrl—BASE_URLPublic URL where providers send webhooks
sessionExpiryDays30—How long login sessions last before requiring re-authentication
web.enabledtrue—Whether to serve the built-in web interface

log ​

SettingDefaultEnv OverrideDescription
levelinfoLOG_LEVELLog level: debug / info / warn / error
jsonfalse—Output logs as JSON (useful for log aggregation)

database ​

SettingDefaultEnv OverrideDescription
url—DATABASE_URLPostgreSQL connection string
maxConnections10—Maximum database connection pool size

push ​

SettingDefaultDescription
allowPrivateEndpointsfalseAllow UnifiedPush endpoints on private/LAN networks. Enable if your push server (e.g. ntfy) is on the same LAN. When false, only HTTPS URLs resolving to public IPs are accepted.

mediabridge ​

SettingDefaultEnv OverrideDescription
urlhttp://localhost:9090MEDIA_BRIDGE_URLURL of the MediaBridge ControlAPI
healthCheckInterval5000MEDIA_BRIDGE_HEALTH_CHECK_INTERVALHow often (ms) the server checks if the MediaBridge is alive

Environment variable overrides ​

Any setting can be overridden by its corresponding env var. The config file also supports ${VAR_NAME} placeholder syntax for referencing environment variables inline.

Other environment variables ​

These don't have config file equivalents:

VariableDescription
INITIAL_PASSWORDSeeds the login password on first run
CONFIG_ENCRYPTION_KEYAES-256-GCM key for encrypting provider secrets at rest
CORS_ORIGINComma-separated allowed origins for CORS
CONFIG_PATHPath to the config file (default: ./server-config.yaml)

APK distribution ​

The server can serve the Android APK directly to users, ensuring the app version always matches the server. This is configured via environment variables (no config file equivalent):

VariableDefaultDescription
APK_SOURCEautoHow the APK is provided: local = serve a mounted file, remote = fetch from a URL on first start, auto = use local if the file exists, otherwise fetch remote
APK_URLGitHub release URLURL to download the APK from. Defaults to the GitHub release matching the server version.
APK_CERT_FINGERPRINT(none)Expected APK signing certificate SHA-256 fingerprint. If set, the downloaded APK is verified against this fingerprint. If unset, no verification (self-builder mode).
APK_PATH./public/downloads/svarla.apkFilesystem path where the APK is stored and served from.

Modes ​

  • Production (pre-built images): The server container fetches the apk on start. No configuration needed — it just works.
  • Self-hosted builds: Mount your own signed APK and set APK_SOURCE=local:
    yaml
    volumes:
      - ./build-output/svarla-signed.apk:/app/public/downloads/svarla.apk:ro
    environment:
      APK_SOURCE: local
  • Custom URL: Point at your own release infrastructure:
    yaml
    environment:
      APK_SOURCE: remote
      APK_URL: https://releases.example.com/svarla-latest.apk

Released under the AGPL-3.0 License.