
Deploy Hoppscotch CLI Testing
Run Hoppscotch collections as API tests in CI
Just deployed
/var/lib/postgresql/data
Hoppscotch
Just deployed
Deploy and Host self hosted Hoppscotch CLI Testing (Open-Source API Testing) on Railway
This template deploys a pinned Hoppscotch AIO container with Postgres, so your saved collections run as CI tests through @hoppscotch/cli. Built for teams replacing Newman runs. No password login; finish the admin wizard first.
About Hosting Hoppscotch CLI Testing open-source software on Railway (self hosted Hoppscotch CLI testing template)
Your collections, environments and test scripts live in your own Postgres, not a vendor cloud, so exports and ids stay under your control.
This template runs the pinned Hoppscotch 2026.9.0 AIO image and Postgres 18.6, with migrations on every deploy, generated secrets and a restart policy that survives the /admin settings reload. Railway covers TLS, the domain and health checks, so you just point the CLI at it.
Why Deploy Hoppscotch CLI Testing, the Postman Newman alternative on Railway (Railway Free Trial)
Newman runs collections that sit in Postman's cloud, so the runner and the source of truth come from one vendor. Here collections, tests and environments live in your own instance, and a $5 Railway trial covers the start.
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 Hoppscotch CLI Testing 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 Hoppscotch CLI Testing self hosting
Hoppscotch needs Docker plus Postgres, and the difference below comes down to who does the wiring.
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | Template runs app and Postgres, migrations applied on boot | Droplets or App Platform you assemble, patch and back up |
| AWS | One service, one database, domain and TLS handled | ECS or EC2 plus RDS, IAM and VPC work you own |
| Hetzner | Template with managed Postgres and restart policy set | Cheap VPS where Docker, TLS and Postgres are yours |
Railway saves setup time; the others make sense if you already have platform habits there.
Common Use Cases for hosted Hoppscotch CLI Testing
- Smoke tests on every pull request: hopp test runs the collection with --token and --server, and a failed pw.expect assertion returns a non-zero exit code that blocks the merge.
- Nightly checks against staging: a scheduled job runs the same collection against staging, so drift shows up before release day instead of after.
- Data-driven runs from a CSV: --iteration-data users.csv with --iteration-count runs the collection once per row, swapping environment variables for row values.
- Contract checks after a deploy: run the collection against the new URL right after rollout, catching a broken schema before users do.
- JUnit reports in GitHub Actions or GitLab: --reporter-junit report.xml feeds the test summary, so a failure shows up per assertion instead of a raw log line.
Dependencies for Hoppscotch CLI Testing Docker hosted on Railway
Two services. Postgres 18.6 keeps a volume at /var/lib/postgresql/data. All 25 variables ship defaulted.
Deployment Dependencies for Managed Hoppscotch CLI Testing Service (API Testing)
You need a Railway account plus one sign-in method: GitHub, Google or Microsoft OAuth, or SMTP magic link. DATA_ENCRYPTION_KEY is generated at exactly 32 characters and never changes after first boot, WEBAPP_SERVER_SIGNING_SECRET is 48, and DATABASE_URL is wired from Postgres.
Implementation Details for Hoppscotch CLI Testing (Using Hoppscotch official docker image)
The start command runs prisma migrate deploy before the image entrypoint, so upgrades migrate without a shell. WHITELISTED_ORIGINS takes the https Railway domain plus app://localhost_3200 and app://hoppscotch.
How does Hoppscotch CLI Testing compare against other API testing CLIs
Hoppscotch vs Postman Newman (Postman Alternative)
- Where Hoppscotch wins: collections and environments live in your own instance under MIT, so CI never touches a vendor cloud.
- Scripting: tests use pw.test and pw.expect in the post-request script, like pm.test but in the client you already use.
- Where Newman wins: years of CI recipes, reporters and a larger collection ecosystem.
Hoppscotch vs Bruno CLI (Bruno Alternative)
- Storage: Bruno keeps collections as plain files in git, better for review; Hoppscotch keeps them in Postgres on your server.
- Where Hoppscotch wins: one instance gives teammates roles, environments and a browser client, no desktop install.
- CI invocation: hopp test COLLECTION_ID --token TOKEN --server URL runs what is saved, so changes land without syncing files.
Hoppscotch vs Insomnia Inso (Insomnia Alternative)
- License: MIT and self hosted end to end, versus Kong's open core with cloud sync and paid plans around it.
- Where Hoppscotch wins: the CLI uses a personal access token against your instance, so no vendor account sits in the pipeline.
- Where Inso wins: deeper plugin ecosystem for teams already standardized on Insomnia.
Hoppscotch vs Karate (Karate Alternative)
- Style: Karate is a full framework with its own DSL and mocking; the CLI replays saved requests, enough for smoke and contract checks.
- Where Hoppscotch wins: what you click in the browser is what CI runs, and --iteration-data covers data-driven runs without a Java build.
- Where Karate wins: schema validation, multi-step scenarios and reporting depth.
How to use Hoppscotch CLI Testing (the OSS API client)?
- Finish the /admin onboarding, then create a team workspace and collection.
- Add a post-request script:
pw.test("status 200", () => { pw.expect(pw.response.status).toBe(200); }). - Create a personal access token, then open Run Collection and copy the command from the CLI tab.
- Install the CLI with
npm i -g @hoppscotch/cli(Node.js 22 or newer), then run:
hopp test COLLECTION_ID -e ENV_ID --token TOKEN --server https://your-domain --reporter-junit report.xml
- Add it to GitHub Actions:
- run: npm i -g @hoppscotch/cli
- run: hopp test COLLECTION_ID -e ENV_ID --token ${{ secrets.HOPP_TOKEN }} --server https://your-domain --reporter-junit report.xml
A failed assertion exits non-zero, so the CI job fails.
How to self host Hoppscotch CLI Testing on other VPS Services (Hoppscotch self hosting guide)
Clone the Repository
Clone the upstream repo for its example env file.
git clone https://github.com/hoppscotch/hoppscotch
cd hoppscotch
Install Dependencies
You don't build anything: install Docker Engine and provision a Postgres database the container can reach.
docker --version
Configure Environment Variables
Copy the example file and set DATABASE_URL to a Postgres database, DATA_ENCRYPTION_KEY to 32 characters, and the VITE URLs to https://your-domain.
cp .env.example .env
Start the Hoppscotch CLI Testing Application
Run the AIO image with Docker, migrate inside the container, and put HTTPS in front so OAuth callbacks work.
docker run -d --name hoppscotch -p 80:80 --env-file .env hoppscotch/hoppscotch:2026.9.0
docker exec -it hoppscotch npx prisma migrate deploy
On Railway the image pin, migration, restart policy and Postgres wiring are handled for you.
Official Pricing of Hoppscotch CLI Testing (Hoppscotch pricing)
The Hoppscotch CLI and Community Edition server are MIT licensed, so the software costs nothing. Hoppscotch Cloud has a free individual plan plus paid team and Enterprise tiers, and there is a paid self-hosted Enterprise Edition with SSO and audit features.
Hoppscotch CLI Testing cloud vs self hosted comparison (Pricing, features, costs, and more)
The CLI is the same npm package either way. What changes is where your collections live, who holds the token, and who pays for the server.
Monthly cost of self hosting Hoppscotch CLI Testing on Railway
Railway bills by usage, so expect about $5-10/mo for the Hoppscotch container and Postgres at light use, with the $5 trial covering the first stretch. Community Edition is MIT and free to run.
System Requirements for Hosting Hoppscotch CLI Testing on a VPS
Docker and a Postgres database, 1 vCPU and 1-2 GB RAM (the container idles near 0.5 GB), and HTTPS in front so OAuth callback URLs resolve. CI runners need Node.js 22 or newer for the CLI, plus python, g++ and build-essential when node-gyp has to compile.
Frequently Asked Questions (FAQs)
Which Node.js version does the Hoppscotch CLI need?
Node.js 22 or newer. If the install compiles native modules, add python, g++ and build-essential. Node 20 users can stay on CLI v0.26.0.
Why can my collection id not be found?
Collections in a personal workspace cannot be run by id, so move yours into a team workspace and copy the id from the CLI tab in Run Collection. Properties > Details shows it too.
What URL goes in --server?
The HTTPS domain of your self-hosted instance, no trailing slash, for example https://your-domain. That is the host you use in the browser, not the backend path.
How do I fail the build on a failed assertion?
You do not add a flag. hopp test exits non-zero when any assertion fails and 0 when all pass, so the run step fails your GitHub Actions or GitLab job.
Can I run data-driven tests from a CSV?
Yes. --iteration-count N with --iteration-data data.csv runs the collection once per row, replacing environment variables with row values.
Where do tokens and secrets go?
In CI secrets, passed as --token and as OS environment variables for anything your scripts read. Keep the environment export out of the repo.
Template Content
