sysconfig

Note

System configurations are only accessible from templates, using m.sysconfig, for users with administrator rights.

Gives access to the Zotonic system configuration from the zotonic.config file(s).

Available Model API Paths

MethodPath patternDescription
get/+key/...Look up system configuration key +key via z_config:get/1 (admin-only); unknown keys return undefined.

/+name marks a variable path segment. A trailing /... means extra path segments are accepted for further lookups.

Known Keys

The following keys are defined in z_config:all/0:

KeyDescription
environmentRuntime environment profile such as development, test, or production.
zotonic_appsPath where user applications are located.
security_dirDirectory containing TLS and security-related files.
data_dirDirectory for persistent runtime data.
log_dirDirectory for log output files.
cache_dirDirectory for cache files.
passwordGlobal bootstrap/management password setting when configured.
admin_emailDefault administrator/system email address.
timezoneDefault server timezone.
listen_ipIPv4 listen address for HTTP listener.
listen_ip6IPv6 listen address for HTTP listener.
listen_portHTTP listen port.
ssl_listen_portHTTPS listen port.
portPublic HTTP port used in URL generation.
ssl_portPublic HTTPS port used in URL generation.
max_connectionsMaximum HTTP connections.
ssl_max_connectionsMaximum HTTPS connections.
dbhostPostgreSQL host.
dbportPostgreSQL port.
dbuserPostgreSQL user name.
dbpasswordPostgreSQL password.
dbdatabasePostgreSQL database name.
dbschemaPostgreSQL schema name.
security_headersEnable or disable default security headers.
smtp_verp_as_fromUse VERP envelope sender behavior for outgoing email.
smtp_no_mx_lookupsDisable MX lookups for SMTP delivery.
smtp_relayEnable relay delivery via configured SMTP relay.
smtp_usernameUsername for SMTP relay authentication.
smtp_passwordPassword for SMTP relay authentication.
smtp_hostSMTP relay host.
smtp_portSMTP relay port.
smtp_sslUse SSL/TLS when connecting to SMTP relay.
smtp_relay_tls_optionsTLS options for SMTP relay connection.
smtp_listen_ipListen address for inbound SMTP listener.
smtp_listen_portListen port for inbound SMTP listener.
smtp_starttlsEnable STARTTLS for inbound SMTP.
smtp_spamd_ipSpamd host for spam filtering integration.
smtp_spamd_portSpamd port for spam filtering integration.
smtp_dns_blocklistDNS blocklists consulted for inbound SMTP checks.
smtp_dns_allowlistDNS allowlists consulted for inbound SMTP checks.
smtp_delete_sent_afterRetention window for sent-email log rows.
smtp_max_sendersMax sender processes/concurrency for SMTP sending.
mqtt_listen_ipListen address for MQTT listener (IPv4).
mqtt_listen_ip6Listen address for MQTT listener (IPv6).
mqtt_listen_portMQTT TCP listen port.
mqtt_listen_ssl_portMQTT TLS listen port.
mqtt_max_connectionsMaximum MQTT connections (plain TCP).
mqtt_ssl_max_connectionsMaximum MQTT connections (TLS).
inet_backlogTCP listen backlog size for HTTP listener.
inet_acceptor_pool_sizeNumber of HTTP acceptor processes.
ssl_backlogTLS listen backlog size.
ssl_acceptor_pool_sizeNumber of HTTPS acceptor processes.
ssl_dhfileDiffie-Hellman parameter file for TLS.
filewatcher_enabledEnable filesystem watcher for site/app changes.
filewatcher_scanner_enabledEnable periodic scanner fallback for filewatcher.
filewatcher_scanner_intervalInterval in ms for periodic filewatch scanner.
syslog_identSyslog ident/program name.
syslog_optsSyslog logger options.
syslog_facilitySyslog facility used for logging.
syslog_levelMinimum syslog severity level.
proxy_allowlistTrusted proxy allowlist for forwarded headers.
ip_allowlistGlobal IP allowlist for request access.
ip_allowlist_system_managementIP allowlist for system-management endpoints.
sessionjobs_limitMaximum number of session job workers.
sidejobs_limitMaximum number of sidejob workers.
log_http_metrics_buffer_sizeBuffer size for HTTP metrics logging.
server_headerValue used for HTTP Server response header.
html_error_pathDirectory containing static HTML error pages.

Edit on GitHub