GoDoxy
Getting Started

Configuring Routes

Routes define how GoDoxy directs traffic to your applications. This guide covers all configuration methods, from Docker labels to route files

Quick Reference

MethodUse CaseConfiguration Location
Docker LabelsContainerized appsdocker-compose.yml labels
Route FilesNon-Docker apps, VMs, LXCconfig/*.yml files

Docker Container Configuration

Configure routes for containerized applications using Docker labels.

Basic Example

services:
  app:
    image: nginx
    container_name: my-app
    labels:
      # Hostname aliases (FQDN or subdomain)
      proxy.aliases: app, app.domain.com
      # Target port (auto-detected if not specified)
      proxy.#1.port: 80
      # Inactivity timeout before sleep (disabled by default)
      proxy.idle_timeout: 1h

Network Configuration

If your container uses multiple networks, specify which network GoDoxy should use:

services:
  app:
    image: app
    labels:
      proxy.network: app-network
    networks:
      - app-network
      - app-network-2

networks:
  app-network:
  app-network-2:

Health Check Configuration

Configure health checks to verify route availability:

labels:
  # Path to check (applied to all aliases)
  proxy.*.healthcheck.path: /ping
  # Check interval
  proxy.*.healthcheck.interval: 10s

Homepage Configuration

Customize how the route appears in the WebUI:

labels:
  proxy.#1.homepage: |
    name: App Name
    icon: "@selfhst/app.svg"
    description: Application description
    category: app
  # Hide specific alias from homepage
  proxy.#2.homepage.show: false

Route File Configuration

Route files configure routes for non-Docker applications (VMs, LXC containers, bare-metal).

File Structure

Place route files in the config/ directory with descriptive names:

config/
├── pve.yml        # Proxmox VE hosts
├── lxc.yml        # LXC containers
├── vps.yml        # Remote VPS instances
└── custom.yml     # Custom applications

Include Route Files

Add route files to providers.include in your config.yml:

providers:
  include:
    - config/pve.yml
    - config/lxc.yml
    - config/custom.yml

Basic Route File

# config/app.yml
app:
  host: 10.0.9.98
  port: 80
  homepage:
    name: Application
    icon: "@selfhst/app.svg"
    description: My application
    category: app

app-backend:
  host: 10.0.9.98
  port: 8080
  homepage:
    show: false

File Server Route

Serve static files from a directory:

blog:
  scheme: fileserver
  root: /app/blog/public
  spa: true
  index: index.html

Remote Agent Routes

Route traffic through a remote GoDoxy agent:

api.example.com:
  host: api.example.com
  scheme: https
  port: 443
  agent: https://10.0.1.2:8890

Configuration Reuse with YAML Anchors

Use YAML anchors to share configuration across routes:

x-proxy-common: &proxy-common
  scheme: https
  middlewares:
    hideXForwarded:
    modifyRequest:
      setHeaders:
        Host: $req_host

api.example.com:
  <<: *proxy-common
  host: api.example.com

admin.example.com:
  <<: *proxy-common
  host: admin.example.com

Label Syntax Reference

Full Namespace Syntax (Traefik-style)

services:
  app:
    labels:
      proxy.app.middlewares.request.set_headers.X-Custom-Header: value1,value2

Inline YAML Syntax

services:
  app:
    labels:
      proxy.app.middlewares.request.set_headers: |
        - X-Custom-Header: value1
        - X-Custom-Header2: value2

Index-Based Alias Configuration

Configure specific aliases by their position:

labels:
  proxy.aliases: app.domain.com, app-backend.domain.com
  # #1 points to first alias (app.domain.com)
  proxy.#1.port: 80
  # #2 points to second alias (app-backend.domain.com)
  proxy.#2.port: 8080

Property Reference

Core Proxy Properties

PropertyDescriptionDefaultValues
schemeRoute protocolAuto-detectedhttp, https, tcp, udp, fileserver
hostTarget hostname/IPDocker: client IP
File: localhost
IP or hostname
portListening and proxy port80:proxy_port+443:proxy_port (proxy port auto-detected)1-65535 or 1-65535:1-65535
agentUpstream agentNoneAgent name or URL
no_tls_verifySkip TLS verificationfalsetrue, false

Stream Properties (TCP/UDP)

PropertyDescriptionDefaultValues
portListening and proxy port0:lowest_port (random listening port)from:to format
bindBind address0.0.0.0IP address

HTTP-Specific Properties

PropertyDescriptionDefaultValues
bindBind to specific IP address0.0.0.0IP address
no_tls_verifySkip TLS verificationfalseboolean
response_header_timeoutResponse header timeout60sduration
disable_compressionDisable gzip compressionfalseboolean
ssl_server_nameSNI server nameAutostring
ssl_trusted_certificateCA certificate pathNonefile path
ssl_certificateClient certificate pathNonefile path
ssl_certificate_keyClient key pathNonefile path
ssl_protocolsAllowed TLS versionsAll supportedTLSv1.0TLSv1.3

File Server Properties

PropertyDescriptionDefaultValues
rootDocument root directoryRequireddirectory path
spaSingle-page application modefalseboolean
indexDefault index file for SPA mode/index.htmlfilename

Sleep & Wake Properties

PropertyDescriptionDefaultValues
idle_timeoutInactivity before sleepDisabledduration (e.g., 1h30s)
wake_timeoutWait time for wake30sduration
stop_methodStop method after idlestopstop, pause, kill
stop_timeoutTimeout for stop command10sduration
stop_signalSignal for stop/killDocker defaultSignal name
start_endpointRequired wake endpointAnyrelative path
no_loading_pageDisable wake loading pagefalseboolean

Label-Only Properties

PropertyDescriptionDefaultValues
aliasesRoute hostnamescontainer_namecomma-separated
excludeExclude from proxyfalseboolean
networkDocker networkFirst availablenetwork name

Docker Troubleshooting

Containers Not Appearing

Ensure containers expose their ports:

services:
  nginx:
    expose:
      - "80"

Common Issues

  1. Port not detected: Verify expose or ports are defined
  2. Wrong network: Specify proxy.network if using multiple networks
  3. Alias not working: Ensure FQDN matches DNS records

On this page