
Deploy Plausible Ghost
Cookie-free analytics for Ghost blogs and newsletters
Just deployed
/var/lib/clickhouse
plausible
Just deployed
/var/lib/plausible
Just deployed
/var/lib/postgresql/data
Deploy and Host self hosted Plausible Ghost (Cookie-Free Analytics for Ghost Blogs) on Railway
This template runs self-hosted Plausible Community Edition with Postgres and ClickHouse for Ghost publishers who want page views and signup goals without a cookie banner.
About Hosting Plausible Ghost open-source software on Railway (self hosted Plausible analytics for Ghost template)
Plausible Ghost gives you a self-hosted Plausible Community Edition stack that you run under your own domain, so every pageview, goal and outbound click lands in a database you control.
Why Deploy Plausible Ghost, the Ghost native analytics alternative on Railway (Railway Free Trial)
Ghost's built-in analytics covers basic traffic and member counts. It falls short on per-post detail, sponsor link clicks and signup goals.
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 Ghost 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 Ghost self hosting
Plausible CE runs as three services, so the hosting choice matters. Here is how Railway compares.
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | All three services deployed, private networking wired, and a public HTTPS domain issued. | A droplet you size yourself, with Docker, reverse proxy and certificates to manage. |
| AWS | A running stack in one click, with memory limits you can raise as ClickHouse grows. | Full control over networking, but IAM and VPC setup take real time before the first pageview. |
| Hetzner | A managed template matching the official compose file, with no OS to patch. | Cheap RAM for ClickHouse, traded for handling your own backups and updates. |
Pick Railway for a stack running today, and a VPS if you want the cheapest RAM per dollar.
Common Use Cases for hosted Plausible Ghost
- Per-post page views: Once the Code Injection snippet is saved in Ghost Admin, every post and page reports to your Plausible dashboard. You see which essays get read, not just which ones got opened.
- Counting newsletter signups: Add a pageview goal for your signup confirmation page, such as /signup/success*. Pageview goals match the path only, so a query string like ?ref=newsletter still counts.
- Outbound link clicks to sponsors: Turn on the Outbound links toggle and Plausible creates a goal called Outbound Link: Click automatically. Those clicks count toward your monthly pageviews.
- Sharing a public dashboard with advertisers: Publish a shared link to your site dashboard so a sponsor can check reach without logging in. It backs up a rate card with real numbers.
- Excluding your own visits: Use Block your current IP under Site settings, then Shields, so your checks don't inflate the stats. Block both IPv4 and IPv6 if your browser uses both.
Dependencies for Plausible Ghost Docker hosted on Railway
This template runs three services that depend on each other, so deploy order matters.
Deployment Dependencies for Managed Plausible Ghost Service (Web Analytics)
The plausible service uses the image ghcr.io/plausible/community-edition:v3.2.1, listens on port 8000, gets a public HTTPS domain and mounts a volume at /var/lib/plausible.
Implementation Details for Plausible Ghost (Using Plausible official docker image)
Most of the wiring is environment variables on the plausible service. Set DISABLE_REGISTRATION to invite_only so the first user becomes owner and everyone after needs an invite.
How does Plausible Ghost compare against other analytics options for Ghost publications
Plausible Ghost vs Ghost native analytics (Ghost Admin Stats)
- Depth of data: Ghost Admin shows basic traffic and member numbers with no setup. Plausible adds per-page views, referrers, and goals you define, like a newsletter signup confirmation page.
- Ownership: Ghost's numbers live inside the publishing platform. Plausible events sit in your own Postgres and ClickHouse services on Railway, which you can back up.
- Setup effort: Ghost native analytics wins here since there is nothing to deploy. Plausible needs a Railway service and a snippet pasted into Code Injection.
Plausible Ghost vs Google Analytics (GA4 on Ghost)
- Cookies and consent: Google Analytics uses cookies, so EU audiences usually need a consent banner. Plausible uses no cookies or personal data, so you typically skip the banner.
- Script weight: Plausible's script is lightweight, which helps Ghost theme page loads.
- Where Google wins: GA4 is free and has deep ads integration and a far larger feature set. Plausible CE does include a Google Analytics import if you are migrating history.
Plausible Ghost vs Fathom (Fathom Analytics Alternative)
- Hosting model: Fathom is closed-source SaaS with no self-hosted option. Plausible CE is AGPL-3.0 and runs in your own Railway project.
- Dashboard style: Both aim for a simple, privacy-focused dashboard. Fathom offers polished hosted support, while Plausible CE is community supported only.
- Where Fathom wins: If you want zero infrastructure, Fathom's hosted service is less work, at the cost of vendor lock-in.
Plausible Ghost vs Umami (Umami Self Hosted Alternative)
- Stack complexity: Umami is MIT-licensed and runs on a simpler single-database stack with PostgreSQL. Plausible CE pairs Postgres with ClickHouse for events, which is heavier.
- Feature set: Plausible includes goals, outbound link tracking, and UTM campaigns out of the box. Umami is leaner.
- Where Umami wins: If you want the lowest memory footprint and one database to back up, Umami is the lighter choice.
How to use Plausible Ghost (the OSS web analytics platform)?
Work through these steps on your first day after the deploy finishes. The goal is to get stats flowing, then add the goals that show which posts bring in signups.
- Log in to your Plausible instance and add your Ghost site by its domain, without a trailing slash.
- Open Site Settings, go to General, then Tracking, and copy the Site installation snippet.
- In Ghost Admin, go to Settings, Advanced, Code injection, and paste the snippet into the Site header box.
- Save, open your blog in a private window, and check the realtime view in Plausible.
- Add a pageview goal for your newsletter confirmation page and turn on outbound link tracking.
- Block your own IP under Shields, IP Addresses, so admin visits stay out of the numbers.
How to self host Plausible Ghost on other VPS Services (Plausible self hosting guide)
This path is for running Plausible CE on your own VPS instead of Railway. It uses the official community edition compose file.
Clone the Repository
Pin the release tag so you get the security-patched build.
git clone -b v3.2.1 --single-branch https://github.com/plausible/community-edition plausible-ce
cd plausible-ce
Install Dependencies
You need Docker with the Compose plugin. Your CPU must support SSE 4.2 or NEON, or ClickHouse will not start.
docker compose version
Configure Environment Variables
Create a .env file with your public URL and a generated secret. Point your domain's DNS at the server first.
echo "BASE_URL=https://your-domain" > .env
echo "SECRET_KEY_BASE=$(openssl rand -base64 48)" >> .env
Keep SECRET_KEY_BASE stable, because changing it logs everyone out.
Start the Plausible Ghost Application
Bring the stack up, then open your domain and create the first user, who becomes the owner.
docker compose up -d
Railway handles the Postgres, ClickHouse and TLS plumbing for you, which you would otherwise maintain yourself.
Official Pricing of Plausible Ghost (Plausible pricing)
Plausible Community Edition, the self-hosted version this template runs, is free and open source under AGPL-3.0, so there is no license fee to pay.
Plausible Ghost cloud vs self hosted comparison (Pricing, features, costs, and more)
Running Plausible for your Ghost blog means choosing between Plausible's hosted service and the free Community Edition on your own server.
Monthly cost of self hosting Plausible Ghost on Railway
Railway bills by usage, so your total depends on event volume and ClickHouse memory. Railway's Hobby plan is $5 per month and includes $5 of usage.
System Requirements for Hosting Plausible Ghost on a VPS
On a VPS, your CPU must support SSE 4.2 or NEON, which ClickHouse needs.
Frequently Asked Questions (FAQs)
Does Plausible Ghost need a cookie banner?
Usually not. Check your local rules, since the banner decision is still yours.
Will Plausible conflict with Ghost member tracking?
No. Portal sign-in and sign-up are one unified app, so you cannot add a class to them on the default theme.
How do I count newsletter signups?
Add a pageview goal under Goals in your Plausible dashboard, select Pageview, and enter the path of your signup confirmation page.
Does the snippet slow my theme?
The script is tiny and loads asynchronously, so the effect is small. Test your own theme with a browser performance panel before and after you paste the snippet into Code Injection.
Can I see stats inside Ghost Admin?
No. Share that link with anyone who needs the numbers.
Will ad blockers hide my analytics?
Some blockers drop the script, so your counts will run a bit low. Treat the numbers as a floor rather than an exact total.
Template Content
