How to install LogChimp on Ubuntu?

A full guide for installing, configuring and running LogChimp on your Ubuntu 20.04 server, for use in production.


This installation guide is not suitable for local use or development.


This the official guide for self-hosting LogChimp using our recommended stack of Ubuntu 20.04. If you’re comfortable installing, maintaining and updating your own software, this is the place for you. By the end of this guide you’ll have a fully configured LogChimp install running in production.

You can use this 👉 DigitalOcean 👈 link and get free $100 credits.


Save time with LogChimp VALET.

This is a detailed manual install guide for developers. If you don't want to deal setting up LogChimp yourself, we offer LogChimp VALET services.


The officially recommended production installation requires the following stack:

  • Ubuntu v20.04
  • Node.js v12
  • PostgreSQL v12
  • Systemd
  • A server with at least 1GB memory
  • A registered domain name

Before getting started you should set up a working DNS A-Record from you domain, pointing to the server’s IP address.

Server Setup

Create a new user

Open up your terminal and login to your new server as the root user:

# Login via SSH
ssh root@<your_server_ip>

# Create a new user and follow prompts
adduser <user>

# Add user to superuser group to unlock admin privileges
usermod -aG sudo <user>

# Then log in as the new user
su - <user>

Update packages

Ensure package lists and installed packages are up to date.

# Update package lists
sudo apt-get update

# Update installed packages
sudo apt-get upgrade

Follow any prompts to enter the password you just created in the previous step.

Install NGINX

LogChimp uses an NGINX server and the SSL configuration.

# Install NGINX
sudo apt-get install nginx

Allow firewall connection at HTTP, HTTPS and OpenSSH.

sudo ufw allow 'Nginx HTTP'
sudo ufw allow 'Nginx HTTPS'
sudo ufw allow 'OpenSSH'

Install PostgreSQL

Next, you’ll need to install PostgreSQL to be used as the production database.

# Install PostgreSQL
sudo apt-get install postgresql-12 postgresql-contrib

Create <user>(a.k.a role) for database using psql prompt.

# Open postgresql prompt
sudo -u postgres psql

# Create new user with SUPERUSER

# Create database
CREATE DATABASE <database name>;


Wrap your password in single quotes.
# Then exit postgresql prompt

Install Node.js

You will need to have a supported version of Node installed system-wide in the manner described below. If you have a different setup, you may encounter problems.

# Add the NodeSource APT repository for Node 12
curl -sL | sudo -E bash

# Install Node.js
sudo apt-get install -y nodejs

# Install yarn
sudo npm install yarn@latest -g

Install LogChimp

Install LogChimp server

# Create 'server' directory
sudo mkdir server && cd server

# Get the latest release tag name
LATEST_RELEASE_TAG=$(curl --silent "" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')

# Downloading logchimp server to current directory
sudo curl -L -o logchimp-server.tar.gz "$LATEST_RELEASE_TAG"

After extracting the files to current directory.

# Delete the zip file (optional)
sudo rm logchimp-server.tar.gz

# Install packages using yarn


Create logchimp.config.jsonconfiguation file in current directory using LogChimp CLI.


Use the same database name as you've used above while creating LogChimp configuration.

Running in background

Create a service file in /etc/systemd/system/logchimp.service

Description=Build better products with customer feedback

ExecStart=/usr/bin/node /home/logchimp/core/index.js

# Reload systemd
sudo systemctl daemon-reload

Install LogChimp Theme

To install LogChimp default theme.

# Change to user directory
cd /home/<user>

# Download LogChimp theme
git clone "" theme

Build LogChimp theme

# Change to theme directory
cd theme

# Install packages using yarn

# Compile LogChimp theme
yarn build

To customise the build, you can download the source code directly from GitHub.


Check for `dist` folder in the current directory.

Setup Nginx

cd /etc/nginx/sites-available/

# Create nginx configuration for your domain
sudo nano <your_domain>

Now paste this configuration and save the changes

server {
  listen 80;
  listen [::]:80;

  server_name <your_domain> www.<your_domain>;

  root  /home/logchimp/theme/dist;

  location / {
    index  index.html;
    try_files $uri $uri/ /index.html;

  location /api {

  error_page   500 502 503 504  /50x.html;
  location = /50x.html {
    root   /usr/share/nginx/html;
sudo ln -s /etc/nginx/sites-available/<your_domain> /etc/nginx/sites-enabled/

Add SSL certificate to your domain

You're either add your own SSL certificate or create one for free by following the steps:

# Install certbot
sudo apt-get install certbot python3-certbot-nginx -y

Obtaining an SSL certificate

sudo certbot --nginx -d <your_domain>


Enter the same domain name you've used while creating Nginx configuration.

Lastly, certbot will ask how you’d like to configure your HTTPS settings. Select 2 and hit Enter. The configuration will be updated, and Nginx will reload to pick up the new settings.

🎉 Congrats! You've successfully setup your own LogChimp site.