Skip to content

Setting Up Plausible Analytics on a Linux Server – Privacy-Friendly Web Analytics Ready to Go

Discover how to set up a privacy-focused web analytics platform for clear insights and fast performance → Learn more now

12 November 20263 min read16 Views0 helpful

Introduction

Plausible is a lightweight, open-source web analytics platform that operates completely without cookies and fully complies with data protection regulations. It provides you with key metrics such as visitor numbers, page views, and visit duration through a clean, intuitive dashboard. Thanks to its ease of use, fast performance, and EU-based infrastructure, Plausible is a modern and privacy-conscious alternative to Google Analytics.

Want to self-host the service? We guide you step-by-step through the setup and configuration, showing you everything you need to consider.

Requirements

Before installing Plausible, make sure your hosting environment meets the following requirements to ensure a smooth installation and optimal performance.

HardwareMinimumZAP Hosting Recommendation
CPU1 vCPU core4 vCPU cores
RAM2 GB4 GB
Disk Space10 GB25 GB

The software requires all necessary dependencies to be installed and to run on a supported operating system. Verify that your server meets the following requirements before starting the installation:

Dependencies: Docker

Operating System: Latest version of Ubuntu/Debian with Docker 26+ support

Ensure all dependencies are installed and the correct operating system is used to avoid compatibility issues during Plausible installation.

Preparation

Before setting up Plausible, you need to prepare your system. This includes updating your operating system to the latest version and installing all required dependencies. This preparation ensures a stable environment and helps prevent issues during or after installation.

Update System

To run your system with the latest software and security updates, first perform an update by running:

Code
sudo apt update && sudo apt upgrade -y

This ensures your system has the latest security patches and software versions before installation.

Install Dependencies

Once the update is complete, you can start installing dependencies.

Git

Plausible data is downloaded via GitHub, so Git must be installed. Run:

Code
sudo apt install git-all

Docker

Plausible runs inside a Docker container on your server. Therefore, Docker must be installed first. Run the following commands:

Code
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh

For a detailed guide on installing and using Docker, see our Docker tutorial.

Installation

After meeting all requirements and completing preparations, you can start installing Plausible.

Clone the Community Edition repository and create the necessary configuration file:

Code
$ git clone -b v3.0.1 --single-branch https://github.com/Plausible/community-edition Plausible-ce

Now create an environment file (.env) and define the key variables. The BASE_URL must point to the actual domain that already has a DNS record pointing to your server. Also, generate a random SECRET_KEY_BASE with at least 64 bytes:

Code
touch .env
echo "BASE_URL=https://Plausible.example.com" >> .env
echo "SECRET_KEY_BASE=$(openssl rand -base64 48)" >> .env
echo "HTTP_PORT=80" >> .env
echo "HTTPS_PORT=443" >> .env

Check the file content with cat .env to ensure the values are correct. The output should look like this:

Code
BASE_URL=https://Plausible.example.com
SECRET_KEY_BASE=As0fZsJlUpuFYSthRjT5Yflg/NlxkFKPRro72xMLXF8yInZ60s6xGGXYVqml+XN1
HTTP_PORT=80
HTTPS_PORT=443

These standard ports allow Let’s Encrypt to automatically issue TLS certificates. If you want to run Plausible behind a reverse proxy, you can adjust these values. Also, create a compose.override.yml to expose the correct ports for the Plausible container:

Code
cat > compose.override.yml << EOF
services:
  Plausible:
    ports:
      - 80:80
      - 443:443
EOF 

Finally, start the required services with Docker Compose:

Code
docker compose up -d

Once the containers are running, open your browser and visit the domain you specified in BASE_URL. Create the first user account there.

Configuration

Plausible can be connected to Google Search Console to enrich your analytics with search query data. This lets you see which keywords drive traffic to your site and gain deeper insights into visitor behavior.

If you already have a Google Cloud account and an OAuth client set up, simply enter your credentials (GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET) into the .env file. After saving, restart your Docker services with docker compose up -d. In the Plausible dashboard, under Site Settings > Integrations, you can complete the connection and authenticate.

If you don’t have an OAuth client yet or are unsure how to set one up, the official Plausible Wiki offers a detailed step-by-step guide. It explains how to create a project in Google Cloud, enable the necessary APIs, configure an OAuth client, and add the generated credentials to Plausible: Plausible Wiki: Google Integration.

Using Google Search Console, you can configure the Google integration to fetch search term data directly from the Search Console – very convenient.

If you already have a Google Cloud account with an OAuth client, just add your GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET to the .env file, restart the Docker service with docker compose up -d, and follow the instructions in the Plausible dashboard under Site Settings > Integrations.

Completion and Further Resources

Congratulations! You have successfully installed and configured Plausible on your VPS/Dedicated Server. We also recommend checking out the following resources to help with further server configuration:

Do you have specific questions not answered here? Our team is available daily for further questions or support – just get in touch! 🙂

FAQ

Frequently asked questions

Plausible is a lightweight, open-source web analytics platform that operates without cookies and fully complies with data protection laws – a privacy-friendly alternative to Google Analytics.
Plausible requires Docker and runs on the latest version of Ubuntu/Debian with Docker 26+ support.
Minimum requirements are 1 vCPU core, 2 GB RAM, and 10 GB disk space. ZAP Hosting recommends 4 vCPU cores, 4 GB RAM, and 25 GB disk space.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.