Deploy WireMock

WireMock 3.13 HTTP mock server with a protected admin API and saved stubs.

Deploy 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/wiremock for mappings and files

Deployment Dependencies

Implementation Details

ServiceImageNetworkingStorage
wiremockwiremock/wiremock:3.13.2public domain on 8080; privatevolume 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}'
VariableDefaultPurpose
WIREMOCK_ADMIN_USER / WIREMOCK_ADMIN_PASSWORDadmin / generatedAdmin API login
JAVA_OPTS-Xmx384mJVM heap

Notes:

  • Only stubs created with "persistent": true, or saved with POST /__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

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

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

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

Letta
51