-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with API access from headscale-admin to headscale using ts side car. #26
Comments
does the api use the grpc port? should enable unsecure grpc? dying to get this going looks like you've done some amazing work |
Hey there! So from a cursory view, I wanted to mention that in the Settings page, you can fill out the API URL to point to your actual headscale API. By default, it will just take the base domain of your current URL that the admin is hosted on, but if the API and headscale-admin are hosted in different places, make sure to put in your URL explicitly. Also, make sure you add CORS headers to permit the URL in your browser to access those resources :) Let me know if that fixes it. If not, I'll look further into it. |
And also, just to be very clear, there is no need to "secure it from the internet" in the sense of hiding it behind a network or additional authentication. At the end of the day, all it is doing is providing an API key (stored within your browser, NOT stored on, or even transmitted to, the server side) to the API URL you provide. It is a glorified HTML wrapper around HTTP requests that can be replicated with cURL commands. Exposing it does not increase any risk since your API is already "exposed" and this is a static application that just interacts with the API. I do always recommend hosting it using HTTPS to avoid script injection attacks and the likes, but there is nothing wrong with having it exposed and publicly accessible. It is just HTML and JS files that turn your browser into a HTTP client for the Headscale API, and that is only possible if you have a valid API key. |
I can't connect to UI either. Headscale is accepting Tailscale clients, firewall is set up. I'm not sure what API URL I should be entering - do I specify the 50443 port? I have TCP port 50443 forwarded to the headscale-admin host (same host that is hosting headscale for testing). Valid SSL certs have been added to headscale config.yaml. I have created a DNS entry for the admin UI on the same domain as the SSL cert I have loaded in config.yaml gRPC config:
|
I am trying to go for an a-typical deployment. In an effort to both easily manage my access to the admin page and to secure it from the internet I am running a sidecar tailscale container to the headscale-admin container. based on the official directions. i have headscale running in its own container as well.
so a little background I am running headscale behind nginx proxy manager (NPM). Headscale is working great. I have tls and it's acessable via "https://headscale.MY_DOMAIN" based on the following configs. i can see that my headscale-ui container has joined my tailnet as a node by running "headscale nodes list". I can even navigate to it from another node: :). if i go into the headscale-ui container and "ping headscale" i have connectivity.
The problem is it that im unable to get the api key to be accepted. I have generated an api key from headscale based on the directions and have it entered, the issue is that no matter what url i put in for the api its not working.
Headscale config
Headscale docker-compose
headscale-admin docker-compose
The text was updated successfully, but these errors were encountered: