Umami is an open-source, privacy-first web analytics platform designed to provide essential website statistics without tracking users. Unlike many other analytics tools, Umami does not rely on cookies, ensuring compliance with privacy regulations such as GDPR. It allows you to monitor website traffic, page views, and user behavior in real-time without compromising on user privacy. It’s a lightweight alternative to tools like Google Analytics, perfect for individuals and businesses looking for privacy-focused insights.


Creating an Instance on Cloud.shape.host

Step 1: Access the Dashboard and Create

Log in to your Cloud.shape.host account, click Create, and select Instances.

Shape.host Resources dashboard with Create > Instance highlighted.

Step 2: Choose a Datacenter Location

Select a suitable location such as New York, London, or Frankfurt.

Step 3: Select a Plan

Choose the server plan that fits your resource requirements (Standard, CPU-Optimized, Memory-Optimized).

Shape.host instance form with the data center location selector highlighted.

Step 4: Choose an Operating System

Select Ubuntu 24.04.

Shape.host instance form with the operating system image selector highlighted.

Step 5: Configure and Launch

Configure the Network Type and Authentication Method (SSH key or password), then click Create Instance.

Shape.host instance form with the Create Instance button highlighted.

Locate Your Instance’s IP Address

Shape.host Resources dashboard with the server IP address highlighted.

Accessing Your Instance

  • SSH (for Linux/macOS):
   ssh root@<your-instance-ip>

Replace <your-instance-ip> with your instance’s public IP.

  • PuTTY (for Windows):
    Download PuTTY, enter the instance’s public IP, and click Open.

Installing and Configuring Umami

Step 1: Update and Upgrade the System

apt update -y
apt upgrade -y
Terminal showing APT package management commands and output.

Step 2: Install Required Packages

Install Node.js, npm, Git, Apache2, and PostgreSQL:

apt install nodejs npm git apache2 postgresql
Terminal showing APT package management commands and output.

Step 3: Check Apache and PostgreSQL Status

Ensure that both Apache and PostgreSQL are running:

systemctl is-enabled apache2
systemctl status apache2
systemctl is-enabled postgresql
systemctl status postgresql
Terminal showing systemd service management commands or output.
Terminal showing systemd service management commands or output.

Step 4: Verify Node.js and npm Installation

Check the installed versions:

nodejs --version
npm --version
Terminal showing npm commands or output during Verify Node.js and npm Installation.

Step 5: Configure PostgreSQL for Umami

Log into PostgreSQL and create the necessary user and database for Umami:

sudo -u postgres psql

Run the following commands:

CREATE ROLE umami LOGIN ENCRYPTED PASSWORD 'password';
CREATE DATABASE umamidb OWNER=umami;
\du
\l
Terminal showing SQL database and user configuration commands.

Step 6: Install Yarn and Create a User for Umami

Install Yarn globally and create a system user for Umami:

npm install -g yarn
sudo adduser --system --group --no-create-home --shell /sbin/nologin umami
Terminal showing npm package installation messages.
Terminal showing Linux user account management commands.

Step 7: Clone and Install Umami

Clone the Umami repository and install its dependencies:

git clone https://github.com/umami-software/umami.git /var/www/umami
cd /var/www/umami
yarn install
Terminal showing Git repository cloning output.
Terminal showing yarn commands or output during Clone and Install Umami.

Step 8: Configure Umami for PostgreSQL

Edit the .env file to include your PostgreSQL connection details:

nano .env
Terminal showing the command to edit Umami environment configuration.

Add the following PostgreSQL settings:

DATABASE_URL=postgresql://umami:StrongPasswordUmami@localhost:5432/umamidb
Terminal showing the GNU nano editor and configuration text.

Save and Exit:

  • Press CTRL + O, then Enter to save.
  • Press CTRL + X to exit Nano.

Step 9: Build and Start Umami

Build Umami and start the server:

yarn build
yarn start
Terminal showing yarn commands or output during Build and Start Umami.
Terminal displaying Umami application build output.

Visit http://SERVER-IP:3000/ in your browser to access the Umami login page.

Umami sign-in form.

Press Ctrl + C to stop the server after confirming the installation.

Step 10: Configure Umami as a Systemd Service

Change ownership of the Umami files:

chown -R umami:umami /var/www/umami
Terminal showing file ownership or permission commands.

Create a systemd service file for Umami:

nano /etc/systemd/system/umami.service
Terminal showing file ownership or permission commands.

Add the following content:

[Unit]
Description=Umami Website Analytics
After=network.target postgresql.service

[Service]
Type=simple
ExecStart=/usr/bin/npm start
Restart=always
User=umami
Group=umami
WorkingDirectory=/var/www/umami

[Install]
WantedBy=multi-user.target
Terminal showing a systemd service unit configuration.

Save and Exit:

  • Press CTRL + O, then Enter to save.
  • Press CTRL + X to exit Nano.

Step 11: Enable and Start the Umami Service

Reload the systemd daemon, enable, and start the Umami service:

systemctl daemon-reload
systemctl enable --now umami
systemctl status umami
Terminal showing systemd service management commands or output.
Terminal showing systemd service management commands or output.

Step 12: Configure Apache Proxy for Umami

Enable necessary Apache modules:

a2enmod proxy proxy_http ssl rewrite headers
Terminal showing systemd service management commands or output.

Create an Apache configuration file for Umami:

nano /etc/apache2/sites-available/umami.conf
Terminal showing nano commands or output during Configure Apache Proxy for Umami.

Add the following configuration:

<VirtualHost *:80>
  ServerName your.domain.com
  Options -Indexes
  ProxyRequests on
  ProxyPass / http://localhost:3000/
  ProxyPassReverse / http://localhost:3000/
</VirtualHost>
Terminal showing web server configuration text.

Save and Exit:

  • Press CTRL + O, then Enter to save.
  • Press CTRL + X to exit Nano.

Step 13: Enable the Umami Site and Restart Apache

Enable the new site and restart Apache:

a2ensite umami.conf
apachectl configtest
systemctl restart apache2
Terminal showing an Apache configuration test.
Terminal showing systemd service management commands or output.

Step 14: Configure Firewall and Enable SSL

Allow Apache through the firewall:

ufw allow 'Apache Full'
ufw allow ssh
ufw enable
ufw status
Terminal showing firewall configuration commands and rules.

Set up SSL with Certbot:

apt install certbot python3-certbot-apache
certbot --apache --agree-tos --no-eff-email --redirect --hsts --staple-ocsp --email contact@shape.host -d tutorials.shape.host
Terminal showing APT package management commands and output.
Terminal showing Certbot certificate commands and messages.

Accessing Umami

After completing the installation, you can access Umami by opening a web browser and navigating to:

http://your-domain.com

Or, if you’re using your server’s IP address:

http://your-server-ip:3000
Umami sign-in form.

Log in using the default credentials set during installation. Once logged in, you’ll be able to track, monitor, and review web traffic and analytics.

For reliable and scalable hosting services, consider using Shape.Host. Their Cloud SSD VPS services provide a robust and flexible infrastructure, ideal for deploying privacy-focused applications like Umami.