Skip to content

Server Configuration ​

Corresponds to the server section of the configuration file.

FieldTypeDefaultDescription
hoststring0.0.0.0Listening address. 0.0.0.0 allows LAN/external access; 127.0.0.1 restricts it to this machine.
portnumber5233Listening port.
tls.enabledboolfalseWhether to enable HTTPS.
tls.cert_filestring""Path to the certificate file (PEM). Required when TLS is enabled.
tls.key_filestring""Path to the private key file (PEM). Required when TLS is enabled.
cors.enabledbooltrueWhether to enable cross-origin support.
cors.allowed_originsstring[]["*"]List of origins allowed to make cross-origin requests, such as ["https://example.com"]. * allows all origins.
ip_extractorstring"direct"How the client's real IP is obtained; see the table below.
trusted_proxiesstring[][]List of trusted proxies (CIDR or IP). Only takes effect when ip_extractor is xff or real_ip.

Values of ip_extractor:

ValueDescription
directUse the source IP of the TCP connection. Use this for direct deployments (no reverse proxy).
xffParse the real IP from the X-Forwarded-For header. Use this behind reverse proxies such as Nginx or Cloudflare.
real_ipParse the real IP from the X-Real-IP header. Suitable for the default Nginx forwarding setup.