Deploy go-httpbin

HTTP request and response testing service (httpbin in Go), zero config

Deploy go-httpbin

Deploy and Host go-httpbin on Railway

go-httpbin is an HTTP request and response service, a single-binary Go port of httpbin.org. It echoes back the method, headers, query and body you send, and returns any status code, delay, redirect, cookie, compressed body, stream or image you ask for. Developers use it to test HTTP clients, webhooks and proxies.

About Hosting go-httpbin

go-httpbin is one small, stateless Go server with no database and no files to keep, so this template is a single public service with no volume. It builds go-httpbin 2.26.0 from the official ghcr.io/mccutchen/go-httpbin image, pinned by version and digest, through the repository aalfath/go-httpbin-railway-template. Railway's edge gives you HTTPS; the server listens on port 8080 and Railway checks /status/200 before sending traffic. The template hides Railway's own X-Railway-* headers from echoed responses and sets request limits of 1 MiB bodies and 10 seconds per response. The deploy form asks for nothing.

Common Use Cases

  • Test HTTP clients, SDKs and retry logic against known status codes, delays, redirects and malformed responses
  • Inspect exactly which headers, cookies and body a webhook sender, proxy or API gateway forwards
  • A private httpbin for CI pipelines and integration tests, instead of the public httpbin.org with its rate limits and outages

Dependencies for go-httpbin Hosting

  • None: go-httpbin is a single stateless service with no database or volume

Deployment Dependencies

Implementation Details

Service:

  • go-httpbin: the public API on port 8080, built from the template repository's Dockerfile (official distroless image, runs as non-root). The endpoint list is at the root URL. Health check /status/200.

After deploy, try it (replace YOUR-DOMAIN with the service's Railway domain):

curl https://YOUR-DOMAIN/get?hello=world
curl -X POST https://YOUR-DOMAIN/post -d '{"hello":"world"}'
curl -i https://YOUR-DOMAIN/status/418

An httpbin is meant to answer anyone, so it has no login. Optional service variables: ALLOWED_REDIRECT_DOMAINS (allowlist for /redirect-to, so a public instance isn't an open redirect), MAX_BODY_SIZE, MAX_DURATION, EXCLUDE_HEADERS, PREFIX and USE_REAL_HOSTNAME. See upstream's configuration table.

Updates: the service builds from aalfath/go-httpbin-railway-template. When it moves to a new go-httpbin release, Railway shows you an update notice; read CHANGELOG.md, then apply it. Nothing is stored, so updates need no migration.

Why Deploy go-httpbin 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 go-httpbin 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
51
View Template
Foundry Virtual Tabletop
Self-hosted virtual tabletop for role-playing games (license required)

Lucas
71
View Template
NEW
Double Commander in your browser
The Double Commander file manager in the cloud, from any device

Nermin Sabanovic
0