Install on Ubuntu

A virtual machine with 1 GB RAM is sufficient.

These instructions are for Ubuntu 20.04 (we have not tested with other versions or other distributions, but it should work).

Use SSH to connect to your virtual machine.

Update: you may want to go to the last section ("A different set up" below) for a simpler installation method 

Install node.js

wget -qO - | sudo -E bash -
sudo apt-get install -y nodejs libpq-dev build-essential python-is-python3 

Create a user

adduser saltcorn
adduser saltcorn sudo
su saltcorn
mkdir -p ~/.config/
npm config set prefix /home/saltcorn/.local
echo 'export PATH=/home/saltcorn/.local/bin:$PATH' >> /home/saltcorn/.bashrc
source /home/saltcorn/.bashrc

Install saltcorn

npm install -g @saltcorn/cli

if this fails, you may need to tell npm to disregard file permissions during compilation:

npm install -g @saltcorn/cli --unsafe

Setup saltcorn


saltcorn setup and follow instructions. It will ask you for a sudo password, enter the one you set when you created the saltcorn user.

now exit to become root user again


nginx install and setup

Install nginx: apt install nginx

Using a text editor such as nano, create a file /etc/nginx/sites-available/, replacing with your domain, with these contents:

server {
    listen 80;
    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

link this file to the sites-enabled directory:

sudo ln -s /etc/nginx/sites-available/ /etc/nginx/sites-enabled/

reload nginx:

sudo service nginx reload

Now run Saltcorn manually as the saltcorn user:

sudo -u saltcorn saltcorn serve

and check that you can connect to your server through your domain. If not, check your DNS setup. If everything works, go back to your SSH terminal and stop the saltcorn server by pressing Ctrl-C.

Install saltcorn as a service

Installing saltcorn as a service will mean it runs in the background and restarts automatically if the system reboots.

create a file /lib/systemd/system/saltcorn.service with these contents:


ExecStart=/home/saltcorn/.local/bin/saltcorn serve



sudo systemctl daemon-reload
sudo systemctl start saltcorn
sudo systemctl enable saltcorn

SSL certificate (for secure HTTPS traffic)

Install certbot from Lets Encrypt to give you a free SSL certificate to secure traffic with HTTPS.

Follow these instructions for the setup above: Certbox on Ubuntu 20.04 with nginx

Update existing installation of saltcorn

Note that recomended make backup of server before do update.

To update do as root user:

  1. check status of saltcorn service systemctl status saltcorn

  2. stop saltcorn service systemctl stop saltcorn

A different set up

For a somewhat easier set up, you can skip the nginx step and run saltcorn directly against port 80 and use its own ability to obtain SSL certificates with lets encrypt. This is the approach taken by the scripts that create the image for the digitalocean one click installed. Follow these scripts/steps to replicate that set up:

  1. Install these apt packages:
  2. Run this script as root to install node and allow it to open port 80 as a non-root user:
  3. Run the script as root to set up the database, install saltcorn and enable ufw and unattended upgrades: You can omit the last steps (after line 12) if you don't need a firewall or unattended upgrades
  4. Copy this file (the systemd unit)  to /lib/systemd/system/saltcorn.service:
  5. Run this script as root to set up the Saltcorn configuration and enable the daemon:
  6. Saltcorn should now be running!