How to install Umami (self-hosted web analytics solution) on Ubuntu

Published: 28 February 2023
on channel: Quickloss3
511
like

Update Server:
apt update && apt upgrade -y

Set Hostname:
hostnamectl set-hostname ex.example.com

Install Docker:

sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release

sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubu... | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

I'm replacing angled bracket with square bracket ###

echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list ] /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose

Installing Umami:
cd /opt
sudo git clone https://github.com/mikecao/umami.git
cd umami
openssl rand -base64 32
sudo nano docker-compose.yml
update
HASH_SALT:
ports:

sudo docker-compose up --detach

Installing Nginx:
sudo apt update
sudo apt install nginx
sudo ufw allow "Nginx Full"
sudo nano /etc/nginx/sites-available/umami.conf
paste

server {
listen 80;
listen [::]:80;
server_name ex.example.com;

access_log /var/log/nginx/umami.access.log;
error_log /var/log/nginx/umami.error.log;

location / {
proxy_pass http://localhost:3000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

sudo ln -s /etc/nginx/sites-available/umami.conf /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx

Access UI:
http://ex.example.com/login

user-admin
pass- umami


Watch video How to install Umami (self-hosted web analytics solution) on Ubuntu online without registration, duration hours minute second in high quality. This video was added by user Quickloss3 28 February 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 511 once and liked it like people.