GithubHelp home page GithubHelp logo

anjomro / headscale-webui Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 0.0 698 KB

Headscale UI Docker Image for https://git.sysctl.io/albert/headscale-webui

License: Other

Dockerfile 0.72% Python 45.74% CSS 0.09% JavaScript 34.11% HTML 19.30% Shell 0.04%

headscale-webui's Introduction

headscale-webui

  • This is just a simple front-end for a Headscale server. Allows you to do the following:
  1. Enable/Disable routes and exit nodes
  2. Add, move, rename, and remove machines
  3. Add and remove users/namespaces
  4. Add and expire PreAuth keys
  5. Add and remove machine tags
  6. View machine details (last online, IP addresses, hsotname, PreAuth key in use, enabled/disabled routes, and tags)

Screenshots:

Machines Users Add a new machine Machine Details API Key Test

Installation:

  1. This assumes you have traefik as your reverse proxy. I'm sure it will work with others, but I don't have experience with any.
  2. Change the following variables in docker-compose.yml:
    1. TZ - Change to your timezone. Example: Asia/Tokyo
    2. HS_SERVER - Change to your headscale's URL
    3. BASE_PATH - This will be the path your server is served on. Because the GUI expects <HS_SERVER/admin>, I usually put this as "/admin"
    4. KEY - Your encryption key to store your headscale API key on disk. Generate a new one with "openssl rand -base64 32". Do not forget the quotations around the key when entering.
  3. You will also need to change the volumes:
    1. /data - Where your encryption key will reside. Can be anywhere
    2. /etc/headscale/ - This is your Headscale configuration file.
  4. Update the build context location to the directory with the Dockerfile.
    1. Example: If Dockerfile is in /home/username/headscale-webui, your context will be:
      •  `context: /home/username/headscale-webui/`
        

Traefik

  • This was built assuming the use of the Traefik reverse proxy.
  • Exmaple config:
    labels:
      # Traefik Configs
      - "traefik.enable=true"
      - "traefik.http.routers.headscale-webui.entrypoints=web-secure"
      - "traefik.http.routers.headscale-webui.rule=Host(`headscale.$DOMAIN`) && (PathPrefix(`/admin/`) || PathPrefix(`/admin`))"
      - "traefik.http.services.headscale-webui.loadbalancer.server.port=5000"
      - "traefik.http.routers.headscale-webui.tls.certresolver=letsencrypt"
        # redirect /admin to /
      - "traefik.http.middlewares.headscale-webui-stripprefix.stripprefix.forceslash=true"
      - "traefik.http.middlewares.headscale-webui-stripprefix.stripprefix.prefixes=/admin/"
  • Replace $DOMAIN with your domain.

headscale-webui's People

Contributors

anjomro avatar ifargle avatar

Stargazers

Dima Gunkin avatar masx200 avatar Woodrow Pearson avatar  avatar  avatar  avatar Ragdata avatar  avatar Daniel Phan avatar  avatar x86dev avatar  avatar

Watchers

 avatar Kostas Georgiou avatar

headscale-webui's Issues

error

docker run -d
--name headscale
--restart always
-v /data/headscale/config:/etc/headscale/
-v /data/headscale/data:/var/lib/headscale
-p 9527:8080 \
-p 9090:9090 \

docker run -d
--name headscale-webui
--restart always
-v /data/headscale/config/:/etc/headscale/:ro
-v /data/headscale/web-ui/data:/data
-u root
-p 5000:5000
-e HS_SERVER=http://ip
-e DOMAIN_NAME=http://ip
-e AUTH_TYPE=Basic
-e BASIC_AUTH_USER=admin
-e BASIC_AUTH_PASS=admin
-e KEY="D1wVZSL0rCaKjU3DKcRrGn2rC+NOrnLyK5tjYSsAWx8="
ifargle/headscale-webui:latest
image
image
image

Fix Redirection if base path is '/'

In case the base path is / and no api key is set yet the user is redirected to //settings instead of e.g. http://127.0.0.1:500/settings because the two forward slashes are interpreted as protocol by a browser.

See:

if not helper.key_test(): return redirect(BASE_PATH+url_for('settings_page'))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.