Free & Private Website Analytics Made Easy with Plausible (No Google, No Cookies)

If you're seeking a privacy-focused, open-source alternative to Google Analytics, look no further than Plausible Analytics. With the Community Edition (CE), you can easily self-host your analytics and keep full control over your data – no third parties, no tracking surprises. This guide will walk you through the process of setting up Plausible CE using Docker, making it accessible even for those new to self-hosting.
You will learn from this insight:
- What Is Plausible Community Edition?
- Plausible Prerequisites
- How to Install Plausible Docker Image
- How to Configure Reverse Proxy with Plausible
- Final Thoughts
What Is Plausible Community Edition?
Plausible CE is a free, open-source version of Plausible Analytics designed for self-hosting. It offers a lightweight, cookie-free, and GDPR-compliant solution for website analytics. By hosting it yourself, you maintain full ownership of your data without relying on third-party services and also improve your rating in Lighthouse.
Prerequisites
Before diving in, ensure you have the following:
- A server with Docker, Docker Compose and git installed.
- A CPU supporting SSE 4.2 (x86_64) or NEON (ARM64) instructions.
- At least 2 GB of RAM.
- A domain name (or a subdomain) configured to point to your server.
Step-by-Step Setup Guide
Step 1: Installing Plausible Docker Image
1. Clone the Repository
git clone -b v3.0.1 --single-branch https://github.com/plausible/community-edition plausible-ce
cd plausible-ce
- Configure Environment Variables
touch .env
# Replace 'plausible.yourdomain.com' with your actual domain
echo "BASE_URL=https://plausible.yourdomain.com" >> .env
# Secure random string used for encryption
echo "SECRET_KEY_BASE=$(openssl rand -base64 48)" >> .env
# Internal port that Plausible will run on
echo "HTTP_PORT=7480" >> .env
- Configure Port Forwarding from Docker Image to Server
cat <<EOF > compose.override.yml
services:
plausible:
ports:
- 127.0.0.1:7480:7480
EOF
- Launch the Services.
Start the Plausible services using Docker Compose:
docker compose up -d
Let's check if everything went well:
curl -I http://localhost:7480
HTTP/1.1 200 OK
access-control-allow-credentials: true
access-control-allow-origin: *
access-control-expose-headers:
cache-control: max-age=0, private, must-revalidate
content-length: 15454
content-type: text/html; charset=utf-8
date: Thu, 17 Apr 2025 15:40:26 GMT
referrer-policy: strict-origin-when-cross-origin
server: Cowboy
x-content-type-options: nosniff
x-download-options: noopen
x-frame-options: SAMEORIGIN
x-permitted-cross-domain-policies: none
x-request-id: GDclVNeXz42FXMwAACJB
x-robots-tag: noindex, nofollow
Successfull Response
If you see something like this, then the installation was successful and you can proceed to the next step.
Step 2: Configuring Reverse Proxy
- Open the Nginx config (usually
/etc/nginx/nginx.conf
) and add these lines there if they are not there already:
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
- Open the Nginx config for your domain or subdomain and paste the following lines into it:
location / {
proxy_pass http://127.0.0.1:7480;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /live/websocket {
proxy_pass http://127.0.0.1:7480;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
After this your config should look something like this:
server
{
##########################
# If you are using SSL. #
# ---------------------- #
# listen 443 ssl; #
# listen [::]:443 ssl; #
##########################
listen 80;
listen [::]:80;
server_name plausible.yourdomain.com;
root /www/wwwroot/plausible.yourdomain.com;
location / {
proxy_pass http://127.0.0.1:7480;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /live/websocket {
proxy_pass http://127.0.0.1:7480;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
}
- Restart Nginx:
systemctl restart nginx
- Access the Dashboard
Once the services are running, navigate to https://plausible.yourdomain.com
in your browser. You should see the Plausible Analytics dashboard, ready for you to create an account and begin tracking your website's analytics.
For instructions on setting up other servers other than Nginx, you can visit the official documentation.
Final Thoughts
Self-hosting Plausible Analytics Community Edition offers a robust, privacy-respecting alternative to traditional analytics platforms. With Docker simplifying the deployment process, even beginners can set up their analytics dashboard with ease. For comprehensive details and updates, visit the official Plausible CE GitHub repository
