Deployment

So you have built your Zotonic site, and now you want to show it to the world. This page tells you how to configure your zotonic environment so that it is ready for real-world website visitors.

As per the Installation Instructions, up until now you probably have always started Zotonic using the zotonic debug command. This is fine for debugging purposes, because it gives you an Erlang shell in which you can view the output of the server, the ?DEBUG messages that are triggered, and try out Erlang expressions.

However for a production system, you don’t need this shell, you want Zotonic running in the background, and started at startup.

This manual describes the various ways how Zotonic can be run and how it works in combination with widely used HTTP frontends like Varnish and nginx.

Automatic startup on system boot
Once you have Zotonic running, you want to make sure that it automatically starts up when the server reboots, so that the website keeps running after a power…
Server configuration
This chapter describes how to configure your Linux server for running Zotonic.
Running on Port 80 and Port 443
Using standard ports helps visitors discover your page and removes the awkward port number from URLs.
HTTPS support
Zotonic has built-in support for HTTPS and TLS (previously SSL) certificate handling.
Using Varnish as frontend for Zotonic
Using the Varnish HTTP frontend, you can speed up your Zotonic even more as this web server caches static files intelligently.
Proxying Zotonic with nginx
It is possible to put Zotonic behind the nginx <http://nginx.org/> web server, for example if you have other, non-Zotonic virtual hosts running on your system.
Useful environment variables
The following environment variables influence how Zotonic starts up.

Testing sites Developer Guide Troubleshooting