gurucomputing / headscale-ui

A web frontend for the headscale Tailscale-compatible coordination server
BSD 3-Clause "New" or "Revised" License
1.59k stars 113 forks source link

Setting up headscale-ui with Caddy on a VPS hosting headscale #110

Closed dpetryuk closed 1 year ago

dpetryuk commented 1 year ago

Hi. I'm currently trying to get headscale-ui setup with headscale on my VPS (on Debian 11) using Caddy. I have headscale running on my VPS under the host static IP. I downloaded headscale-ui, unzipped, and placed the web folder under /var/www/html for Caddy. However, when I try to reach the server via my VPS's host IP, I get these errors in the console. image

Here's my Caddyfile config: image

I also tried hosting the files under /web through the Caddyfile (added /web to :80), but the files wouldn't even load in. Any suggestions? Thanks in advance.

dpetryuk commented 1 year ago

For anyone else that may run into this issue: I managed to solve this by following the instructions here

i had to add handle_path /web* { root * /var/www/html/web file_server } along with reverse_proxy localhost:8080 to my Caddyfile to setup a reverse proxy for headscale since it's running on that port in my VPS by default.