Reverse Proxy
Learn how to use a reverse proxy with OrcaCD
Nginx
To use Nginx as a reverse proxy for OrcaCD, expose the Hub on localhost only and forward traffic from your public domain to the Hub port.
Use this server block in your Nginx config:
server {
listen 80;
server_name orcacd.example.com;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-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;
proxy_set_header X-Forwarded-Port $server_port;
# Required for WebSocket connections.
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}Now when registering an agent, you can use following URL as the Hub URL:
HUB_URL=http://orcacd.example.comCaddy
To use Caddy as a reverse proxy for OrcaCD, add the following to your Caddyfile:
orcacd.example.com {
reverse_proxy 127.0.0.1:8080
}Now when registering an agent, you can use following URL as the Hub URL:
HUB_URL=https://orcacd.example.comTraefik
To use Traefik as a reverse proxy for OrcaCD, you can add the following labels to your Docker Compose configuration for the OrcaCD Hub service:
services:
hub:
image: ghcr.io/orcacd/hub:latest
container_name: orca-hub
ports:
- "127.0.0.1:8080:8080"
restart: unless-stopped
env_file: .env
labels:
- "traefik.enable=true"
- "traefik.http.routers.orcacd.rule=Host(`orcacd.example.com`)"
volumes:
- ./data/hub:/app/dataNow when registering an agent, you can use following URL as the Hub URL:
HUB_URL=http://orcacd.example.comLast updated on