Configuration
Configure Sharkord with config.ini and environment variables.
config.ini lives in the data directory. It covers the process: ports, limits, proxies. Everything else is in the server settings UI. Restart after editing.
Sharkord merges the file with its defaults and writes it back, so new options show up after updates. Comments and unknown keys are dropped. A file that fails validation is replaced with the defaults.
[server]
host=
port=4991
debug=false
autoupdate=false
backupDatabase=true
maxRequestBodyBytes=262144
rateLimitersEnabled=true
allowedOrigins[]=*
trustedProxies[]=127.0.0.1
trustedProxies[]=::1
trustedProxies[]=10.0.0.0/8
trustedProxies[]=172.16.0.0/12
trustedProxies[]=192.168.0.0/16
trustedProxies[]=fc00::/7
[oidc]
enabled=false
issuer=
clientId=
clientSecret=
redirectUri=
disableLocalLogin=false
[webRtc]
port=40000
announcedAddress=
announcedAddressV6=
internalAnnouncedAddress=
maxBitrate=30000000Lists repeat the key with [], one line per entry.
Server
| Field | Default | Description |
|---|---|---|
host | empty | Address to listen on. Empty means all interfaces. Leave it empty in Docker. |
port | 4991 | Port for HTTP and WebSocket traffic. |
debug | false | Verbose debug logging. |
autoupdate | false | Check for new releases every hour and install them. Ignored in Docker. See Updating. |
backupDatabase | true | Snapshot the database before applying migrations. See Database Migrations. |
maxRequestBodyBytes | 262144 | Max HTTP request body, in bytes. Uploads are not affected. |
rateLimitersEnabled | true | Turns every rate limit on or off. The limits themselves are set in the server settings, see Rate Limits. |
allowedOrigins | * | Origins allowed to call the server from a browser. * allows any. |
trustedProxies | loopback and private ranges | Addresses or CIDR ranges whose forwarded headers are believed. See Behind a Proxy. |
Single Sign-On
The [oidc] section. See Single Sign-On.
WebRTC
| Field | Default | Description |
|---|---|---|
port | 40000 | Media port, UDP and TCP. Open both. |
announcedAddress | empty | Public IPv4 address or domain clients send media to. Set it behind NAT or Docker. |
announcedAddressV6 | empty | Public IPv6 address or domain. Turns on IPv6 voice next to IPv4. See below. |
internalAnnouncedAddress | empty | LAN IP or domain sent to clients next to announcedAddress. See below. |
maxBitrate | 30000000 | Maximum bitrate per connection, in bits per second. |
When announcedAddress is empty, the server looks up its public IP at startup (icanhazip, ipify or ifconfig.me). Setting it skips the lookup. A domain (a DDNS record, say) is resolved to its IPv4 address once at startup, so restart the server when that address changes. If it does not resolve, or you put an IPv6 address here, the server falls back to the lookup and warns in the log.
If the server and its clients are on the same machine or LAN, set it to 127.0.0.1 (same machine) or the server's LAN IP (other devices on the network). Most routers do not loop the public IP back to your own network, so voice fails to connect otherwise.
If both LAN and remote users need to connect, keep announcedAddress on the public address and set internalAnnouncedAddress to the server's LAN IP. Every client gets both, and the browser uses whichever one it can reach. A domain works too: it is resolved by the server, so with split DNS the server's own resolver has to return the LAN IP for it. In Docker, use the host's LAN IP, not the container's. Remote clients receive the LAN IP as well, so leave it empty if you do not need it.
Voice is IPv4 only unless announcedAddressV6 is set. Set it to the server's public IPv6 address, or a domain with an AAAA record, and the server also listens on IPv6 on the same port. Clients get both addresses and use whichever works, so IPv6 only clients can connect too. Open the port for IPv6 in the firewall as well. If the value is not an IPv6 address or the domain has no AAAA record, IPv6 stays off and the log says why.
Rate Limits
Rate limits are set in Server Settings → Rate Limits, by anyone with the Manage Settings permission. Changes apply without a restart.
Every action has the global limit, 120 requests per minute by default, counted separately per action: per user when logged in, per IP before that. A few actions have their own limit, either because a low one protects a secret (login, server password, owner token) or because normal use needs more room (typing, push to talk, voice streams).
The same tab has a switch to turn every limit off. rateLimitersEnabled=false here (or SHARKORD_RATE_LIMITERS_ENABLED=false) turns them off regardless of that switch, which is the way back in if a limit set too low locks you out. The tab then shows the limits as disabled.
Environment Variables
Env variables win over config.ini. Empty values are ignored.
| Variable | Overrides |
|---|---|
SHARKORD_HOST | server.host |
SHARKORD_PORT | server.port |
SHARKORD_DEBUG | server.debug |
SHARKORD_AUTOUPDATE | server.autoupdate |
SHARKORD_BACKUP_DATABASE | server.backupDatabase |
SHARKORD_MAX_REQUEST_BODY_BYTES | server.maxRequestBodyBytes |
SHARKORD_RATE_LIMITERS_ENABLED | server.rateLimitersEnabled |
SHARKORD_ALLOWED_ORIGINS | server.allowedOrigins |
SHARKORD_TRUSTED_PROXIES | server.trustedProxies |
SHARKORD_OIDC_ENABLED | oidc.enabled |
SHARKORD_OIDC_ISSUER | oidc.issuer |
SHARKORD_OIDC_CLIENT_ID | oidc.clientId |
SHARKORD_OIDC_CLIENT_SECRET | oidc.clientSecret |
SHARKORD_OIDC_REDIRECT_URI | oidc.redirectUri |
SHARKORD_OIDC_DISABLE_LOCAL_LOGIN | oidc.disableLocalLogin |
SHARKORD_WEBRTC_PORT | webRtc.port |
SHARKORD_WEBRTC_ANNOUNCED_ADDRESS | webRtc.announcedAddress |
SHARKORD_WEBRTC_ANNOUNCED_ADDRESS_V6 | webRtc.announcedAddressV6 |
SHARKORD_WEBRTC_INTERNAL_ANNOUNCED_ADDRESS | webRtc.internalAnnouncedAddress |
SHARKORD_WEBRTC_MAX_BITRATE | webRtc.maxBitrate |
Lists are comma separated: SHARKORD_TRUSTED_PROXIES="127.0.0.1,::1".
SHARKORD_DATA_PATH moves the whole data directory.