selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

httpbin logo

Self-host httpbin

v0.6.1

HTTP request echo service for testing API clients

ReleaseOpen SourceISC
docker run -p 80:80 kennethreitz/httpbin
Updated4 months ago
LanguagePython
Setup difficultyEasy
Stars
13 637
Port
80 (HTTP service inside the container (gunicorn binds 0.0.0.0:80))
Docker
kennethreitz/httpbin

What is httpbin?

httpbin is a small Python + Flask service that echoes HTTP requests back to the caller, which makes it handy for exercising HTTP clients and debugging API integrations. Point a request at it and the response describes what was received; it can also reply with a status code you choose, issue redirects, set and clear cookies, return images and different data formats, generate random or dynamic payloads, and expose endpoints for exercising authentication schemes. The public site doubles as an interactive endpoint reference for the whole surface. Self-hosting is one command: pull kennethreitz/httpbin and run the container with a port mapped to 80, where it starts gunicorn serving the Flask app (the container image declares version 0.9.2). The code is ISC-licensed and lives on GitHub under Postman Labs, but its newest git tag is from 2017 and the repository saw no pushes after May 2024, which is why the packaging ecosystem has picked up a separate fork.

httpbin alternatives

Should you self-host httpbin?

httpbin scores 65/100 on selfhost.directory (how scoring works) and ranks #4 of 10 in Testing. It has 13 637 GitHub stars, +2 in the last 30 days.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is ISC-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is Locust (78/100, 28 270 stars). It scores higher overall, so compare the two before you pick. See httpbin vs Locust side by side.

Features

  • Auth scheme endpoints
  • Catch-all anything endpoint
  • Cookie handling
  • Dynamic data generation
  • HTML form test page
  • HTTP verb testing
  • Image responses
  • Redirect responses
  • Request Inspection
  • Response format options
  • Response inspection
  • Status code generation

httpbin README

httpbin(1): HTTP Request & Response Service

A Kenneth Reitz Project.

ice cream

This project does not publish releases or Docker images. To run your own copy, build it from this repository:

How to install httpbin

Install httpbin with Docker

docker pull kennethreitz/httpbin
docker run -p 80:80 kennethreitz/httpbin

Port 80 inside the container serves the HTTP service.

How to configure httpbin

  • DEBUGEnables Flask debug mode when set.
  • HTTPBIN_TRACKINGEnables the page tracking template global when present in the environment.
  • BUGSNAG_API_KEYSets up Bugsnag exception tracking if set; needs the Bugsnag Python client installed.
  • BUGSNAG_RELEASE_STAGEproductionRelease stage reported to Bugsnag.
  • --port5000Port used when running the app module directly.

httpbin releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

More in Testing

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…