From c2f8038274a586921dda52c3a5190d4ccff22edd Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Thu, 4 May 2023 22:54:13 +0900 Subject: [PATCH] add headscale --- compose.yml | 12 ++++++++++++ etc/caddy/Caddyfile | 3 +++ etc/headscale/config.yaml | 11 +++++++++++ 3 files changed, 26 insertions(+) create mode 100644 etc/headscale/config.yaml diff --git a/compose.yml b/compose.yml index 08b2e09..0a29c82 100644 --- a/compose.yml +++ b/compose.yml @@ -77,12 +77,24 @@ services: - ./etc/maddy:/etc/maddy - caddy_data:/var/lib/caddy/data:ro - maddy_data:/data + headscale: + image: headscale/headscale:0.22.1 + restart: unless-stopped + ports: + - "127.0.0.1:9200:9200" + volumes: + - ./etc/headscale:/etc/headscale + - headscale_data:/var/lib/headscale + networks: + - fogtype + command: headscale serve volumes: caddy_data: caddy_config: gotosocial_data: vikunja_data: maddy_data: + headscale_data: networks: fogtype: ipam: diff --git a/etc/caddy/Caddyfile b/etc/caddy/Caddyfile index 4777109..2796125 100644 --- a/etc/caddy/Caddyfile +++ b/etc/caddy/Caddyfile @@ -21,6 +21,9 @@ dns.fogtype.com { } } } +net.fogtype.com { + reverse_proxy headscale:8080 +} mta-sts.fogtype.com { handle /.well-known/mta-sts.txt { file_server diff --git a/etc/headscale/config.yaml b/etc/headscale/config.yaml new file mode 100644 index 0000000..804ec86 --- /dev/null +++ b/etc/headscale/config.yaml @@ -0,0 +1,11 @@ +server_url: https://net.fogtype.com +listen_addr: 0.0.0.0:8080 +metrics_listen_addr: 0.0.0.0:9200 +db_type: sqlite3 +db_path: /var/lib/headscale/db.sqlite +private_key_path: /var/lib/headscale/private.key +noise: + private_key_path: /var/lib/headscale/noise_private.key +ip_prefixes: + - fd7a:115c:a1e0::/48 + - 100.64.0.0/10