Copy the following files from the repository:
docker-compose.yml.env.exampleAlso copy the proxy docker compose file from the /proxy directory.
Create the following structure:
.
├── docker-compose.yml
├── .env
└── proxy
└── docker-compose.yml
Rename .env.example to .env.
Navigate into the proxy directory:
cd proxy
Start the proxy stack:
docker compose up -d
Go back to the root directory:
cd ..
Open the .env file and adjust the values to match your environment (domain, ports, secrets, etc.).
Run the main compose stack:
docker compose up -d
✅ Hoppscotch is now running and ready to be accessed through your configured reverse proxy.
This guide shows how to expose Hoppscotch services behind Nginx Proxy Manager using path routing.
The setup routes:
| Path | Service | Port |
|---|---|---|
/ |
Hoppscotch frontend | 3000 |
/admin |
Hoppscotch admin | 3100 |
/backend |
Hoppscotch backend API | 3170 |
Example domain used:
hopp.assie.local
In Nginx Proxy Manager → Proxy Hosts → Add Proxy Host
hopp.assie.local
| Setting | Value |
|---|---|
| Scheme | http |
| Forward Hostname/IP | 127.0.0.1 |
| Forward Port | 3000 |
Publicly Accessible
Enable:
Block Common Exploits
Websockets Support
Disable:
Cache Assets
Open the Custom Locations tab.
Location:
/admin
Forward Settings:
| Setting | Value |
|---|---|
| Scheme | http |
| Forward Hostname/IP | 127.0.0.1 |
| Forward Port | 3100 |
Location:
/backend
Forward Settings:
| Setting | Value |
|---|---|
| Scheme | http |
| Forward Hostname/IP | 127.0.0.1 |
| Forward Port | 3170 |
Open Advanced → Custom Nginx Configuration and add:
location ^~ /backend/ {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Trailing slash is the magic: strips /backend/
proxy_pass http://127.0.0.1:3170/;
}
location = /backend {
return 301 /backend/;
}
This configuration:
• Enables WebSocket support
• Preserves headers for the backend
• Fixes trailing slash routing issues
• Strips /backend/ before forwarding to the backend service
Go to the SSL tab.
Enable:
Request a new SSL certificate
Force SSL
HTTP/2 Support
Use Let's Encrypt.
After setup, the services will be accessible as:
https://hopp.assie.local/ → Hoppscotch frontend
https://hopp.assie.local/admin → Hoppscotch admin
https://hopp.assie.local/backend → Hoppscotch backend API
Internet
│
▼
Nginx Proxy Manager
│
├── / → 127.0.0.1:3000
├── /admin → 127.0.0.1:3100
└── /backend → 127.0.0.1:3170
services:
postgres:
image: postgres:16
container_name: hoppscotch-postgres
restart: unless-stopped
environment:
POSTGRES_DB: hop
POSTGRES_USER: <username>
POSTGRES_PASSWORD: <SuperStrongPassword / or not so strong>
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- hoppscotch
hoppscotch-backend:
image: hoppscotch/hoppscotch-backend
container_name: hoppscotch-backend
restart: unless-stopped
env_file:
- .env
ports:
- "3170:3170"
depends_on:
- postgres
networks:
- hoppscotch
hoppscotch-frontend:
image: hoppscotch/hoppscotch-frontend
container_name: hoppscotch-frontend
restart: unless-stopped
env_file:
- .env
ports:
- "3000:3000"
- "3200:3200"
depends_on:
- hoppscotch-backend
networks:
- hoppscotch
hoppscotch-admin:
image: hoppscotch/hoppscotch-admin
container_name: hoppscotch-admin
restart: unless-stopped
env_file:
- .env
ports:
- "3100:3100"
depends_on:
- hoppscotch-backend
networks:
- hoppscotch
volumes:
postgres_data:
networks:
hoppscotch:
driver: bridge#-----------------------Backend Config------------------------------#
# DATABASE_URL=postgresql://username:password@url:5432/dbname
DATABASE_URL=postgresql://username:password@postgres:5432/hoppscotch
# Optional (usually leave alone unless you need it):
HOPP_AIO_ALTERNATE_PORT=80
# MUST be a real 32-character key (not asterisks) - `openssl rand -base64 32`
DATA_ENCRYPTION_KEY=
# Use your real public origin (plus the app:// origin for the desktop app)
WHITELISTED_ORIGINS=https://domain.com,app://domain.com,http://domain.com
# Recommended when you serve over HTTPS (cookies should be Secure)
ALLOW_SECURE_COOKIES=true
#-----------------------Frontend Config------------------------------#
# Base URLs (public)
VITE_BASE_URL=https://domain.com
VITE_SHORTCODE_BASE_URL=https://domain.com
VITE_ADMIN_URL=https://domain.com/admin
# Backend URLs (public, via subpath)
VITE_BACKEND_GQL_URL=https://domain.com/backend/graphql
VITE_BACKEND_API_URL=https://domain.com/backend/v1
VITE_BACKEND_WS_URL=wss://domain.com/backend/graphql
# Optional links
VITE_APP_TOS_LINK=https://docs.hoppscotch.io/support/terms
VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/support/privacy
# IMPORTANT for single-domain setup
ENABLE_SUBPATH_BASED_ACCESS=true