To replace Google Analytics and maintain full control over your data, the optimal choice is to use plausible self hosted, Umami, or PostHog on your own VPS. This allows you to avoid cookie banners, protect user privacy, and save between $50 and $300 per month on subscriptions for traffic starting at 100,000 visits.
Why a modern project needs a ga alternative and a move away from Google
Google Analytics 4 (GA4) has become a bloated tool, overloaded with interface complexities and legal hurdles. the main problem with GA4 lies in GDPR violations: transferring EU user data to US servers has been ruled illegal in many European jurisdictions. Using privacy analytics on your own server solves this problem at its root, as the data never leaves your perimeter.
The problem of privacy and ad blockers
Google Analytics scripts are blocked by extensions like uBlock Origin and by browsers like Brave or Safari by default. This leads to a loss of 30–50% of traffic data. When you deploy umami analytics vps or Plausible, you can proxy requests through your own domain, making the analytics invisible to most blockers and ensuring data accuracy close to 100%.
Economic benefits of self-hosted solutions
Cloud versions of Plausible start at $19/mo for 100,000 pageviews. If your project grows to 1 million views, the price jumps to $69/mo. PostHog in the cloud can generate bills for hundreds or thousands of dollars at high event volumes. Renting a VPS for $10–$20 allows you to process millions of events without increasing the cost of ownership. If you are planning a migration from Vercel or Netlify to your own VPS, installing analytics in the same cluster is a logical step to optimize costs.
Plausible self hosted: minimalism and high performance
The plausible self hosted solution is geared toward those who need clean numbers without the noise. It is a lightweight analytics tool written in Elixir that uses a ClickHouse database for fast processing of millions of rows. The tracking script weighs less than 1 KB, which is 45 times smaller than the standard Google Analytics tag.
Technology stack and requirements
Plausible requires ClickHouse for storing metrics and PostgreSQL for storing metadata (users, sites). For stable operation of a project with traffic up to 500,000 views per month, a VPS with 2 vCPUs and 4 GB RAM is sufficient. ClickHouse compresses data efficiently, so a 40-60 GB NVMe disk will last for several years of history storage.
Looking for a reliable server for your projects?
VPS from $10/mo and dedicated servers from $9/mo with NVMe, DDoS protection, and 24/7 support.
View offers →
# Example of a docker-compose snippet for Plausible
services:
plausible_db:
image: postgres:14-alpine
volumes:
- db_data:/var/lib/postgresql/data
plausible_events_db:
image: clickhouse/clickhouse-server:23.3-alpine
volumes:
- event_data:/var/lib/clickhouse
- ./clickhouse-config.xml:/etc/clickhouse-server/config.d/logging.xml
Advantages over competitors
- No cookies: Plausible does not use cookies and does not track users across sites, freeing you from the need to display annoying cookie banners.
- Speed: The interface loads reports instantly even with massive data sets.
- Open Source: You can modify the code to suit your needs, although the AGPL license imposes certain obligations.
Umami analytics vps: ease of installation and completely free
If you need a solution that can be deployed in 5 minutes, umami analytics vps is the perfect choice. It is a Node.js application that works with a standard MySQL or PostgreSQL database. Unlike Plausible, Umami does not require ClickHouse, which significantly lowers the entry barrier and server RAM requirements.
Architecture and ease of integration
Umami is ideal for small to medium-sized websites, blogs, and landing pages. It consumes minimal resources: 1 GB RAM and 1 vCPU are enough to run it. This allows you to run analytics on the cheapest VPS plan or even alongside your main application. When working with sensitive data, it is important to ensure access security by using self-hosted password managers to store API keys and database passwords.
Key features of Umami
- Unlimited websites: Track hundreds of domains from a single dashboard.
- Events and goals: Support for tracking button clicks, form submissions, and other custom events.
- Public links: The ability to share statistics for a specific site via a unique URL without registration.
PostHog selfhost: Mixpanel and Amplitude level analytics
The posthog selfhost tool is not just a visit counter, but a full-fledged product analytics platform. While Plausible tells you how many people came, PostHog shows you exactly what they did by recording sessions and building complex conversion funnels.
Functionality for product teams
PostHog includes tools that you would normally have to pay for separately in other services:
- Session Recording: Visual replay of user actions on the site.
- Feature Flags: Manage application functionality (A/B tests) without deploying code.
- Heatmaps: Click heatmaps for usability analysis.
- Cohorts: Grouping users by behavior for deep retention analysis.
Complexity and resources
It should be noted that posthog selfhost is a heavy solution. It includes Kafka, ClickHouse, Redis, PostgreSQL, and several microservices in Python/Go. A minimum installation requires a VPS with 4-8 GB RAM. If your project involves big data processing or machine learning where you are already using vector databases on a VPS, PostHog will be a powerful addition to your data infrastructure.
Comparison of self-hosted analytics systems
To choose the right tool, it is important to compare them across key parameters: resource consumption, maintenance complexity, and functional capabilities.
| Feature |
Plausible |
Umami |
PostHog |
| Main Focus |
Simplicity and Privacy |
Free GA Replacement |
Product Analytics |
| Database |
ClickHouse + Postgres |
Postgres / MySQL |
ClickHouse + Postgres + Kafka |
| Min. RAM |
2-4 GB |
1 GB |
4-8 GB |
| Setup Complexity |
Medium (Docker) |
Low (Docker/Node) |
High (Docker Compose/K8s) |
| Session Recording |
No |
No |
Yes |
| A/B Testing |
Basic |
No |
Advanced |
Installation via Docker: a step-by-step algorithm
Using Docker is the standard for deploying privacy analytics. It isolates dependencies and allows for quick system updates. Let's look at the process using Plausible as an example, as it is the most balanced solution.
Preparing the environment
Before installation, ensure that Docker and Docker Compose are installed on your VPS. You will also need a domain name and a configured reverse proxy (Nginx or Traefik) for HTTPS operation.
# System update and Docker installation
apt update && apt upgrade -y
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
Plausible Configuration
Clone the official hosting repository and set up the environment file. Be sure to generate a strong secret key for sessions.
git clone https://github.com/plausible/hosting
cd hosting
openssl rand -base64 48 # Generate a secret
nano plausible-conf.env
In the plausible-conf.env file, specify your domain, SMTP parameters for notifications, and the generated secret. After that, start the containers with the command docker compose up -d. In a few minutes, the analytics will be available at your domain address.
Workflow optimization and data automation
After setting up data collection, the task of processing or transferring it to other systems (CRM, Telegram bots) often arises. For these purposes, self-hosted n8n is ideal; it can pull data via the Plausible or PostHog API and build automated funnels without writing code.
Bypassing ad blockers
To ensure your umami analytics vps or Plausible collects data even from users with AdBlock, use the Reverse Proxy technique. Instead of connecting the script from the domain analytics.yourdomain.com, configure proxying in Nginx so that the script is served from the main domain at the path /js/script.js.
# Example Nginx config for proxying
location /stats/js/script.js {
proxy_pass http://localhost:8000/js/script.js;
proxy_set_header Host analytics.yourdomain.com;
}
location /stats/api/event {
proxy_pass http://localhost:8000/api/event;
proxy_set_header Host analytics.yourdomain.com;
}
Security and data storage
When using posthog selfhost or other tools, you become responsible for the safety of personal data. Regular backups of PostgreSQL and ClickHouse databases are critical. Use Restic or similar tools to automatically copy dumps to S3-compatible storage.
Scaling resources
As traffic grows, ClickHouse will begin to consume more disk space. It is recommended to use a VPS with NVMe disks, as read/write speed directly affects the responsiveness of the analytics interface when building reports for long periods. If you feel the current server is struggling, migrating to a more powerful instance in Docker is done by simply moving the folder with volumes and configuration files.
Conclusion
For most content projects and small businesses, Plausible self hosted is the best choice due to its balance of speed and functionality. If the server budget is limited to $5, choose Umami, and for complex SaaS products requiring user behavior analysis, PostHog is indispensable.
Ready to choose a server?
VPS and dedicated servers in 72+ countries with instant activation and full root access.
Start Now →