Self-hosted

Self-hosted analytics without the sprawl

Run product analytics on your own servers and keep every event inside your infrastructure. Pug self-hosts as a single Go binary (not a fleet of services) under AGPL-3.0, free forever.

Why self-host

Why teams run analytics themselves

Your data never leaves

Events are written to your own ClickHouse, on your own servers. Nothing is sent to a third party, the whole point of self-hosting analytics.

Compliance on your terms

Pick the region, set the retention, control access. Keeping data inside your own infrastructure simplifies GDPR and data-residency requirements.

No black box

AGPL-3.0: read every line, audit how events are processed, and change what you need. Self-hosting and the source go together.

No per-event bill

Self-hosting is free forever. You pay for the hardware you already run, and nothing per event.

The stack

One binary and three dependencies

Most self-hosted analytics tools mean operating several services. Pug keeps it small: one Go process runs the API and every worker.

SDK track() & identify()
API Connect RPC ingest
NATS Async pipeline
Workers Geo & enrichment
ClickHouse Analytics store
Dashboard Insights & profiles
Your infrastructure
  • Go binary Server + every worker, in one process
  • PostgreSQL Accounts, projects, and config
  • ClickHouse The event and analytics store
  • NATS The async event pipeline
What you get

The full product on your servers

Self-hosting Pug is not a stripped-down build. It is the same product the cloud runs.

  • Autocapture: page views, clicks, scrolls, form submits, rage and dead clicks
  • Six insight types: Trends, Funnels, Retention, Segmentation, User flow, Top K
  • Unified profiles, anonymous activity merges into one person on identify()
  • Dashboards with shared time windows and period-over-period comparison
  • SSO through Google Workspace or your own OIDC identity provider, with verified domains and Require SSO
FAQ

What people ask about self-hosting

What is self-hosted analytics?

Analytics software you run on your own servers, so all visitor and event data stays inside your infrastructure instead of being sent to a third-party cloud. Pug is built to be self-hosted this way under AGPL-3.0.

What do I need to run Pug?

Pug is a single Go binary backed by PostgreSQL (config), ClickHouse (events), and NATS (the queue). One process runs the API and every worker, so the operational footprint is small. See the setup guide for specifics.

Is self-hosting really free?

Yes. Free forever under AGPL-3.0, with no event limits or licensing fee. You provide the infrastructure; Pug provides the software.

Can we sign in with our own identity provider?

Yes. Org admins connect Okta, Microsoft Entra ID, Keycloak or any other OIDC provider from the dashboard, or the operator adds one for the whole server. An identity provider on your internal network works too, and a server that can’t see public DNS verifies domains from the command line. SSO ships in the same AGPL-3.0 build as everything else, not in a paid edition.

Can I move to the cloud later, or vice versa?

Yes. The same code runs our managed cloud and your own deployment, and your data is exportable either way, so you are never locked in.

How is this different from Google Analytics?

Google Analytics is free but Google-hosted. Your data lives on their infrastructure. Self-hosted Pug keeps every event on your servers, unsampled, and open source.

Own the whole stack

Open source and self-hostable as one Go binary. Read the self-hosting guide, or start free on Pug Cloud in minutes.

Questions? Email hello@pug.sh