Hoppscotch API Testing
Open source API development ecosystem - Postman alternative.
Overview
Hoppscotch is an open-source API development ecosystem that serves as a modern alternative to Postman, providing a lightweight yet powerful interface for testing REST APIs, GraphQL endpoints, WebSocket connections, and more. Originally created as Postwoman before rebranding, Hoppscotch offers both web-based and self-hosted solutions for API testing, making it particularly attractive for teams seeking privacy, customization, and complete control over their API testing infrastructure. This stack combines Hoppscotch's multi-port architecture with PostgreSQL for robust data persistence and SMTP4Dev for comprehensive email testing capabilities. The configuration exposes three distinct Hoppscotch services: the main application interface on port 3000, an administrative dashboard on port 3100, and the backend API on port 3170, while PostgreSQL handles user data, workspace configurations, and API collections with full ACID compliance. SMTP4Dev provides a local email testing environment, capturing and displaying all outbound emails from Hoppscotch notifications, user invitations, and password reset workflows without requiring external email services. This combination is ideal for development teams, API-first companies, and organizations that need a self-hosted API testing solution with complete email workflow testing, offering enterprise-grade features while maintaining the flexibility and privacy that comes with self-hosted infrastructure.
Key Features
- Multi-service Hoppscotch architecture with separate frontend, admin panel, and backend API endpoints
- PostgreSQL-backed persistent storage for API collections, workspace data, and user authentication with full ACID compliance
- Integrated SMTP4Dev email testing server for capturing and viewing registration, invitation, and notification emails
- RESTful API testing with support for various HTTP methods, headers, authentication schemes, and response validation
- GraphQL query and mutation testing with schema introspection and real-time query building
- WebSocket connection testing for real-time API endpoints and bidirectional communication protocols
- Team collaboration features with workspace sharing, user management, and role-based access controls
- Environment variable management for testing across development, staging, and production API endpoints
Common Use Cases
- 1API-first development teams transitioning from Postman to a self-hosted solution for enhanced privacy and control
- 2Enterprise organizations requiring on-premises API testing tools that comply with strict data governance policies
- 3Development agencies managing multiple client API projects with separate workspaces and team access controls
- 4Microservices architectures where teams need to test complex inter-service communication and authentication flows
- 5Educational institutions teaching API development and testing methodologies in controlled environments
- 6Startups building API products who need comprehensive testing capabilities without recurring SaaS subscription costs
- 7DevOps teams integrating API testing into CI/CD pipelines with programmatic access to collections and test results
Prerequisites
- Docker and Docker Compose installed with at least 2GB available RAM for PostgreSQL and Hoppscotch services
- Ports 3000, 3100, 3170, and 5000 available on the host system for web interfaces and email testing
- Basic understanding of API testing concepts including REST, GraphQL, and HTTP authentication methods
- Environment variables configured for JWT_SECRET, SESSION_SECRET, and PostgreSQL credentials
- Familiarity with PostgreSQL administration for potential database maintenance and backup procedures
- Network access requirements for testing external APIs while maintaining isolated internal service communication
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:latest4 ports: 5 - "3000:3000"6 - "3100:3100"7 - "3170:3170"8 environment: 9 DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}10 JWT_SECRET: ${JWT_SECRET}11 SESSION_SECRET: ${SESSION_SECRET}12 MAILER_SMTP_HOST: smtp4dev13 MAILER_SMTP_PORT: 2514 MAILER_ADDRESS: noreply@hoppscotch.local15 depends_on: 16 postgres: 17 condition: service_healthy18 networks: 19 - hoppscotch-net20 restart: unless-stopped2122 postgres: 23 image: postgres:16-alpine24 environment: 25 POSTGRES_USER: ${POSTGRES_USER}26 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}27 POSTGRES_DB: ${POSTGRES_DB}28 volumes: 29 - postgres_data:/var/lib/postgresql/data30 healthcheck: 31 test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]32 interval: 10s33 timeout: 5s34 retries: 535 networks: 36 - hoppscotch-net37 restart: unless-stopped3839 smtp4dev: 40 image: rnwood/smtp4dev:latest41 ports: 42 - "5000:80"43 networks: 44 - hoppscotch-net45 restart: unless-stopped4647volumes: 48 postgres_data: 4950networks: 51 hoppscotch-net: 52 driver: bridge.env Template
.env
1# PostgreSQL2POSTGRES_USER=hoppscotch3POSTGRES_PASSWORD=secure_postgres_password4POSTGRES_DB=hoppscotch56# Hoppscotch7JWT_SECRET=$(openssl rand -hex 32)8SESSION_SECRET=$(openssl rand -hex 32)Usage Notes
- 1Hoppscotch at http://localhost:3000
- 2Admin at http://localhost:3100
- 3Backend at http://localhost:3170
- 4SMTP4Dev for email testing at http://localhost:5000
Individual Services(3 services)
Copy individual services to mix and match with your existing compose files.
hoppscotch
hoppscotch:
image: hoppscotch/hoppscotch:latest
ports:
- "3000:3000"
- "3100:3100"
- "3170:3170"
environment:
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
JWT_SECRET: ${JWT_SECRET}
SESSION_SECRET: ${SESSION_SECRET}
MAILER_SMTP_HOST: smtp4dev
MAILER_SMTP_PORT: 25
MAILER_ADDRESS: noreply@hoppscotch.local
depends_on:
postgres:
condition: service_healthy
networks:
- hoppscotch-net
restart: unless-stopped
postgres
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test:
- CMD-SHELL
- pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}
interval: 10s
timeout: 5s
retries: 5
networks:
- hoppscotch-net
restart: unless-stopped
smtp4dev
smtp4dev:
image: rnwood/smtp4dev:latest
ports:
- "5000:80"
networks:
- hoppscotch-net
restart: unless-stopped
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 hoppscotch:5 image: hoppscotch/hoppscotch:latest6 ports:7 - "3000:3000"8 - "3100:3100"9 - "3170:3170"10 environment:11 DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}12 JWT_SECRET: ${JWT_SECRET}13 SESSION_SECRET: ${SESSION_SECRET}14 MAILER_SMTP_HOST: smtp4dev15 MAILER_SMTP_PORT: 2516 MAILER_ADDRESS: noreply@hoppscotch.local17 depends_on:18 postgres:19 condition: service_healthy20 networks:21 - hoppscotch-net22 restart: unless-stopped2324 postgres:25 image: postgres:16-alpine26 environment:27 POSTGRES_USER: ${POSTGRES_USER}28 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}29 POSTGRES_DB: ${POSTGRES_DB}30 volumes:31 - postgres_data:/var/lib/postgresql/data32 healthcheck:33 test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]34 interval: 10s35 timeout: 5s36 retries: 537 networks:38 - hoppscotch-net39 restart: unless-stopped4041 smtp4dev:42 image: rnwood/smtp4dev:latest43 ports:44 - "5000:80"45 networks:46 - hoppscotch-net47 restart: unless-stopped4849volumes:50 postgres_data:5152networks:53 hoppscotch-net:54 driver: bridge55EOF5657# 2. Create the .env file58cat > .env << 'EOF'59# PostgreSQL60POSTGRES_USER=hoppscotch61POSTGRES_PASSWORD=secure_postgres_password62POSTGRES_DB=hoppscotch6364# Hoppscotch65JWT_SECRET=$(openssl rand -hex 32)66SESSION_SECRET=$(openssl rand -hex 32)67EOF6869# 3. Start the services70docker compose up -d7172# 4. View logs73docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/hoppscotch-api/run | bashTroubleshooting
- Hoppscotch admin panel shows database connection errors: Verify PostgreSQL health check is passing and DATABASE_URL environment variable matches postgres service credentials
- CORS errors when testing localhost APIs: Configure Hoppscotch proxy settings or use the desktop app for local API testing without browser restrictions
- Email notifications not appearing in SMTP4Dev: Check that MAILER_SMTP_HOST points to smtp4dev service name and port 25 is correctly configured
- PostgreSQL data loss after container restart: Ensure postgres_data volume is properly mounted and has correct permissions for the postgres user
- JWT token validation failures: Regenerate JWT_SECRET and SESSION_SECRET environment variables with sufficient entropy (32+ character random strings)
- GraphQL schema introspection failing: Verify target GraphQL endpoint allows introspection queries and authentication headers are properly configured in Hoppscotch
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
hoppscotchpostgresqlsmtp4dev
Tags
#hoppscotch#api-testing#postman#rest#graphql
Category
Development ToolsAd Space
Shortcuts: C CopyF FavoriteD Download