Getting Started

You have three options for running Zotonic: to get started quickly, start our
Zotonic container. You can also use Nix or manually install the dependencies.

Docker

First download and install Docker . Then build and start Zotonic with a single command:

$ ./start-docker.sh

Docker will download and boot the container. The container will start building Zotonic. After which Zotonic can be started with:

bash-4.4$ bin/zotonic debug

Zotonic will be available on port 8443 on your machine. Open your browser and go to https://localhost:8443/ to view the Zotonic Status page. If you wish to quit Zotonic, press twice Ctrl+C. If you wish to quite the container, press Ctrl+D at the bash prompt.

To see the configuration for the password (and other configurations) for the zotonic status site, type:

bash-4.4$ bin/zotonic config

The password is the password entry, the username is always wwwadmin.

You can now move on to creating your first site.

Nix

Download the Zotonic source code using Git or from the GitHub releases page.
The repo includes a shell.nix file that defines a development shell with all dependencies in scope.
You can enter the shell with

nix-shell

There you should run `make` to compile Zotonic.
You can then start Zotonic with

bin/zotonic debug

Now point your browser to: https://localhost:8443/. You should see a welcome message, ‘Powered by Zotonic’. This is the so-called status website. So far, so good! Now it’s time to create your first site.

Cloud-Init

A cloud-init file for Ubuntu is supplied, this has been tested with Ubuntu 20.04.

This file can be used to install a VPS by providers that support cloud-init. Hetzner, Microsoft Azure and TransIP are such providers.

After the cloud-init is done with its installation a new server is up and running on port 80 and 443. It will be using a self-signed certificate, located in /home/zotonic/.config/zotonic/security/self-signed/ (on macOS the directory is $HOME/Library/Application Support/zotonic/security/).

The wwwadmin password for the zotonic status site can be found after logging in to your server:

root:~# sudo su - zotonic
zotonic:~$ cd zotonic
zotonic:~/zotonic$ bin/zotonic config

Zotonic config for 'zotonic@yourvps':
=================================

zotonic:
    environment: production
    zotonic_apps: /home/zotonic/zotonic/apps_user
    security_dir: /home/zotonic/.config/zotonic/security
    password: wXuqsZkC4qp8j1AZHyO3
    timezone: UTC
    ...

The server can be stopped and started using the command line:

zotonic:~/zotonic$ bin/zotonic stop
Stopping zotonic 'zotonic@yourvps' .... OK
zotonic:~/zotonic$ bin/zotonic start
Waiting for zotonic: . OK

Manual installation

If you don’t like Docker or Nix, or you like to do things yourself, you can always install Zotonic on your computer yourself.

Preparation

First prepare your system for running Zotonic. Zotonic needs:

  • Erlang/OTP 23 or higher
  • PostgreSQL 9.5 or higher
  • ImageMagick 6.5 or higher for image resizing
  • Git for pulling in external dependencies
  • C++ compiler (gcc) for erl_exec and other dependencies
  • FFmpeg if you want to use video

Ubuntu / Debian

We recommend you install Erlang from the Erlang solutions website:

https://www.erlang-solutions.com/downloads/

The other requirements are easily fetched with apt:

sudo apt-get install gcc g++ build-essential git imagemagick postgresql ffmpeg

macOS

Install Homebrew, then run:

$ brew install erlang git imagemagick postgresql ffmpeg

FreeBSD

Erlang and its dependencies can be installed with pkg:

# pkg install sudo zip wget bash gmake curl git gcc erlang

Also install ImageMagick and PostgreSQL, at the time of writing the commands below can be used, they should be updated with the newest available version:

# pkg install ImageMagick7-nox11
# pkg install postgresql10-server
# pkg install ffmpeg

Windows

Currently, Zotonic is not officially supported on the Windows platform. However, the main dependencies Erlang, PostgreSQL and ImageMagick do work on Windows, so, if you’re adventurous, it should be possible to get it running.

It is advised to use Docker or the Linux subsystem for Windows.

Getting Zotonic

Download the latest Zotonic release ZIP file from the GitHub releases page. For instance:

$ wget https://github.com/zotonic/zotonic/archive/|release|.zip

Then unzip the file and rename the directory:

$ unzip |release|.zip
$ mv zotonic-|release| zotonic

Alternatively, clone the latest development version using Git:

$ git clone https://github.com/zotonic/zotonic.git

You then need to compile the Zotonic sources:

$ cd zotonic
$ make

Then start Zotonic in debug mode:

$ bin/zotonic debug

Now point your browser to: https://localhost:8443/. You should see a welcome message, ‘Powered by Zotonic’. This is the so-called status website. So far, so good! Now it’s time to create your first site.

Next steps

Introduction Developer Guide Docker

Installation requirements Download Zotonic Release Notes

Referred by

Installation requirements

Zotonic runs on Linux, Mac OS X and (not officially) on Windows.