wtree Cloud

Compose domains

Route domains to Compose services from the panel, or write Traefik labels yourself.

Give a Compose service a domain either in Settings › Domains or with your own Traefik labels.

Use panel domains

Open your Compose service and go to Settings › Domains.

Click Add domain and choose the service, host and port.

Open Overview and click Deploy. wtree Cloud adds the Traefik labels at deploy time.

Open Settings › Source and click Preview Compose to see the final file. With at least one domain it shows the added labels and networks. For this compose file:

docker-compose.yml
services:
  beszel:
    image: henrygd/beszel:0.18
    restart: unless-stopped
    ports:
      - 8090
    volumes:
      - beszel_data:/beszel_data

volumes:
  beszel_data: {}

the deployed version (with isolated deployments) looks like this:

services:
  beszel:
    image: henrygd/beszel:0.18
    restart: unless-stopped
    ports:
      - 8090
    volumes:
      - beszel_data:/beszel_data
      - /var/run/docker.sock:/var/run/docker.sock:ro
    networks:
      - a-beszel-a95pzl
    labels:
      - traefik.http.routers.a-beszel-a95pzl-715-web.rule=Host(`a-beszel-d073ee-31-220-108-27.sslip.io`)
      - traefik.http.routers.a-beszel-a95pzl-715-web.entrypoints=web
      - traefik.http.services.a-beszel-a95pzl-715-web.loadbalancer.server.port=8090
      - traefik.http.routers.a-beszel-a95pzl-715-web.service=a-beszel-a95pzl-715-web
      - traefik.enable=true

networks:
  a-beszel-a95pzl:
    name: a-beszel-a95pzl
    external: true

Rules:

  • With no domains and no isolated deployments, your file runs unmodified.
  • Without isolated deployments, wtree Cloud attaches w3panel-network only to the service you selected. Add it to the other services yourself if they must stay reachable.

See Domains for DNS and certificates.

Write labels manually

Use this when you need routing the UI can't express.

Put each routed service on w3panel-network, or enable isolated deployments instead:

services:
  frontend:
    networks:
      - w3panel-network

networks:
  w3panel-network:
    external: true

Add Traefik labels. Use expose rather than ports so the port stays on the container network:

services:
  frontend:
    expose:
      - 3000
    networks:
      - w3panel-network
    labels:
      - traefik.enable=true
      - traefik.http.routers.frontend-app.rule=Host(`frontend.example.com`)
      - traefik.http.routers.frontend-app.entrypoints=web
      - traefik.http.services.frontend-app.loadbalancer.server.port=3000

Create an A record for the domain at your DNS provider, then deploy.

LabelPurpose
traefik.enable=trueTurns on Traefik routing for the service.
traefik.http.routers.<name>.ruleThe host rule, such as Host(`app.example.com`).
traefik.http.routers.<name>.entrypointsweb for HTTP. websecure for HTTPS.
traefik.http.services.<name>.loadbalancer.server.portThe container's internal port.

<name> must be unique per router and service, for example frontend-app. For HTTPS, use websecure with traefik.http.routers.<name>.tls.certResolver=letsencrypt.

Docker Stack

Stack mode needs labels under deploy.labels and pre-built images, because Stack does not support build. Build and push images to a registry first.

services:
  frontend:
    image: your-registry.com/frontend:latest
    expose:
      - 3000
    networks:
      - w3panel-network
    deploy:
      labels:
        - traefik.enable=true
        - traefik.http.routers.frontend-app.rule=Host(`frontend.example.com`)
        - traefik.http.routers.frontend-app.entrypoints=web
        - traefik.http.services.frontend-app.loadbalancer.server.port=3000

networks:
  w3panel-network:
    external: true

Next steps

On this page