docker.recipes

Hoppscotch

intermediate

Open source API development ecosystem.

Overview

Hoppscotch is an open-source API development ecosystem that serves as a modern, lightweight alternative to Postman. Originally known as Postwoman before rebranding, it provides a comprehensive platform for testing REST APIs, GraphQL endpoints, WebSockets, and Server-Sent Events through an intuitive web interface. The platform emphasizes real-time collaboration, offline functionality through Progressive Web App (PWA) capabilities, and team-based workspace management for API development workflows. This deployment configuration creates a complete Hoppscotch environment using two services: the main Hoppscotch application container that includes both frontend and backend components, and a dedicated PostgreSQL database for persistent data storage. The Hoppscotch container exposes both port 3000 for the web interface and port 3100 for the backend API, while the PostgreSQL database handles user accounts, API collections, team workspaces, and collaboration data with full ACID compliance. This stack is ideal for development teams seeking to self-host their API testing infrastructure, organizations requiring data sovereignty for their API development workflows, and teams that need collaborative API testing without relying on external SaaS platforms. The combination provides enterprise-grade data persistence through PostgreSQL while maintaining the modern, fast user experience that makes Hoppscotch a compelling Postman alternative.

Key Features

  • Multi-protocol API testing supporting REST, GraphQL, WebSocket, and Server-Sent Events in a unified interface
  • Real-time collaborative workspaces with shared collections and team-based permission management
  • Progressive Web App functionality enabling offline API testing after initial load
  • PostgreSQL-backed persistence for reliable storage of API collections, environments, and user data
  • Dual-port architecture with separate frontend (3000) and backend (3100) services for flexible deployment
  • Built-in request/response history tracking with full audit trails stored in PostgreSQL
  • Environment variable management with secure storage and team-level sharing capabilities
  • WebSocket connection testing with real-time message streaming and connection state monitoring

Common Use Cases

  • 1Development teams transitioning from Postman to a self-hosted API testing solution
  • 2Organizations requiring on-premises API development tools for compliance or security policies
  • 3Startup teams building REST and GraphQL APIs who need collaborative testing workflows
  • 4Remote development teams needing shared API collections and real-time collaboration features
  • 5Companies developing WebSocket-based applications requiring specialized connection testing
  • 6Educational institutions teaching API development with controlled, self-hosted environments
  • 7Enterprise environments where external API testing services are restricted by corporate policies

Prerequisites

  • Docker and Docker Compose installed with support for multi-container orchestration
  • Minimum 1GB RAM available for PostgreSQL database operations and query processing
  • Ports 3000 and 3100 available on the host system for Hoppscotch frontend and backend access
  • Basic understanding of environment variables for JWT_SECRET, SESSION_SECRET, and DB_PASSWORD configuration
  • Familiarity with API testing concepts including REST, GraphQL, and WebSocket protocols
  • Network access for initial Docker image pulls (hoppscotch/hoppscotch:latest and postgres:15-alpine)

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 hoppscotch:
3 image: hoppscotch/hoppscotch:latest
4 container_name: hoppscotch
5 restart: unless-stopped
6 environment:
7 DATABASE_URL: postgres://hoppscotch:${DB_PASSWORD}@db:5432/hoppscotch
8 JWT_SECRET: ${JWT_SECRET}
9 SESSION_SECRET: ${SESSION_SECRET}
10 ports:
11 - "3000:3000"
12 - "3100:3100"
13 depends_on:
14 - db
15
16 db:
17 image: postgres:15-alpine
18 container_name: hoppscotch-db
19 environment:
20 POSTGRES_USER: hoppscotch
21 POSTGRES_PASSWORD: ${DB_PASSWORD}
22 POSTGRES_DB: hoppscotch
23 volumes:
24 - hoppscotch_db:/var/lib/postgresql/data
25
26volumes:
27 hoppscotch_db:

.env Template

.env
1DB_PASSWORD=changeme
2JWT_SECRET=generate-long-secret
3SESSION_SECRET=generate-another-secret

Usage Notes

  1. 1Docs: https://docs.hoppscotch.io/
  2. 2Access at http://localhost:3000 (frontend), :3100 (backend)
  3. 3Open-source Postman alternative with real-time collaboration
  4. 4Supports REST, GraphQL, WebSocket, and SSE testing
  5. 5Team workspaces with shared collections
  6. 6PWA support - works offline after initial load

Individual Services(2 services)

Copy individual services to mix and match with your existing compose files.

hoppscotch
hoppscotch:
  image: hoppscotch/hoppscotch:latest
  container_name: hoppscotch
  restart: unless-stopped
  environment:
    DATABASE_URL: postgres://hoppscotch:${DB_PASSWORD}@db:5432/hoppscotch
    JWT_SECRET: ${JWT_SECRET}
    SESSION_SECRET: ${SESSION_SECRET}
  ports:
    - "3000:3000"
    - "3100:3100"
  depends_on:
    - db
db
db:
  image: postgres:15-alpine
  container_name: hoppscotch-db
  environment:
    POSTGRES_USER: hoppscotch
    POSTGRES_PASSWORD: ${DB_PASSWORD}
    POSTGRES_DB: hoppscotch
  volumes:
    - hoppscotch_db:/var/lib/postgresql/data

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 hoppscotch:
5 image: hoppscotch/hoppscotch:latest
6 container_name: hoppscotch
7 restart: unless-stopped
8 environment:
9 DATABASE_URL: postgres://hoppscotch:${DB_PASSWORD}@db:5432/hoppscotch
10 JWT_SECRET: ${JWT_SECRET}
11 SESSION_SECRET: ${SESSION_SECRET}
12 ports:
13 - "3000:3000"
14 - "3100:3100"
15 depends_on:
16 - db
17
18 db:
19 image: postgres:15-alpine
20 container_name: hoppscotch-db
21 environment:
22 POSTGRES_USER: hoppscotch
23 POSTGRES_PASSWORD: ${DB_PASSWORD}
24 POSTGRES_DB: hoppscotch
25 volumes:
26 - hoppscotch_db:/var/lib/postgresql/data
27
28volumes:
29 hoppscotch_db:
30EOF
31
32# 2. Create the .env file
33cat > .env << 'EOF'
34DB_PASSWORD=changeme
35JWT_SECRET=generate-long-secret
36SESSION_SECRET=generate-another-secret
37EOF
38
39# 3. Start the services
40docker compose up -d
41
42# 4. View logs
43docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/hoppscotch/run | bash

Troubleshooting

  • Database connection failed: Verify DB_PASSWORD environment variable matches between hoppscotch and db services, and ensure PostgreSQL container is fully started
  • Port 3000 or 3100 already in use: Check for conflicting services with 'netstat -tulpn | grep :3000' and modify port mappings in docker-compose.yml if needed
  • JWT authentication errors: Ensure JWT_SECRET and SESSION_SECRET environment variables are set with sufficient entropy (minimum 32 characters recommended)
  • Collections not persisting between restarts: Verify the hoppscotch_db volume is properly mounted and PostgreSQL container has write permissions
  • WebSocket connections failing: Check that port 3100 is accessible and not blocked by firewall rules, as WebSocket connections use the backend service
  • Slow API response testing: Monitor PostgreSQL performance with 'docker stats hoppscotch-db' and consider increasing available memory if database queries are bottlenecking

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Components

hoppscotchpostgres

Tags

#hoppscotch#api#client#postman-alternative

Category

Development Tools
Ad Space