Headscale

An open source, self-hosted implementation of the Tailscale control server

Stars
16.6K
Forks
970
Open issues
96
Closed issues
516
Last release
12 months ago
Last commit
5 months ago
Watchers
16.6K
Total releases
93
Total commits
3.02K
Open PRs
21
Closed PRs
620
Repo URL
Platform
Category
Usecase
VPN
Offers premium version?
NO
Proprietary?
NO
About

An open source, self-hosted implementation of the Tailscale control server.

Join our Discord server for a chat.

Note: Always select the same GitHub tag as the released version you use to ensure you have the correct example configuration and documentation. The main branch might contain unreleased changes.

What is Tailscale

Tailscale is a modern VPN built on top of Wireguard. It works like an overlay network between the computers of your networks - using NAT traversal.

Everything in Tailscale is Open Source, except the GUI clients for proprietary OS (Windows and macOS/iOS), and the control server.

The control server works as an exchange point of Wireguard public keys for the nodes in the Tailscale network. It assigns the IP addresses of the clients, creates the boundaries between each user, enables sharing machines between users, and exposes the advertised routes of your nodes.

A Tailscale network (tailnet) is private network which Tailscale assigns to a user in terms of private users or an organisation.

Design goal

Headscale aims to implement a self-hosted, open source alternative to the Tailscale control server. Headscale's goal is to provide self-hosters and hobbyists with an open-source server they can use for their projects and labs. It implements a narrow scope, a single Tailnet, suitable for a personal use, or a small open-source organisation.

Supporting Headscale

If you like headscale and find it useful, there is a sponsorship and donation buttons available in the repo.

Features

  • Full "base" support of Tailscale's features
  • Configurable DNS

  • Node registration

    • Single-Sign-On (via Open ID Connect)
    • Pre authenticated key

  • Taildrop (File Sharing)
  • Access control lists
  • MagicDNS
  • Support for multiple IP ranges in the tailnet
  • Dual stack (IPv4 and IPv6)
  • Routing advertising (including exit nodes)
  • Ephemeral nodes
  • Embedded DERP server
Client OS support

OS Supports headscale

Linux Yes

OpenBSD Yes

FreeBSD Yes

macOS Yes (see /apple on your headscale for more information)

Windows Yes docs

Android Yes docs

iOS Yes docs

Running headscale

Please note that we do not support nor encourage the use of reverse proxies and container to run Headscale.

Please have a look at the documentation.

Talks

Disclaimer

  1. This project is not associated with Tailscale Inc.
  2. The purpose of Headscale is maintaining a working, self-hosted Tailscale control panel.

Contributing

Headscale is "Open Source, acknowledged contribution", this means that any contribution will have to be discussed with the Maintainers before being submitted.

This model has been chosen to reduce the risk of burnout by limiting the maintenance overhead of reviewing and validating third-party code.

Headscale is open to code contributions for bug fixes without discussion.

If you find mistakes in the documentation, please submit a fix to the documentation.

Requirements

To contribute to headscale you would need the lastest version of Go and Buf(Protobuf generator).

We recommend using Nix to setup a development environment. This can be done with nix develop, which will install the tools and give you a shell. This guarantees that you will have the same dev env as headscale maintainers.

Code style

To ensure we have some consistency with a growing number of contributions, this project has adopted linting and style/formatting rules:

The Go code is linted with golangci-lint and formatted with golines (width 88) and gofumpt. Please configure your editor to run the tools while developing and make sure to run make lint and make fmt before committing any code.

The Proto code is linted with buf and formatted with clang-format.

The rest (Markdown, YAML, etc) is formatted with prettier.

Check out the .golangci.yaml and Makefile to see the specific configuration.

Install development tools

  • Go
  • Buf
  • Protobuf tools

Install and activate:

nix develop
Testing and building

Some parts of the project require the generation of Go code from Protobuf (if changes are made in proto/) and it must be (re-)generated with:

make generate

Note: Please check in changes from gen/ in a separate commit to make it easier to review.

To run the tests:

make test

To build the program:

nix build

or

