<-- Back to The Cleavr Slice

5 November 2021

analytics

How to install Plausible Analytics on your own server

Plausible Analytics is a great alternative to Google Analyics. Hosting plausible on your own Cleavr managed server gives you even more control over the usage data that you collect.

We have been using Plausible Analytics at Cleavr for the last year. Our main reasons were because:

  • Google Analytics was overbearing and provides more than we really needed
  • We made the decision to not contribute to Google's quest to own all web data
  • Plausible is simple and provides the core usage analytics that we need

The best part, Plausible can be installed on your server in just a few minutes!

We encourage you to consider sponsoring Plausible in some way so that they can keep up the good work. Visit their GitHub sponsorship page.

Prerequisite

Have a server provisioned and ready-to-go in Cleavr.

Step 1: Install Docker Service

In the Services section on the server you are installing Plausible on, install the Docker service.

cleavr install docker service

Plausible wraps up their program in a docker container and so we just need to first make sure Docker is installed on the server.

Step 2: Add Generic Port App

Add a new Generic Port App on the server. Add in the URL you want assign to Plausible Analytics.

For the port number, add in 8000. If you have another app using the port, you can customize the port number.

generic port app

Step 3: Run Plausibe Quick Script

In the Quick Script section of Cleavr, add a new quick script with the following script:

cd /home/cleavr
mkdir plausible
cd plausible
git clone https://github.com/plausible/hosting
cd hosting
key="$(openssl rand -base64 64 | tr -d '\n' ; echo)"
echo "
ADMIN_USER_EMAIL={{ADMIN_USER_EMAIL}}
ADMIN_USER_NAME={{ADMIN_USER_NAME}}
ADMIN_USER_PWD={{ADMIN_USER_PWD}}
BASE_URL={{BASE_URL}}
SECRET_KEY_BASE=$key
" > plausible-conf.env

docker-compose up -d

Save the quick script and then run it as cleavr user. Add in the required variables for user name, email, password, and url.

After the script finishes running, you will likely get a false error. Verify the URL you used to make sure that Plausible was successfully installed.

Step 3: Verify Installation And Set Up Plausible

Once the script run is complete, navigate to the url you configured Plausible with and verify the login page shows.

From here, log in and set up Plausible for your sites!

Take control of your servers and deployments. Without breaking a sweat.

Sign up for a 5-day free trial of Cleavr Pro. No credit card required until you decide to subscribe.

Sign up for free
<-- Back to The Cleavr Slice