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.
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).
Step 4: Choose an Operating System
Select Ubuntu 24.04.
Step 5: Configure and Launch
Configure the Network Type and Authentication Method (SSH key or password), then click Create Instance.
Locate Your Instance’s IP Address
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
Step 2: Install Required Packages
Install Node.js, npm, Git, Apache2, and PostgreSQL:
apt install nodejs npm git apache2 postgresql
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
Step 4: Verify Node.js and npm Installation
Check the installed versions:
nodejs --version
npm --version
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
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
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
Step 8: Configure Umami for PostgreSQL
Edit the .env
file to include your PostgreSQL connection details:
nano .env
Add the following PostgreSQL settings:
DATABASE_URL=postgresql://umami:StrongPasswordUmami@localhost:5432/umamidb
Save and Exit:
- Press
CTRL + O
, thenEnter
to save. - Press
CTRL + X
to exit Nano.
Step 9: Build and Start Umami
Build Umami and start the server:
yarn build
yarn start
Visit http://SERVER-IP:3000/
in your browser to access the Umami login page.
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
Create a systemd service file for Umami:
nano /etc/systemd/system/umami.service
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
Save and Exit:
- Press
CTRL + O
, thenEnter
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
Step 12: Configure Apache Proxy for Umami
Enable necessary Apache modules:
a2enmod proxy proxy_http ssl rewrite headers
Create an Apache configuration file for Umami:
nano /etc/apache2/sites-available/umami.conf
Add the following configuration:
<VirtualHost *:80>
ServerName your.domain.com
Options -Indexes
ProxyRequests on
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
</VirtualHost>
Save and Exit:
- Press
CTRL + O
, thenEnter
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
Step 14: Configure Firewall and Enable SSL
Allow Apache through the firewall:
ufw allow 'Apache Full'
ufw allow ssh
ufw enable
ufw status
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
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
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.