Why Self-Hosting Your Analytics Changes the Privacy Equation
Most website owners hand their visitor data to a third party without thinking twice. Google Analytics is the default choice for millions of sites, but it also funnels behavioral data through Google’s servers, triggers GDPR consent banners, and contributes to cross-site tracking at a scale that would make most site visitors uncomfortable if they understood it. Plausible Analytics offers a different model: lightweight, privacy-respecting, and fully auditable. The self-hosted version, Plausible CE (Community Edition), takes that one step further by keeping every data point on infrastructure you control.
Self-hosting Plausible is not a beginner weekend project, but it is well within reach for anyone comfortable with a Linux terminal and basic Docker operations. The setup involves a VPS, Docker Compose, a reverse proxy, and a domain with SSL. Once running, you get a clean dashboard showing pageviews, referrers, geographic data, and device breakdowns – without cookies, without consent popups, and without sending a single byte to a third party. This guide walks through the full process from a fresh server to a live analytics dashboard.

Server Requirements and Initial Setup
Plausible CE runs comfortably on a modest VPS. A server with 2GB of RAM and 20GB of storage handles most personal projects and small-to-medium traffic sites without strain. The official recommendation is Ubuntu 22.04 LTS, though Debian 12 works equally well. You will need Docker and Docker Compose installed, a domain or subdomain pointed at your server’s IP address via an A record, and ports 80 and 443 open in your firewall. If you are building out a broader self-hosted stack – similar to what you would do when setting up a self-hosted home inventory tracker – a dedicated subdomain like analytics.yourdomain.com keeps things clean and organized.
Start by installing Docker if it is not already present. On Ubuntu, run sudo apt update && sudo apt install docker.io docker-compose-plugin -y, then verify with docker –version and docker compose version. Create a directory for Plausible, something like /opt/plausible, and move into it. This is where your configuration files will live.
Clone the Plausible CE hosting repository from GitHub using git clone https://github.com/plausible/community-edition plausible and enter the directory. You will find a docker-compose.yml file and a sample environment file. Copy the sample with cp plausible-conf.env.example plausible-conf.env and open it in your editor. This is where most of the critical configuration happens before you ever start a container.
Configuring the Environment File
The plausible-conf.env file controls the core behavior of your instance. Set BASE_URL to your full subdomain with HTTPS – for example, https://analytics.yourdomain.com. Generate a 64-character random string for SECRET_KEY_BASE using openssl rand -base64 48 and paste it in. If you want email features like weekly reports or user invitations, fill in the SMTP block with your mail provider’s credentials. For a minimal personal setup, email is optional and can be added later.
Leave the database connection variables at their defaults unless you are connecting to an external PostgreSQL or ClickHouse instance. Plausible CE ships with both databases pre-configured in the Docker Compose file, so unless you have a reason to separate them, the bundled containers are the simplest path. Once the env file is saved, run docker compose up -d from inside the Plausible directory. Docker will pull the required images – Plausible itself, PostgreSQL, and ClickHouse – and start them in the background.

Reverse Proxy, SSL, and Going Live
Plausible by default listens on port 8000 inside Docker. To expose it securely to the internet, you need a reverse proxy sitting in front of it. Caddy is the cleanest option here because it handles SSL certificate provisioning from Let’s Encrypt automatically. Install Caddy with sudo apt install caddy -y, then open /etc/caddy/Caddyfile and add a block for your subdomain. The configuration is minimal: declare the subdomain, point it to localhost:8000, and Caddy handles the rest. A working Caddyfile block looks like this:
analytics.yourdomain.com {
reverse_proxy localhost:8000
}
Reload Caddy with sudo systemctl reload caddy and visit your subdomain in a browser. If the DNS has propagated and your firewall allows traffic on 443, you will be greeted by the Plausible registration screen. The first account you create becomes the admin account. Add your first site by entering its domain – this generates the tracking script you embed on your website. The script is a single line pointing to your Plausible instance, not to any external server.
Paste the tracking snippet into the <head> of your website, save, and reload the page. Within seconds, your Plausible dashboard should register the first pageview. The script itself is under 1KB, loads asynchronously, and does not set cookies – which means in most jurisdictions you are not legally required to display a cookie consent banner for analytics alone. That alone removes a significant amount of friction from the visitor experience on sites that previously relied on consent management platforms just to run basic traffic tracking.

Ongoing maintenance is straightforward. Plausible CE updates are released regularly on GitHub, and updating your instance is a matter of pulling the new image with docker compose pull and restarting with docker compose up -d. Your data lives in the PostgreSQL and ClickHouse volumes on your server, so a proper backup routine means backing up those Docker volumes or using a scheduled database dump to a remote location. The ClickHouse database, which stores event-level data, grows proportionally with your traffic – on a low-to-medium traffic site it stays well under a few gigabytes for years of historical data. What you will not find here is any automatic data expiry, sampling, or traffic caps. Your data is yours, completely, as far back as you have been collecting it.





