tale / headplane

An advanced UI for juanfont/headscale
MIT License
223 stars 13 forks source link

Issue with deployment - No route matches URL "/" #38

Closed klinkeye closed 1 month ago

klinkeye commented 1 month ago

Fresh first deployment, startup logs dont show anything of concern, but when I browse to http://:3000 I receive a 404 error and the following logs are seen:

dock02_headplane  | Error: No route matches URL "/"
dock02_headplane  |     at getInternalRouterError (/app/node_modules/.pnpm/@remix-run+router@1.17.1/node_modules/@remix-run/router/router.ts:5400:5)
dock02_headplane  |     at Object.query (/app/node_modules/.pnpm/@remix-run+router@1.17.1/node_modules/@remix-run/router/router.ts:3509:19)
dock02_headplane  |     at handleDocumentRequest (/app/node_modules/.pnpm/@remix-run+server-runtime@2.10.2_typescript@5.5.3/node_modules/@remix-run/server-runtime/dist/server.js:268:35)
dock02_headplane  |     at requestHandler (/app/node_modules/.pnpm/@remix-run+server-runtime@2.10.2_typescript@5.5.3/node_modules/@remix-run/server-runtime/dist/server.js:160:24)
dock02_headplane  |     at /app/node_modules/.pnpm/@remix-run+express@2.10.2_express@4.19.2_typescript@5.5.3/node_modules/@remix-run/express/dist/server.js:41:28
dock02_headplane  | GET / 404 - - 209.756 ms

Relevant config:

  headplane:
    container_name: dock02_headplane
    image: ghcr.io/tale/headplane:0.3.2
    restart: unless-stopped
    volumes:
      - /opt/stacks/headscale/data:/var/lib/headscale
      - /opt/stacks/headscale/config:/etc/headscale
      - /var/run/docker.sock:/var/run/docker.sock:ro
    networks:
      - npm-backend
    ports:
      - 3000:3000
    environment:
      # This is always required for Headplane to work
      COOKIE_SECRET: 'xxxx'

      HEADSCALE_INTEGRATION: 'docker'
      HEADSCALE_CONTAINER: 'dock02_headscale'
      DISABLE_API_KEY_LOGIN: 'false'
      HOST: '0.0.0.0'
      PORT: '3000'
      DEBUG: 'true'
      # Only set this to false if you aren't behind a reverse proxy
      COOKIE_SECURE: 'false'
      ROOT_API_KEY: 'xxxx'
tale commented 1 month ago

It expects it to be on /admin

2TAP2B commented 1 month ago

Do you use a reverse proxy? im using caddy and it works perfect!

use this for your compose.yml

  caddy:
    image: caddy
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
      - "443:443/udp"
    volumes:
      - ./caddy/config:/config
      - ./caddy/data:/data
      - ./caddy/Caddyfile:/etc/caddy/Caddyfile

and this is your Caddyfile, create this before starting first time the container


https://sub.domain.com {
    reverse_proxy /admin* http://headplane:3000
    reverse_proxy * http://headscale:8080
}