Plausible Analytics is a simple and privacy-friendly web analytics tool that helps website owners to understand their audience. In this tutorial, we will guide you through the installation of Plausible Analytics on EndeavourOS Latest using the command line.
Before we get started, you must have the following:
Once you have all of these, we can move onto the installation.
Open a terminal window and log in to your server via SSH.
ssh username@your_server_ip_address
Replace the username
and your_server_ip_address
with your own details.
Plausible Analytics requires a web server to function, so we need to install Nginx first.
Update the package repository index before installing Nginx:
sudo pacman -Syu
Then, install Nginx:
sudo pacman -S nginx
Nginx will start automatically after the installation.
Verify if Nginx is running using this command:
sudo systemctl status nginx
We will now install Plausible Analytics using the official package repository.
Run the following commands to download and install Plausible Analytics:
echo "deb https://repo.plausible.io/debian/ ./" | sudo tee /etc/apt/sources.list.d/plausible.list
curl https://plausible.io/plausible-signing.asc | sudo apt-key add -
sudo apt update
sudo apt install plausible-insight
After the installation is complete, we now need to configure Nginx to work with Plausible Analytics.
Create a new Nginx server block:
sudo nano /etc/nginx/conf.d/plausible.conf
Add the following configuration:
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://localhost:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Replace your-domain.com
with your own domain name.
Save and exit the file.
Test the Nginx configuration:
sudo nginx -t
Reload Nginx:
sudo systemctl reload nginx
You can now access Plausible Analytics by visiting your domain name in a web browser.
Example: http://your-domain.com
Log in using your account credentials to access your Plausible Analytics dashboard.
You have successfully installed Plausible Analytics on EndeavourOS Latest. You can now use this tool to track visitors to your website without compromising their privacy.
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!