Railway

Deploy railway-hoppscotch

Self-hosted API dev platform — REST, GraphQL, WebSocket, SSE

Deploy railway-hoppscotch

/var/lib/postgresql/data

Just deployed

Hoppscotch — Railway Deployment Template

Self-hosted API development platform. Open-source Postman alternative with GraphQL, REST, WebSocket, SSE, Socket.IO, and MQTT support.

Deploy on Railway

GitHub Repo Hoppscotch License


Deploy and Host

Deploy Hoppscotch on Railway in one click. This template provisions a container running the Hoppscotch all-in-one image (Caddy reverse proxy, NestJS backend, and webapp frontend) with an attached PostgreSQL database. SSL is handled automatically by Railway.

About Hosting

This template runs Hoppscotch v2026.5.0 inside a single Railway container with three internal services:

  • Caddy serves the frontend SPA on port 3000, admin dashboard on port 3100, and reverse-proxies API requests to the backend on port 3170
  • NestJS Backend provides REST + GraphQL APIs on port 8080 (internal)
  • Webapp Server serves the built frontend assets

PostgreSQL is provisioned as a Railway plugin — no manual database setup required.

Why Deploy

Hoppscotch is the leading open-source Postman alternative with 79.7K GitHub stars. Self-hosting gives you full control over your API development data, no third-party dependency, and unlimited team collaboration without per-seat pricing. Railway's one-click deploy makes it accessible to any team in under a minute.

Common Use Cases

  • API Development & Testing — REST, GraphQL, WebSocket, Socket.IO, SSE, MQTT
  • Team Collaboration — Share collections and environments with your team
  • API Documentation — Auto-generate and publish API docs
  • Postman Migration — Import existing Postman collections seamlessly
  • CI/CD Integration — Use Hoppscotch as part of your API testing pipeline

Dependencies for Hoppscotch

Runtime

DependencyVersion/TypePurpose
Node.js20+Application runtime
Caddy2.xReverse proxy and static file serving
PostgreSQL15+Primary database (via Railway plugin)
PrismaORM and database migrations
NestJSBackend framework

Deployment Dependencies

ToolPurpose
DockerContainer runtime (managed by Railway)
RailwayHosting platform
Railway PostgreSQLManaged PostgreSQL database

✨ Features

  • Request Composer — REST, GraphQL, WebSocket, SSE, Socket.IO, MQTT
  • Collections — Organise, share, and sync your API requests
  • Environment Variables — Manage multi-environment configs
  • Team Collaboration — Share collections and environments with your team
  • History & Sync — Review past requests and responses
  • Admin Dashboard — User management, infra tokens, usage insights
  • Postman Import — Seamless migration from Postman collections
  • Self-hosted — Full data ownership, no third-party dependency

🚀 Quick Start

One-click Deploy

Deploy on Railway

Manual Deploy

git clone https://github.com/INAPP-Mobile/railway-hoppscotch.git
cd railway-hoppscotch
railway up

⚙️ Environment Variables

VariableRequiredDescription
DATABASE_URL✅ YesPostgreSQL connection string (auto by Railway plugin)
DATA_ENCRYPTION_KEY✅ Yes32-char hex key. Generate: openssl rand -hex 16
VITE_BASE_URL✅ YesYour Railway deployment URL (e.g., https://app.up.railway.app)
WHITELISTED_ORIGINS⬜ NoComma-separated CORS origins. Include your Railway URL.
SECRET_KEY⬜ NoJWT signing secret. Generate: openssl rand -base64 32
TRUST_PROXY⬜ NoSet true when behind Railway proxy

Quick Setup

railway add postgres
openssl rand -hex 16  # → set as DATA_ENCRYPTION_KEY

🛠️ Architecture

┌─────────────────────────────────────────────────────┐
│  Caddy (:3000 frontend / :3100 admin / :3170 API)   │
│        ├── Self-Host Webapp (Frontend SPA)           │
│        ├── Admin Dashboard SPA                       │
│        └── Backend API (NestJS + GraphQL, :8080)    │
│                     │                                │
│              ┌──────▼──────┐                         │
│              │ PostgreSQL  │                         │
│              └─────────────┘                         │
└─────────────────────────────────────────────────────┘

Port Mapping

PortServiceDescription
3000Webapp (Frontend)Main Hoppscotch UI
3100Admin DashboardSelf-host admin panel
3170Backend APIGraphQL + REST API

🔐 Security

  • No hardcoded secrets — all credentials via environment variables
  • Pinned versionhoppscotch/hoppscotch:2026.5.0 (not :latest)
  • Encryption at rest — sensitive data encrypted with DATA_ENCRYPTION_KEY
  • CORS configurable — restrict origins via WHITELISTED_ORIGINS
  • Non-root — container runs as non-privileged user

🧪 Troubleshooting

ProblemLikely CauseSolution
ECONNREFUSED on startupPostgreSQL not readyAdd Railway PostgreSQL and check DATABASE_URL
Prisma migration failsWrong database credentialsCheck DATABASE_URL format
CORS errors in browserWHITELISTED_ORIGINS missing your URLAdd your Railway domain
502 Bad GatewayBackend not ready after migrationWait 30-60s; check logs
Login redirects to wrong URLVITE_BASE_URL not set correctlySet to your Railway URL

📄 License

This template is distributed under the MIT License. Hoppscotch itself is also MIT-licensed.

Resources


Template Content

More templates in this category

View Template
Rocky Linux
[Jun'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
15
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
70
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
44