---
title: "Deploy go-httpbin"
description: "HTTP request and response testing service (httpbin in Go), zero config"
category: "Other"
url: https://railway.com/deploy/go-httpbin
---

# Deploy go-httpbin

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

**[Deploy go-httpbin on Railway](https://railway.com/template/go-httpbin)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/go-httpbin/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Other

## Template content

### go-httpbin https://raw.githubusercontent.com/mccutchen/go-httpbin/v2.26.0/httpbin/static/image.png

- **Source:** https://github.com/aalfath/go-httpbin-railway-template
- **Health check:** /status/200
- **Public domain:** Yes

## Documentation

# 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

* go-httpbin source and releases: https://github.com/mccutchen/go-httpbin (v2.26.0)
* Configuration and production notes: https://github.com/mccutchen/go-httpbin#configuration
* Template repository: https://github.com/aalfath/go-httpbin-railway-template

### 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):

```sh
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.



## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/go-httpbin
