Railway

Deploy countly-template-source

Deploy Countly Community with MongoDB on Railway

Deploy countly-template-source

MongoDB

mongo:8.0

Just deployed

/data/db

Just deployed

Just deployed

Just deployed

Deploy and Host Countly on Railway

Deploy Countly Community 25.03 with a production-style split service layout on Railway.

About Hosting

This template provisions Countly as four Railway services:

  • MongoDB for Countly data and GridFS file storage.
  • countly-api from countly/api:25.03.45.
  • countly-frontend from countly/frontend:25.03.45.
  • countly-gateway, an Nginx reverse proxy that exposes one public HTTP endpoint.

The gateway routes /i, /i/*, /o, and /o/* to the Countly API service, and all other paths to the Countly Frontend service.

Why Deploy

Countly is an open source product analytics platform for collecting events, sessions, crashes, user profiles, cohorts, dashboards, and SDK data. Railway is a good fit for this template because it can provision the required service graph, private networking, persistent MongoDB storage, and a public gateway endpoint from a reusable blueprint.

This template avoids the evaluation-oriented all-in-one shape and follows Countly's split API, Frontend, MongoDB, and reverse proxy deployment model.

Common Use Cases

  • Host a self-managed Countly Community analytics instance.
  • Collect product analytics from web, mobile, desktop, and server-side SDKs.
  • Run a private analytics stack for internal products or prototypes.
  • Evaluate Countly 25.03 with persistent MongoDB storage on Railway.

Dependencies for

This template is for Countly Community 25.03 deployments that use MongoDB and the official Countly Docker images.

Deployment Dependencies

  • Railway workspace with enough resources for four services.
  • MongoDB service with persistent storage mounted at /data/db.
  • Docker images:
    • mongo:8.0
    • countly/api:25.03.45
    • countly/frontend:25.03.45
  • GitHub source for the gateway service:
    • Repository: yunyu950908/countly-railway-template
    • Root directory: /gateway
    • Config file: /gateway/railway.toml

After deployment, open the public countly-gateway domain to complete Countly setup.


Template Content

MongoDB

mongo:8.0

More templates in this category

View Template
Matomo Analytics + MariaDB
Privacy-friendly analytics with MariaDB and persistent volumes.

leodev
View Template
Bugsink
Self-hosted Error Tracking. Sentry-SDK compatible

zǝʇɹoɔ oɓıɹpoɹ
View Template
SubTrackr
Self-hosted Subscription Tracker

amnesia