headscale-admin icon indicating copy to clipboard operation
headscale-admin copied to clipboard

[HELP] Frontend not loading

Open jd-apprentice opened this issue 3 months ago • 8 comments

Hey there! I've raised an issue in the wrong place, it seems to be related to headscale-admin itself -> https://github.com/community-scripts/ProxmoxVE/issues/7267

Long story short after going into the website it seems to not load anything and throw the following error

Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
    Immutable 4
D1cWQVhH.js:8:5361
Image

jd-apprentice avatar Aug 29 '25 00:08 jd-apprentice

I've got the same issue.

iBisakol avatar Aug 30 '25 21:08 iBisakol

Same problem to

mojrs10 avatar Aug 31 '25 09:08 mojrs10

Same here, unfortunately

johannes1984 avatar Sep 06 '25 21:09 johannes1984

any fix?

mojrs10 avatar Sep 15 '25 10:09 mojrs10

Hi,

I’ve been testing different Caddy configurations until I finally found the correct one. Could someone else try with this configuration?

:80 {
    encode gzip zstd

    # --- Headscale API ---
    handle /api/* {
        reverse_proxy 127.0.0.1:8080
    }

    # --- UI ---
    handle {
        root * /opt/headscale-admin
        try_files {path} {path}/ /index.html
        file_server
    }

    header {
        X-Content-Type-Options nosniff
    }
}

With this one, the frontend loads correctly for me. After setting up the API and API KEY, the panel loads properly. But there are other errors caused by the incompatibility between Headscale-admin and Headscale (which I’ve reported here #88 ).

Regards.

jecabe avatar Sep 16 '25 09:09 jecabe

Hi,

I’ve been testing different Caddy configurations until I finally found the correct one. Could someone else try with this configuration?

:80 {
    encode gzip zstd

    # --- Headscale API ---
    handle /api/* {
        reverse_proxy 127.0.0.1:8080
    }

    # --- UI ---
    handle {
        root * /opt/headscale-admin
        try_files {path} {path}/ /index.html
        file_server
    }

    header {
        X-Content-Type-Options nosniff
    }
}

With this one, the frontend loads correctly for me. After setting up the API and API KEY, the panel loads properly. But there are other errors caused by the incompatibility between Headscale-admin and Headscale (which I’ve reported here #88 ).

Regards.

Thanks for trying your way to fix the Caddy issues! I'll give it a shot when I'm free.

jd-apprentice avatar Sep 16 '25 13:09 jd-apprentice

Huh, I have absolutely no idea where this is coming from... Can anyone help me replicate this issue in a dev environment of some kind? I'm happy to try and address this.

GoodiesHQ avatar Nov 15 '25 09:11 GoodiesHQ

@jd-apprentice @iBisakol @mojrs10

The example caddy implementation provided within the repo uses Caddy in a dockerized environment: https://github.com/GoodiesHQ/headscale-admin/tree/main/example

GoodiesHQ avatar Nov 15 '25 09:11 GoodiesHQ