make build
Contributors

    <a href="https://github.com/kradalby" rel="nofollow">

        <br>
        <sub><b>Kristoffer Dalby</b></sub>
    </a>


    <a href="https://github.com/juanfont" rel="nofollow">

        <br>
        <sub><b>Juan Font</b></sub>
    </a>


    <a href="https://github.com/restanrm" rel="nofollow">

        <br>
        <sub><b>Adrien Raffin-Caboisse</b></sub>
    </a>


    <a href="https://github.com/cure" rel="nofollow">

        <br>
        <sub><b>Ward Vandewege</b></sub>
    </a>


    <a href="https://github.com/huskyii" rel="nofollow">

        <br>
        <sub><b>Jiang Zhu</b></sub>
    </a>


    <a href="https://github.com/tsujamin" rel="nofollow">

        <br>
        <sub><b>Benjamin Roberts</b></sub>
    </a>




    <a href="https://github.com/reynico" rel="nofollow">

        <br>
        <sub><b>Nico</b></sub>
    </a>


    <a href="https://github.com/evenh" rel="nofollow">

        <br>
        <sub><b>Even Holthe</b></sub>
    </a>


    <a href="https://github.com/e-zk" rel="nofollow">

        <br>
        <sub><b>e-zk</b></sub>
    </a>


    <a href="https://github.com/ImpostorKeanu" rel="nofollow">

        <br>
        <sub><b>Justin Angel</b></sub>
    </a>


    <a href="https://github.com/ItalyPaleAle" rel="nofollow">

        <br>
        <sub><b>Alessandro (Ale) Segala</b></sub>
    </a>


    <a href="https://github.com/ohdearaugustin" rel="nofollow">

        <br>
        <sub><b>ohdearaugustin</b></sub>
    </a>




    <a href="https://github.com/mpldr" rel="nofollow">

        <br>
        <sub><b>Moritz Poldrack</b></sub>
    </a>


    <a href="https://github.com/Orhideous" rel="nofollow">

        <br>
        <sub><b>Andriy Kushnir</b></sub>
    </a>


    <a href="https://github.com/GrigoriyMikhalkin" rel="nofollow">

        <br>
        <sub><b>GrigoriyMikhalkin</b></sub>
    </a>


    <a href="https://github.com/christian-heusel" rel="nofollow">

        <br>
        <sub><b>Christian Heusel</b></sub>
    </a>


    <a href="https://github.com/mike-lloyd03" rel="nofollow">

        <br>
        <sub><b>Mike Lloyd</b></sub>
    </a>


    <a href="https://github.com/iSchluff" rel="nofollow">

        <br>
        <sub><b>Anton Schubert</b></sub>
    </a>




    <a href="https://github.com/Niek" rel="nofollow">

        <br>
        <sub><b>Niek van der Maas</b></sub>
    </a>


    <a href="https://github.com/negbie" rel="nofollow">

        <br>
        <sub><b>Eugen Biegler</b></sub>
    </a>


    <a href="https://github.com/617a7a" rel="nofollow">

        <br>
        <sub><b>Azz</b></sub>
    </a>


    <a href="https://github.com/qbit" rel="nofollow">

        <br>
        <sub><b>Aaron Bieber</b></sub>
    </a>


    <a href="https://github.com/kazauwa" rel="nofollow">

        <br>
        <sub><b>Igor Perepilitsyn</b></sub>
    </a>


    <a href="https://github.com/Aluxima" rel="nofollow">

        <br>
        <sub><b>Laurent Marchaud</b></sub>
    </a>




    <a href="https://github.com/majst01" rel="nofollow">

        <br>
        <sub><b>Stefan Majer</b></sub>
    </a>


    <a href="https://github.com/fdelucchijr" rel="nofollow">

        <br>
        <sub><b>Fernando De Lucchi</b></sub>
    </a>


    <a href="https://github.com/OrvilleQ" rel="nofollow">

        <br>
        <sub><b>Orville Q. Song</b></sub>
    </a>


    <a href="https://github.com/hdhoang" rel="nofollow">

        <br>
        <sub><b>hdhoang</b></sub>
    </a>


    <a href="https://github.com/bravechamp" rel="nofollow">

        <br>
        <sub><b>bravechamp</b></sub>
    </a>


    <a href="https://github.com/deonthomasgy" rel="nofollow">

        <br>
        <sub><b>Deon Thomas</b></sub>
    </a>




    <a href="https://github.com/madjam002" rel="nofollow">

        <br>
        <sub><b>Jamie Greeff</b></sub>
    </a>


    <a href="https://github.com/jonathanspw" rel="nofollow">

        <br>
        <sub><b>Jonathan Wright</b></sub>
    </a>


    <a href="https://github.com/ChibangLW" rel="nofollow">

        <br>
        <sub><b>ChibangLW</b></sub>
    </a>


    <a href="https://github.com/majabojarska" rel="nofollow">

        <br>
        <sub><b>Maja Bojarska</b></sub>
    </a>


    <a href="https://github.com/mevansam" rel="nofollow">

        <br>
        <sub><b>Mevan Samaratunga</b></sub>
    </a>


    <a href="https://github.com/dragetd" rel="nofollow">

        <br>
        <sub><b>Michael G.</b></sub>
    </a>




    <a href="https://github.com/ptman" rel="nofollow">

        <br>
        <sub><b>Paul Tötterman</b></sub>
    </a>


    <a href="https://github.com/samson4649" rel="nofollow">

        <br>
        <sub><b>Samuel Lock</b></sub>
    </a>


    <a href="https://github.com/loprima-l" rel="nofollow">

        <br>
        <sub><b>loprima-l</b></sub>
    </a>


    <a href="https://github.com/unreality" rel="nofollow">

        <br>
        <sub><b>unreality</b></sub>
    </a>


    <a href="https://github.com/kevin1sMe" rel="nofollow">

        <br>
        <sub><b>kevinlin</b></sub>
    </a>


    <a href="https://github.com/QZAiXH" rel="nofollow">

        <br>
        <sub><b>Snack</b></sub>
    </a>




    <a href="https://github.com/artemklevtsov" rel="nofollow">

        <br>
        <sub><b>Artem Klevtsov</b></sub>
    </a>


    <a href="https://github.com/cmars" rel="nofollow">

        <br>
        <sub><b>Casey Marshall</b></sub>
    </a>


    <a href="https://github.com/dbevacqua" rel="nofollow">

        <br>
        <sub><b>dbevacqua</b></sub>
    </a>


    <a href="https://github.com/joshuataylor" rel="nofollow">

        <br>
        <sub><b>Josh Taylor</b></sub>
    </a>


    <a href="https://github.com/CNLHC" rel="nofollow">

        <br>
        <sub><b>LIU HANCHENG</b></sub>
    </a>


    <a href="https://github.com/motiejus" rel="nofollow">

        <br>
        <sub><b>Motiejus Jakštys</b></sub>
    </a>




    <a href="https://github.com/pvinis" rel="nofollow">

        <br>
        <sub><b>Pavlos Vinieratos</b></sub>
    </a>


    <a href="https://github.com/SilverBut" rel="nofollow">

        <br>
        <sub><b>Silver Bullet</b></sub>
    </a>


    <a href="https://github.com/snh" rel="nofollow">

        <br>
        <sub><b>Steven Honson</b></sub>
    </a>


    <a href="https://github.com/vsychov" rel="nofollow">

        <br>
        <sub><b>MichaelKo</b></sub>
    </a>


    <a href="https://github.com/ratsclub" rel="nofollow">

        <br>
        <sub><b>Victor Freire</b></sub>
    </a>


    <a href="https://github.com/qzydustin" rel="nofollow">

        <br>
        <sub><b>Zhenyu Qi</b></sub>
    </a>




    <a href="https://github.com/t56k" rel="nofollow">

        <br>
        <sub><b>thomas</b></sub>
    </a>


    <a href="https://github.com/linsomniac" rel="nofollow">

        <br>
        <sub><b>Sean Reifschneider</b></sub>
    </a>


    <a href="https://github.com/aberoham" rel="nofollow">

        <br>
        <sub><b>Abraham Ingersoll</b></sub>
    </a>


    <a href="https://github.com/iFargle" rel="nofollow">

        <br>
        <sub><b>Albert Copeland</b></sub>
    </a>


    <a href="https://github.com/puzpuzpuz" rel="nofollow">

        <br>
        <sub><b>Andrei Pechkurov</b></sub>
    </a>


    <a href="https://github.com/theryecatcher" rel="nofollow">

        <br>
        <sub><b>Anoop Sundaresh</b></sub>
    </a>




    <a href="https://github.com/apognu" rel="nofollow">

        <br>
        <sub><b>Antoine POPINEAU</b></sub>
    </a>


    <a href="https://github.com/tony1661" rel="nofollow">

        <br>
        <sub><b>Antonio Fernandez</b></sub>
    </a>


    <a href="https://github.com/aofei" rel="nofollow">

        <br>
        <sub><b>Aofei Sheng</b></sub>
    </a>


    <a href="https://github.com/arnarg" rel="nofollow">

        <br>
        <sub><b>Arnar</b></sub>
    </a>


    <a href="https://github.com/awoimbee" rel="nofollow">

        <br>
        <sub><b>Arthur Woimbée</b></sub>
    </a>


    <a href="https://github.com/avirut" rel="nofollow">

        <br>
        <sub><b>Avirut Mehta</b></sub>
    </a>




    <a href="https://github.com/stensonb" rel="nofollow">

        <br>
        <sub><b>Bryan Stenson</b></sub>
    </a>


    <a href="https://github.com/yangchuansheng" rel="nofollow">

        <br>
        <sub><b> Carson Yang</b></sub>
    </a>


    <a href="https://github.com/kundel" rel="nofollow">

        <br>
        <sub><b>Darrell Kundel</b></sub>
    </a>


    <a href="https://github.com/fatih-acar" rel="nofollow">

        <br>
        <sub><b>fatih-acar</b></sub>
    </a>


    <a href="https://github.com/fkr" rel="nofollow">

        <br>
        <sub><b>Felix Kronlage-Dammers</b></sub>
    </a>


    <a href="https://github.com/felixonmars" rel="nofollow">

        <br>
        <sub><b>Felix Yan</b></sub>
    </a>




    <a href="https://github.com/gabe565" rel="nofollow">

        <br>
        <sub><b>Gabe Cook</b></sub>
    </a>


    <a href="https://github.com/JJGadgets" rel="nofollow">

        <br>
        <sub><b>JJGadgets</b></sub>
    </a>


    <a href="https://github.com/hrtkpf" rel="nofollow">

        <br>
        <sub><b>hrtkpf</b></sub>
    </a>


    <a href="https://github.com/jimt" rel="nofollow">

        <br>
        <sub><b>Jim Tittsler</b></sub>
    </a>


    <a href="https://github.com/jsiebens" rel="nofollow">

        <br>
        <sub><b>Johan Siebens</b></sub>
    </a>


    <a href="https://github.com/johnae" rel="nofollow">

        <br>
        <sub><b>John Axel Eriksson</b></sub>
    </a>




    <a href="https://github.com/ShadowJonathan" rel="nofollow">

        <br>
        <sub><b>Jonathan de Jong</b></sub>
    </a>


    <a href="https://github.com/JulienFloris" rel="nofollow">

        <br>
        <sub><b>Julien Zweverink</b></sub>
    </a>


    <a href="https://github.com/win-t" rel="nofollow">

        <br>
        <sub><b>Kurnia D Win</b></sub>
    </a>


    <a href="https://github.com/Lucalux" rel="nofollow">

        <br>
        <sub><b>Lucalux</b></sub>
    </a>


    <a href="https://github.com/foxtrot" rel="nofollow">

        <br>
        <sub><b>Marc</b></sub>
    </a>


    <a href="https://github.com/mhameed" rel="nofollow">

        <br>
        <sub><b>Mesar Hameed</b></sub>
    </a>




    <a href="https://github.com/mikejsavage" rel="nofollow">

        <br>
        <sub><b>Michael Savage</b></sub>
    </a>


    <a href="https://github.com/pkrivanec" rel="nofollow">

        <br>
        <sub><b>Philipp Krivanec</b></sub>
    </a>


    <a href="https://github.com/piec" rel="nofollow">

        <br>
        <sub><b>Pierre Carru</b></sub>
    </a>


    <a href="https://github.com/donran" rel="nofollow">

        <br>
        <sub><b>Pontus N</b></sub>
    </a>


    <a href="https://github.com/nnsee" rel="nofollow">

        <br>
        <sub><b>Rasmus Moorats</b></sub>
    </a>


    <a href="https://github.com/rcursaru" rel="nofollow">

        <br>
        <sub><b>rcursaru</b></sub>
    </a>




    <a href="https://github.com/renovate-bot" rel="nofollow">

        <br>
        <sub><b>Mend Renovate</b></sub>
    </a>


    <a href="https://github.com/ryanfowler" rel="nofollow">

        <br>
        <sub><b>Ryan Fowler</b></sub>
    </a>


    <a href="https://github.com/muzy" rel="nofollow">

        <br>
        <sub><b>Sebastian Muszytowski</b></sub>
    </a>


    <a href="https://github.com/shaananc" rel="nofollow">

        <br>
        <sub><b>Shaanan Cohney</b></sub>
    </a>


    <a href="https://github.com/6ixfalls" rel="nofollow">

        <br>
        <sub><b>Six</b></sub>
    </a>


    <a href="https://github.com/stefanvanburen" rel="nofollow">

        <br>
        <sub><b>Stefan VanBuren</b></sub>
    </a>




    <a href="https://github.com/sophware" rel="nofollow">

        <br>
        <sub><b>sophware</b></sub>
    </a>


    <a href="https://github.com/m-tanner-dev0" rel="nofollow">

        <br>
        <sub><b>Tanner</b></sub>
    </a>


    <a href="https://github.com/Teteros" rel="nofollow">

        <br>
        <sub><b>Teteros</b></sub>
    </a>


    <a href="https://github.com/gitter-badger" rel="nofollow">

        <br>
        <sub><b>The Gitter Badger</b></sub>
    </a>


    <a href="https://github.com/tianon" rel="nofollow">

        <br>
        <sub><b>Tianon Gravi</b></sub>
    </a>


    <a href="https://github.com/thetillhoff" rel="nofollow">

        <br>
        <sub><b>Till Hoffmann</b></sub>
    </a>




    <a href="https://github.com/woudsma" rel="nofollow">

        <br>
        <sub><b>Tjerk Woudsma</b></sub>
    </a>


    <a href="https://github.com/y0ngb1n" rel="nofollow">

        <br>
        <sub><b>杨斌 Aben</b></sub>
    </a>


    <a href="https://github.com/sleepymole" rel="nofollow">

        <br>
        <sub><b>Yujie Xia</b></sub>
    </a>


    <a href="https://github.com/newellz2" rel="nofollow">

        <br>
        <sub><b>Zachary Newell</b></sub>
    </a>


    <a href="https://github.com/zekker6" rel="nofollow">

        <br>
        <sub><b>Zakhar Bessarab</b></sub>
    </a>


    <a href="https://github.com/zhzy0077" rel="nofollow">

        <br>
        <sub><b>Zhiyuan Zheng</b></sub>
    </a>




    <a href="https://github.com/Bpazy" rel="nofollow">

        <br>
        <sub><b>Ziyuan Han</b></sub>
    </a>


    <a href="https://github.com/caelansar" rel="nofollow">

        <br>
        <sub><b>caelansar</b></sub>
    </a>


    <a href="https://github.com/derelm" rel="nofollow">

        <br>
        <sub><b>derelm</b></sub>
    </a>


    <a href="https://github.com/dnaq" rel="nofollow">

        <br>
        <sub><b>dnaq</b></sub>
    </a>


    <a href="https://github.com/nning" rel="nofollow">

        <br>
        <sub><b>henning mueller</b></sub>
    </a>


    <a href="https://github.com/ignoramous" rel="nofollow">

        <br>
        <sub><b>ignoramous</b></sub>
    </a>




    <a href="https://github.com/jimyag" rel="nofollow">

        <br>
        <sub><b>jimyag</b></sub>
    </a>


    <a href="https://github.com/magichuihui" rel="nofollow">

        <br>
        <sub><b>suhelen</b></sub>
    </a>


    <a href="https://github.com/lion24" rel="nofollow">

        <br>
        <sub><b>sharkonet</b></sub>
    </a>


    <a href="https://github.com/ma6174" rel="nofollow">

        <br>
        <sub><b>ma6174</b></sub>
    </a>


    <a href="https://github.com/manju-rn" rel="nofollow">

        <br>
        <sub><b>manju-rn</b></sub>
    </a>


    <a href="https://github.com/nicholas-yap" rel="nofollow">

        <br>
        <sub><b>nicholas-yap</b></sub>
    </a>




    <a href="https://github.com/pernila" rel="nofollow">

        <br>
        <sub><b>Tommi Pernila</b></sub>
    </a>


    <a href="https://github.com/phpmalik" rel="nofollow">

        <br>
        <sub><b>phpmalik</b></sub>
    </a>


    <a href="https://github.com/Wakeful-Cloud" rel="nofollow">

        <br>
        <sub><b>Wakeful Cloud</b></sub>
    </a>


    <a href="https://github.com/xpzouying" rel="nofollow">

        <br>
        <sub><b>zy</b></sub>
    </a>


    <a href="https://github.com/atorregrosa-smd" rel="nofollow">

        <br>
        <sub><b>Àlex Torregrosa</b></sub>
    </a>
Alternative Projects

Subscribe to Open Source Businees Newsletter

Twice a month we will interview people behind open source businesses. We will talk about how they are building a business on top of open source projects.

We'll never share your email with anyone else.