Umami is a modern open-source web analytics platform for self-hosted websites. It provides essential insights without compromising the privacy of your users. In this tutorial, we will guide you through the process of installing Umami on Debian Latest.
Before we begin, you should ensure that you have the following:
Umami is built using Node.js, so you need to install it first. You can do this by running the following commands:
sudo apt update
sudo apt install nodejs npm -y
Once Node.js and NPM are installed, you can check their version by running:
node -v
npm -v
To install Umami, you need to clone the Umami repository from Github. You can do this by running:
git clone https://github.com/mikecao/umami.git
Next, navigate to the cloned directory:
cd umami
Then, install the required dependencies by running:
npm install
Before you can use Umami, you need to configure it. You can do this by copying the example configuration file and customize it. You can do this by running:
cp .env.example .env
Next, edit the .env
file and set the following variables:
DATABASE_URL
: The URL of your PostgreSQL or MySQL database server.DOMAIN
: The domain name of your Umami installation.ADMIN_EMAIL
: The email address of the Umami administrator.ADMIN_PASSWORD
: The password of the Umami administrator.To create the Umami database, you can use the umami-cli
command-line tool. You can install it by running:
npm install -g umami-cli
Then, create the Umami database by running:
umami-cli migrate
You should see the following output:
✔ Migration complete
To launch Umami, you can use the npm start
command. You can do this by running:
npm start
Now, you can visit http://your-domain.com:3000
in your web browser, and you should see the Umami login screen. Log in using the email and password you defined in Step 3.
By default, Umami listens on port 3000. If you want to expose it to the internet, you can set up an Nginx reverse proxy. You can do this by creating an Nginx configuration file at /etc/nginx/sites-available/your-domain.com
with the following content:
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Then, enable the configuration file by running:
sudo ln -s /etc/nginx/sites-available/your-domain.com /etc/nginx/sites-enabled/
sudo service nginx reload
Now, you should be able to access Umami at http://your-domain.com
in your web browser.
Congratulations! You have successfully installed Umami on Debian Latest. Umami is an excellent alternative to commercial web analytics platforms that respects the privacy of your users while providing essential insights. If you have any questions or comments, feel free to reach out to us.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!