Useful environment variables¶
The following environment variables influence how Zotonic starts up.
ZOTONIC_IP- The IPv4 address to bind the web server to. By default, it binds to
any IP address. If Zotonic runs behind a proxy like nginx or
Varnish, it is wise to put
127.0.0.1orlocalhosthere. Useanyto bind to all IPv4 addresses,noneto disable the IPv4 web server. ZOTONIC_IP6- The IPv6 address to bind the web server to. By default it binds to
the ZOTONIC_IP address. If Zotonic runs behind a proxy like nginx or
Varnish, it is wise to put ::1` here.
Use
anyto bind to all IPv6 addresses,noneto disable the IPv6 web server. ZOTONIC_PORT- Outside port that clients send HTTP requests to. Defaults to
ZOTONIC_LISTEN_PORT. See Port configurations. ZOTONIC_SSL_PORT- Outside port that clients send HTTPS requests to. Defaults to
ZOTONIC_SSL_LISTEN_PORT. Usenoneto disable the ssl web server. See Port configurations. ZOTONIC_LISTEN_PORT- Port on which Zotonic will listen for HTTP requests. Defaults to port 8000. See Port configurations.
ZOTONIC_SSL_LISTEN_PORT- Port on which Zotonic will listen for HTTPS requests. See Port configurations.
ZOTONIC_SMTP_LISTEN_IP- The IPv4 address to bind the SMTP server to. Binds to any IP address
by default. Use
noneto disable the SMTP server. Useanyto bind to all IP addresses. ZOTONIC_SMTP_LISTEN_PORT- The port number to bind the SMTP server to. Defaults to port 2525.
Use
noneto disable the SMTP server. ZOTONIC_SMTP_LISTEN_DOMAIN- The domain to bind the SMTP server to, if any.
TMP- Where Zotonic puts temporary files, like temporary files for image resizing or URL downloading.
Note
If the variables do not seem to have effect, then check
~/.zotonic/zotonic.config. The above variables are
overridden by the ones in that file.