Plausible Analytics is an open-source web analytics tool that provides privacy-friendly and straightforward web analytics reports. In this tutorial, we will walk you through the steps to install Plausible Analytics on Debian Latest system.
Before installing Plausible Analytics, you need to have these prerequisites:
Before installing any packages, it is recommended to update and upgrade the system packages for better performance and security.
To update and upgrade the system, run the following commands:
sudo apt update
sudo apt upgrade
Plausible Analytics uses Docker to run and manage the containerized application. Therefore, you need to install Docker and Docker Compose on your system.
To install Docker, run the following command:
sudo apt install docker.io
After installing Docker, install Docker Compose using the following commands:
sudo apt install curl
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Next, create a plausible directory to store the plausible configuration files.
sudo mkdir /opt/plausible
Plausible Analytics provides a docker-compose configuration file to quickly deploy the complete environment. You can clone it using the following command:
sudo git clone https://github.com/plausible/docker-compose.git /opt/plausible
You can customize the Plausible configuration by editing the .env
file located at /opt/plausible/.env
. Use any text editor of your choice to modify the configuration. If you want to use the default configuration, then you can skip this step.
Here is the default plausible configuration which is taken from .env
file:
#PLAUSIBLE_DOMAIN=example.com
PLAUSIBLE_DATA_DIR=/opt/plausible/data
PLAUSIBLE_POSTGRES_USER=plausible
PLAUSIBLE_POSTGRES_PASSWORD=plausible
PLAUSIBLE_POSTGRES_DB=plausible
PLAUSIBLE_APP_SECRET=changeme
PLAUSIBLE_API_SECRET=changeme
You can edit the PLASAUBLE_DOMAIN variable to use your domain name.
You can start Plausible Analytics using the following command:
cd /opt/plausible
sudo docker-compose up -d
This command will start the Plausible Analytics container in the background. Wait for a few minutes to allow the container to start up and initialize the setup.
Once the container is up and running, access the Plausible Analytics dashboard by visiting your domain name or IP address in your web browser:
https://yourdomain.com
You will be prompted to enter the email address, password, and site name during the initial setup.
Congratulations! You have successfully installed Plausible Analytics on Debian Latest.
In this tutorial, you have learned how to install Plausible Analytics on Debian Latest using Docker and Docker Compose. You can now enjoy privacy-friendly analytics reports for your website or blog.
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!