
Deploy WireMock
WireMock 3.13 HTTP mock server with a protected admin API and saved stubs.
wiremock
Just deployed
/home/wiremock
Deploy and Host WireMock on Railway
WireMock is a widely used tool for mocking HTTP APIs. You define stubs that match requests by URL, method, headers and body, and return canned or templated responses, delays and faults. Teams use it to test against third-party APIs that are slow, costly or unavailable, and to develop against APIs that do not exist yet.
About Hosting WireMock
This template deploys WireMock v3.13.2 from the official image as a single service. Mocked endpoints are served on your Railway domain, while the admin API under /__admin requires a generated username and password. Response templating is enabled globally. Stub mappings and response files live on a Railway volume, so stubs saved there survive redeploys. The JVM heap is capped at 384 MB, which fits the Hobby plan. Services in the same project can call the mock over the private network, for example from a staging environment. Stubs can also be edited as JSON files on the volume.
Common Use Cases
- Stable test doubles for payment, email and other third-party APIs in staging
- Frontend development against APIs that are not built yet
- Simulating slow responses, errors and faults to test resilience
Dependencies for WireMock Hosting
wiremock/wiremock:3.13.2(official image)- A Railway volume at
/home/wiremockfor mappings and files
Deployment Dependencies
Implementation Details
| Service | Image | Networking | Storage |
|---|---|---|---|
| wiremock | wiremock/wiremock:3.13.2 | public domain on 8080; private | volume at /home/wiremock |
Create a stub that is saved to the volume:
curl -u "admin:$WIREMOCK_ADMIN_PASSWORD" -X POST "https:///__admin/mappings" \
-d '{"request": {"method": "GET", "url": "/users/1"},
"response": {"status": 200, "jsonBody": {"id": 1, "name": "Ada"}},
"persistent": true}'
| Variable | Default | Purpose |
|---|---|---|
WIREMOCK_ADMIN_USER / WIREMOCK_ADMIN_PASSWORD | admin / generated | Admin API login |
JAVA_OPTS | -Xmx384m | JVM heap |
Notes:
- Only stubs created with
"persistent": true, or saved withPOST /__admin/mappings/save, are written to the volume. - There is no HTTP health check, because every route is either a stub or protected; Railway restarts the service if it exits.
This is a community-maintained deployment package and does not imply affiliation with or endorsement by the WireMock project or its maintainers.
Why Deploy WireMock on Railway?
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 WireMock 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.
Template Content
wiremock
wiremock/wiremock:3.13.2