Railway

Deploy hitkeep-bucket-template

Self-hosted HitKeep analytics with Railway Bucket backups.

Deploy hitkeep-bucket-template

Just deployed

/var/lib/hitkeep/data

hitkeep-backups

Bucket

Just deployed

Deploy and Host HitKeep

Deploy HitKeep, an open-source privacy-first analytics platform you can self-host as one Railway service.

This template uses the official pascalebeier/hitkeep:2.7.0 Docker image, exposes port 8080, attaches a persistent Railway volume at /var/lib/hitkeep/data for active DuckDB data, and provisions a Railway Bucket for backup/archive Parquet snapshots.

About Hosting HitKeep

HitKeep is a single-binary web analytics app with embedded DuckDB and embedded NSQ. It tracks pageviews, events, goals, funnels, ecommerce activity, AI crawler visibility, Search Console aggregates, exports, and read-only API/MCP access without requiring PostgreSQL, Redis, ClickHouse, Kafka, or a separate queue.

On Railway, the app runs as one persistent service backed by one attached volume and one private S3-compatible Railway Bucket. The template generates a unique HITKEEP_JWT_SECRET during deployment and configures HitKeep to use the generated Railway public domain.

Why Deploy HitKeep on Railway

  • One service instead of a multi-container analytics stack
  • Persistent DuckDB storage through Railway Volumes
  • Off-volume backup/archive snapshots through Railway Buckets
  • Public HTTPS domain generated by Railway
  • Per-deployment generated JWT secret
  • Fast pilot path for self-hosted analytics
  • Easy migration path to a custom domain later

Common Use Cases

  • Privacy-first web analytics for small teams
  • Self-hosted alternative to GA4-style reporting
  • Cookieless pageview and event tracking
  • Conversion dashboards with goals and funnels
  • Search Console aggregate reporting
  • AI crawler and AI-referred traffic visibility
  • Internal reporting through exports and API clients

Dependencies for HitKeep

HitKeep does not require an external database, cache, or queue. The required runtime dependency is persistent filesystem storage for its DuckDB data directory.

Deployment Dependencies

DependencyRailway resourcePurpose
HitKeep runtimeService from pascalebeier/hitkeep:2.7.0Runs the app, dashboard, tracker, embedded queue, and workers
Persistent dataRailway Volume at /var/lib/hitkeep/dataStores active hitkeep.db and tenant databases
Backup/archive dataRailway Bucket named hitkeep-backupsStores HitKeep backup and retention archive snapshots as Parquet
Public URLRailway service domainServes the dashboard and tracker script
JWT secretTemplate variable generatorCreates a unique session/signing secret for each deployment

After Deployment

  1. Open the generated Railway domain.
  2. Create the initial admin user.
  3. Add your first site.
  4. Install the tracker by loading https://your-hitkeep-domain/hk.js from your site.

If you later attach a custom domain, update HITKEEP_PUBLIC_URL to the final HTTPS origin so tracker URLs, email links, and redirects stay correct.

Operational Notes

  • Run one replica by default. HitKeep uses embedded DuckDB and NSQ, so a single-service deployment is the intended low-ops path.
  • Keep the volume attached. Without it, analytics data will be ephemeral.
  • The template writes HitKeep automatic backups and retention archives to the Railway Bucket, not the local volume.
  • HITKEEP_BACKUP_RETENTION only prunes local filesystem backups in HitKeep 2.7.0. Railway Buckets currently do not provide bucket lifecycle configuration, so add a cleanup job if you need bounded object storage growth.
  • SMTP-dependent features require Railway Pro or above because Railway disables outbound SMTP on Free, Trial, and Hobby plans.

Links


Template Content

hitkeep-backups

Bucket

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