wtree Cloud

Domains and Traefik

Fix domains that don't resolve, 404 and Bad Gateway errors, and Traefik routing problems.

Application domain doesn't work

The deployment succeeded and logs are running, but the domain fails.

Cause: a wrong port, an app bound to localhost, an interfering Ports setting, or a certificate that was never issued.

Fix: check each item.

  1. The domain port matches the app's port, for example 3000 for Next.js or 8000 for Laravel. Update the domain when you change the app port.
  2. The app listens on 0.0.0.0, not 127.0.0.1. Vite apps often default to 127.0.0.1.
  3. Ports under Settings › Networking is unused. Enable it only to reach the app at IP:port, since it can interfere with the domain.
  4. The DNS record pointed at your server's IP before you added the domain in wtree Cloud. Otherwise the Let's Encrypt certificate isn't generated. Recreate the domain or restart Traefik.

Bad Gateway on an application domain

Cause: a port mismatch, or the service listens only on 127.0.0.1. This is common in Vite, Astro and Vue apps.

Fix: set the correct port and make the app listen on all interfaces, then redeploy. For Vite:

vite.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

export default defineConfig({
  plugins: [react()],
  preview: { host: true, port: 3000 },
  server: { host: true, port: 3000 },
});

Astro and other frameworks have an equivalent host option, for example in astro.config.mjs. Check your framework's docs.

Compose domain doesn't work

Cause: published ports conflict with other apps or ports, or a failing healthcheck prevents the domain from ever routing.

Fix: for Docker Compose, don't publish host ports. Give the container port only:

services:
  app:
    image: ghcr.io/w3panel/w3panel:latest
    ports:
      - 3000

Avoid 3000:3000. For Docker Stack, ports are exposed automatically, so use expose instead of ports:

services:
  app:
    image: ghcr.io/w3panel/w3panel:latest
    expose:
      - 3000

Then create the domain with the service name and port:

domain: my-app.com
serviceName: app
port: 3000

If the service defines a healthcheck, make sure it passes or remove it.

Template or Compose service returns 404

Cause: applications and Compose services route differently.

TypeRoutingAfter a domain change
Applications (Nixpacks, Dockerfile, Buildpacks)Traefik file system configApplied automatically
Templates and Compose servicesTraefik labels from container metadataRedeploy required

Fix: configure the domain in the service's Settings › Domains, then redeploy and wait for it to finish. Redeploy after every domain add, change or removal. See Traefik's Docker provider reference for labels.

"use of closed network connection" in Traefik logs

Cause: Traefik is restarting and closing its listeners on ports 80, 443 and 9000.

Fix: none needed. The error is expected during a restart.

Still stuck? See wtree Cloud instance and Domains.

On this page