Hero
Back to all articles

How to Self-Host OpenPanel Analytics Platform

Learn how to self-host OpenPanel web analytics platform. Step-by-step guide to install and configure your own analytics server for better privacy and cost savings.

OpenPanel Team

2/28/2025

Updated on 12/2/2025

TLDR

Run the script below, you can also watch the video were we show the entire process (at the bottom of the page).

git clone https://github.com/openpanel-dev/openpanel.git
cd openpanel/self-hosting
./setup
./start

Why Self-Host Your Own Analytics Platform?

Looking for a Mixpanel alternative? Self-hosting your own web analytics and product analytics platform comes with several benefits. Let's break down the pros and cons of running your own analytics server.

For a comparison of all open source analytics platforms, see our comprehensive guide to open source web analytics tools.

Cost Benefits

Self-hosting your own web analytics solution is typically much more cost-effective than cloud-based alternatives, especially as your traffic grows. This is one of the primary reasons organizations choose to self-host their analytics.

Data Privacy and Control

When you self-host OpenPanel, you maintain complete control over your website statistics and visitor data. This makes it easier to:

  • Ensure GDPR and privacy compliance
  • Keep sensitive analytics data within your infrastructure
  • Maintain full ownership of your website traffic data
  • Customize data retention policies

Self-hosting is ideal if you

  • Are comfortable managing a server
  • Need customizable web traffic monitoring
  • Want direct database access to your analytics data
  • Prefer open-source analytics solutions

Considering cloud

OpenPanel offers a cloud version of the platform, which is a hosted solution that you don't need to self-host. This might be the better option if you don't want to manage your own server.

It can actually be cheaper as well depending on traffic and server provider you choose.

Prerequisites

Before installing your self-hosted analytics platform, you'll need:

  • A server to host OpenPanel. We recommend using Hetzner (use our referral link to support our work) as they offer reliable and cost-effective hosting solutions.
  • A domain name pointed to your server's IP address. If you're using Cloudflare as your DNS provider, make sure to disable the proxy mode (gray cloud) and use DNS only mode (orange cloud) for the domain or subdomain you'll use for OpenPanel.
  • Basic command line experience

How to self-host OpenPanel

Now that you have a server and a domain name, you can start the installation process.

Step 1: SSH into your server

Let's SSH into your newly (or already existing) server. If its fresh from the server provider, we recommend to make some changes to secure it. We have a guide on how to secure your server that you can follow.

ssh root@your-server-ip

Step 2: Pull source code

Now we need to pull OpenPanel's source code which is open-sourced and available on GitHub.

git clone https://github.com/openpanel-dev/openpanel.git

Step 3: installation

After you have pulled the source code, you should have a folder named openpanel in your server. Lets jump into that and then the self-hosting folder.

cd openpanel/self-hosting

Inside this folder you usually run all commands related to your installation, weather you need to restart something or check if there is any available updates.

Now let's start the quiz/wizard which will guide you through the installation process. This will first ensure that you have docker and node installed, if not it will install them for you.

After that it'll run npm install and npm run quiz which will ask you some questions about your installation.

The questions are below and should be self-explanatory.

  • Ask for your domain name (must start with http:// or https://)
    • The domain name were you can access your OpenPanel instance.
  • Configure which dependencies to install (Clickhouse, Redis, PostgreSQL)
    • You can choose to install all of them or just the ones you need (if you already have some of them running on your server you could re-use them)
  • Set up proxy settings (Caddy with SSL or bring your own)
    • This will set up the proxy settings for your OpenPanel instance. We recommend using Caddy with SSL option.
  • Configure worker count for processing
    • This will configure the number of workers for your OpenPanel instance. Typically this should be fine with 1-2 (you can change this later in docker-compose.yml file)
  • Set up resend api token (optional)
    • If you leave this blank some features will be disabled (email sending)
  • Create basic auth credentials for the worker dashboard
    • This will create basic auth credentials for the worker dashboard (Bullboard).
./setup

Step 4: Start OpenPanel

Now that you have answered the questions, you can start OpenPanel with the following command.

We usually follow up with ./logs to check if everything is running fine.

./start

# Check if everything is running fine
./logs

Step 5: Access OpenPanel

Now that OpenPanel is running, you can access it by going to the domain name you chose in the quiz.

Available Commands

OpenPanel comes with several utility scripts to manage your installation:

Basic Operations

./start                   # Start all OpenPanel services
./stop                    # Stop all OpenPanel services
./logs                    # View real-time logs from all services
./update                  # Pull latest changes and restart services
./rebuild <service>       # Rebuild and restart a specific service
                          # Example: ./rebuild op-dashboard
./danger_wipe_everything  # ⚠️ Removes all containers, volumes, and data

Environment Variables

If you change the .env file, you need to restart the services for the changes to take effect.

You can customize your OpenPanel installation by modifying the .env file in the self-hosting directory.

Typically its only these two that you need to change:

# Disable new user registration (will always allow the first user to register)
ALLOW_REGISTRATION="false" 

# Allow registrations through invites even tho registration is disabled
ALLOW_INVITATION="true"

Troubleshooting Common Issues

Connection Issues

If you can't access your analytics dashboard after installation:

  • Verify your domain DNS settings
  • Check if all Docker containers are running with docker compose ps
  • Ensure your firewall allows traffic to the necessary ports

Performance Optimization

For high-traffic websites:

  • Adjust worker count in docker-compose.yml
  • Monitor database performance

Updates and Maintenance

To keep your analytics platform running smoothly:

  • Regularly check for updates using ./update
  • Monitor disk usage
  • Back up your data periodically

Loved by builders everywhere

From indie hackers to global teams, OpenPanel helps people understand their users effortlessly.

  • Steven Tey
    Steven Tey
    @steventey

    Open-source Mixpanel alternative just dropped → http://git.new/openpanel

    It combines the power of Mixpanel + the ease of use of @PlausibleHQ into a fully open-source product.

    Built by @CarlLindesvard and it’s already tracking 750K+ events 🤩

  • Pontus Abrahamsson - oss/acc
    Pontus Abrahamsson - oss/acc
    @pontusab

    Thanks, OpenPanel is a beast, love it!

  • Piotr Kulpinski
    Piotr Kulpinski
    @piotrkulpinski

    The Overview tab in OpenPanel is great. It has everything I need from my analytics: the stats, the graph, traffic sources, locations, devices, etc.

    The UI is beautiful ✨ Clean, modern look, very pleasing to the eye.

  • greg hodson 🍜
    greg hodson 🍜
    @h0dson

    i second this, openpanel is killing it

  • Jacob 🍀 Build in Public
    Jacob 🍀 Build in Public
    @javayhuwx

    🤯 wow, it's amazing! Just integrate @OpenPanelDev into http://indiehackers.site last night, and now I can see visitors coming from all round the world.

    OpenPanel has a more beautiful UI and much more powerful features when compared to Umami.

    #buildinpublic #indiehackers

  • Lee
    Lee
    @DutchEngIishman

    Day two of marketing.

    I like this upward trend..

    P.S. website went live on Sunday

    P.P.S. Openpanel by @CarlLindesvard is awesome.

Ready to understand your users better?
Start tracking in minutes

Join thousands of companies using OpenPanel. Free 30-day trial, no credit card required. Self-host for free or use our cloud.

Get started now