
Deploy Plausible GA Import
Bring Google Analytics 4 history into your own Plausible
Just deployed
/var/lib/clickhouse
plausible
Just deployed
/var/lib/plausible
Just deployed
/var/lib/postgresql/data
Deploy and Host self hosted Plausible GA Import (Open-Source Google Analytics Alternative with GA4 Import) on Railway
This template runs Plausible Community Edition v3.2.1 with Postgres, ClickHouse and the Google OAuth wiring needed to pull GA4 history into your own dashboard. For site owners leaving Google Analytics.
About Hosting Plausible GA Import open-source software on Railway (self hosted Plausible Google Analytics import template)
The template runs the official Plausible CE image (v3.2.1) on Railway, with Postgres for sites, goals and users and ClickHouse for events. Railway handles the HTTPS domain, private IPv6 wiring and the migrate-on-boot start command.
Why Deploy Plausible GA Import, the Google Analytics alternative on Railway (Railway Free Trial)
You are trading a free product that pays for itself with your visitors' data for a stack you own: about $10-20 a month on Railway depending on traffic, and a one-time $5 trial credit to see whether ClickHouse fits in 1 GB first.
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Plausible GA Import on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Railway vs Other Hosting Providers and VPS for Plausible GA Import self hosting
Railway hands you the full stack behind a public HTTPS domain; a VPS hands you a box to build yourself.
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | Three services deployed, billed by usage. | A Droplet you secure, then install Docker, ClickHouse and Postgres yourself. |
| AWS | Template deploy, no EC2 or security group work. | EC2 plus RDS and self-managed ClickHouse, wired through IAM and a VPC. |
| Hetzner | Push-button deploy with BASE_URL already matching your domain. | Cheap CPU per euro, but you own patches, backups and memory tuning. |
Railway just skips the ClickHouse memory tuning.
Common Use Cases for hosted Plausible GA Import
- Dropping gtag without losing the chart: you pull the GA4 tag off the site and import the full history into your own dashboard, so year-over-year comparisons still work the week after the switch.
- Several GA4 properties into one site: a rebrand, a domain move or a split between blog and shop can end up as one Plausible site with every past property imported side by side. The importer adjusts date ranges so imports do not overlap each other or your native data.
- Running both trackers first: keep GA4 and Plausible live in parallel for 2 to 4 weeks, compare the totals against real traffic, then remove GA once you trust the numbers.
- A privacy review that needs GA gone: legal asks why a US cloud analytics account still sees EU visitors, and the answer is to self host, import the history and stop sending anything to Google.
- Agencies moving client sites: one Google Cloud project and OAuth client covers the agency account, then each client site gets its own import and its own goals recreated in Plausible.
Dependencies for Plausible GA Import Docker hosted on Railway
Three services ship together: plausible on ghcr.io/plausible/community-edition:v3.2.1 (port 8000, volume /var/lib/plausible), Railway Postgres for users, sites and goals, plus ClickHouse holding events on its own volume.
Deployment Dependencies for Managed Plausible GA Import Service (Web Analytics Migration)
BASE_URL is already https://${{RAILWAY_PUBLIC_DOMAIN}}, so register https://your-railway-domain/auth/google/callback there. No mailer is set, so check import status in site settings.
Implementation Details for Plausible GA Import (Using Plausible CE official docker image)
Start runs /entrypoint.sh db createdb, db migrate, then run, and /api/health reports postgres, clickhouse and sessions. Back up both stores.
How does Plausible GA Import compare against other ways to leave Google Analytics
Plausible vs Google Analytics 4
- Data ownership: GA4 is closed SaaS on Google's servers. This stack keeps events in a ClickHouse volume you control.
- Cookies: GA4 relies on cookies, consent mode and modeled data, so numbers shift after a consent choice. Plausible counts visits without cookies, so imported history and new data both reflect real traffic.
- Where GA4 wins: free at any volume, with deeper ads integration and BigQuery export.
Plausible vs Matomo
- Weight: Matomo is a PHP plus MySQL suite with plugin sprawl. This is an Elixir app, Postgres and ClickHouse with a one-page dashboard.
- GA-style muscle: Matomo has heatmaps, funnels and A/B testing behind paid premium plugins. Plausible CE skips funnels and revenue goals.
- Where Matomo wins: it feels familiar if you came from Universal Analytics, and its own GA import is mature.
Plausible vs Fathom
- Self hosting: Fathom is closed-source SaaS with no on-prem option, so you cannot import GA4 history into an instance you own.
- Pricing shape: Fathom charges flat monthly for a pageview ceiling across many sites. Here you pay Railway for RAM and events, cheap on small sites but less predictable as traffic climbs.
- Where Fathom wins: zero ops. No OAuth client to create, no ClickHouse to size.
Plausible vs Umami
- Stack simplicity: Umami runs on Node with one Postgres database. Plausible adds ClickHouse, which makes fast queries over years of imported events possible, but it is the memory hog you budget for.
- GA4 import: Umami has no built-in GA4 history import. Here it is a settings page, an OAuth client and a few minutes.
- Where Umami wins: MIT licensed and lighter, if you never needed multi-year retention.
How to use Plausible GA Import (the OSS web analytics platform)?
- In Google Cloud create a project, configure the OAuth consent screen, add yourself as a test user, and create a Web application client with redirect URL https://your-domain/auth/google/callback.
- Add the variables to the plausible service and redeploy:
GOOGLE_CLIENT_ID=your-id
GOOGLE_CLIENT_SECRET=your-secret
- Enable the Analytics, Reporting, Admin and Data APIs in the same project.
- Open your site, go to Site Settings > Imports and Exports, click Google Analytics, sign in as the test user, pick the GA4 property and confirm.
- Check the import status in settings. Most runs take minutes, and no email arrives because this template has no mailer.
How to self host Plausible GA Import on other VPS Services (Plausible CE self hosting guide)
Community Edition runs on Docker Compose on a box you patch yourself.
Clone the Repository
Pin the release tag, not master; v3.0.0 to v3.2.0 carry CVE-2026-8467.
git clone -b v3.2.1 --single-branch https://github.com/plausible/community-edition plausible-ce
cd plausible-ce
Install Dependencies
Docker with Compose, a CPU with SSE 4.2 or NEON for ClickHouse, and 2 GB RAM minimum.
Configure Environment Variables
BASE_URL=https://your-domain
SECRET_KEY_BASE=use openssl rand -base64 48
GOOGLE_CLIENT_ID=your-client-id
GOOGLE_CLIENT_SECRET=your-client-secret
Start the Plausible GA Import Application
Run docker compose up -d, then open your domain and register the first user as owner. Set HTTP_PORT=80 and HTTPS_PORT=443 with a compose.override.yml for Let's Encrypt, or sit behind a reverse proxy.
Railway handles the domain, IPv6 private networking, and the Postgres and ClickHouse volumes for you.
Official Pricing of Plausible GA Import (Plausible CE pricing)
Plausible Community Edition is free under AGPL-3.0. There is no license fee and no per-pageview charge for the GA4 importer.
Plausible GA Import cloud vs self hosted comparison (Pricing, features, costs, and more)
Self hosting this template is free software on metered infrastructure. You pay Railway for compute, not a license, and the import costs nothing but setup time.
Monthly cost of self hosting Plausible GA Import on Railway
Railway bills usage, so these are ranges. A low-traffic site with plausible, Postgres and ClickHouse usually lands around $10-20/mo. More events or a MaxMind city database push it past that, since ClickHouse is the memory hog.
System Requirements for Hosting Plausible GA Import on a VPS
The CE README wants a CPU with SSE 4.2 or NEON, a ClickHouse requirement, and at least 2 GB RAM to avoid OOM kills. Back up Postgres and the ClickHouse volume together, or a restore leaves you with half your data.
Frequently Asked Questions (FAQs)
Why does the Google button show a warning?
That warning means GOOGLE_CLIENT_ID or GOOGLE_CLIENT_SECRET is missing or wrong on the plausible service. Fix both, confirm the redirect URL is https://your-railway-domain/auth/google/callback, then redeploy.
Why don't numbers match Google Analytics 4?
GA4 models data and leans on consent mode and cookies; Plausible counts real visits with a daily hash and a 30-minute session. GA4 is also blocked more often, so run both for a few weeks.
Can I import more than one GA4 property?
Yes. Date ranges shift so imports don't overlap with native data, and you choose the order.
Are GA4 conversions and custom events imported as goals?
No. Only traffic stats come across, so recreate goals in Plausible by hand before you pull the GA4 tag.
How do I delete an import?
Site Settings > Imports and Exports, find the import and delete it. You can also toggle imported data off from the dashboard options menu.
Do I still need a cookie banner?
Plausible sets no cookies and stores no persistent identifiers, so most sites drop the banner for its own tracking. Other scripts on the page still decide that.
Template Content
