Deploy sparkyfitness
Track food, fitness, water, and health — together
frontend
Just deployed
Just deployed
postgres
Just deployed
/var/lib/postgresql
Deploy and Host SparkyFitness on Railway
About Hosting SparkyFitness on Railway
SparkyFitness runs on Railway as a Docker-only multi-service deployment with a public web UI, a backend API, and PostgreSQL for durable application data. Railway handles HTTPS domains, private service networking, environment variables, and persistent database storage.
Tech Stack
- React frontend served by nginx
- Node.js and Express backend API
- PostgreSQL 18 database
- Better Auth for authentication
- Docker Hub images from the upstream SparkyFitness project
- Railway service domains, variables, and volumes
Why Deploy SparkyFitness on Railway
Railway provides a simple way to host SparkyFitness without managing servers. The template uses pinned upstream Docker images, generated secrets, a persistent PostgreSQL volume, and browser-ready HTTPS endpoints so users can deploy and start tracking nutrition and fitness quickly.
Common Use Cases
- Self-hosted calorie, macro, and nutrition tracking
- Food diary and meal planning
- Exercise logging and fitness progress tracking
- Health metrics, reports, and check-ins
- AI-assisted food logging and nutrition workflows
- Private family or personal fitness dashboards
Deployment Notes
The frontend is the public HTTP service and listens on port 80. The backend listens on port 3010 and is exposed with its own Railway domain so the frontend nginx proxy can reliably reach it over HTTPS. PostgreSQL uses a persistent Railway volume mounted at /var/lib/postgresql, which is required for the PostgreSQL 18 image layout. Signup is enabled by default and email/password login is forced on as a safe initial authentication path. Secrets must remain stable after deployment because changing them can invalidate sessions or encrypted integration data.
Dependencies for SparkyFitness on Railway
SparkyFitness depends on three services: the frontend web UI, the backend API, and PostgreSQL. The frontend proxies /api requests to the backend; the backend connects to PostgreSQL and runs migrations automatically on startup.
Deployment Dependencies
| Service | Image | Port | Volume |
|---|---|---|---|
| frontend | codewithcj/sparkyfitness:v0.16.8 | 80 | - |
| backend | codewithcj/sparkyfitness_server:v0.16.8 | 3010 | - |
| postgres | postgres:18.3-alpine | 5432 | /var/lib/postgresql |
Template Content
frontend
codewithcj/sparkyfitness:v0.16.8postgres
postgres:18.3-alpine