Guide · Open source
How to use Nebula: install, certificates and run it
Updated · written with AI from the project's own documentation and checked against our catalogue data
Nebula is an open-source overlay networking tool that connects computers wherever they are into one private network, so they can reach each other as if on the same local network. This guide walks through installing it, creating a certificate authority, signing host certificates, configuring a lighthouse and starting Nebula on each machine. It is written for people comfortable editing config files and running a small cloud host.
Quick start
- 1Install the binaries. Install nebula and nebula-cert with a package manager or download them from the releases page.
- 2Create a certificate authority. Run nebula-cert ca to create ca.key and ca.cert. Store ca.key safely.
- 3Sign host certificates. Use nebula-cert sign with a name and IP for each node, adding groups where needed.
- 4Set up a lighthouse. Run a small cloud host with a routable IP, set am_lighthouse: true and open udp/4242.
- 5Configure each host. Edit config.yml so hosts know the lighthouse in static_host_map and the lighthouse hosts section.
- 6Copy files to each host. Copy the binary, config.yml, ca.crt and the host's certificate and key. Never copy ca.key.
- 7Run Nebula. Start each host with nebula -config pointing at its config file.
What Nebula does and who it suits
Nebula uses certificates and encryption to authenticate each machine, and lets you write firewall rules based on named groups. The README says it runs on Linux, OSX, Windows, iOS and Android, and can connect a few computers or tens of thousands.
It suits teams connecting servers across several clouds or data centers, and people who want a private network between their own machines without a fixed address plan. It is not a plug-and-play VPN: the setup involves creating a certificate authority, signing certificates and editing configuration files.
- Good fit: group-based firewall rules similar to cloud security groups
- Good fit: hosts in multiple cloud providers, data centers and endpoints
- Not a fit: a consumer 'hide my browsing' VPN, since Nebula is framed as a network overlay for connecting hosts
Install Nebula on your platform
The simplest route is a distribution package. The README lists packages for Arch Linux, Fedora, Debian, Alpine, macOS Homebrew and Docker. You can also download binaries from the releases page. Building from source requires Go.
- Arch Linux: sudo pacman -S nebula
- Fedora: sudo dnf install nebula
- Debian: sudo apt install nebula
- Alpine: sudo apk add nebula
- macOS: brew install nebula
- Docker: docker pull nebulaoss/nebula
sudo apt install nebulaCreate a certificate authority
Nebula uses certificates to assert a node's IP address, name and group membership. The certificate authority is the root of trust for your network. Running the command below creates ca.key and ca.cert in the current directory.
The ca.key file is the most sensitive file you will create, because it signs the certificates for every node. Store it somewhere safe, preferably with strong encryption. By default a CA has a 1-year lifetime, so the README points to a guide on rotating it.
./nebula-cert ca -name "Myorganization, Inc"Sign certificates for each host
Each node needs its own key and certificate signed by your CA. The README example uses a 192.168.100.x/24 range and shows how to assign groups, which you can later use in firewall rules. You can name nodes any way you like, including FQDN.
Host certificates expire one second before the CA by default. Use the -duration flag to set a shorter lifetime.
- lighthouse1 at 192.168.100.1/24
- laptop at 192.168.100.2/24 with groups laptop, home, ssh
- server1 at 192.168.100.9/24 with group servers
- host3 at 192.168.100.10/24
./nebula-cert sign -name "lighthouse1" -ip "192.168.100.1/24"
./nebula-cert sign -name "laptop" -ip "192.168.100.2/24" -groups "laptop,home,ssh"
./nebula-cert sign -name "server1" -ip "192.168.100.9/24" -groups "servers"
./nebula-cert sign -name "host3" -ip "192.168.100.10/24"Set up the lighthouse and config files
A lighthouse is a discovery node with a routable IP address that lets nodes find each other. The README says it is the only node whose IP should not change, and that it needs very few resources, so a small cloud host works. Make sure Nebula UDP traffic (default port udp/4242) can reach it over the internet.
Download the example configuration file, config.yml. On the lighthouse set am_lighthouse: true. On other hosts, define the lighthouse in the static_host_map section and add it to the lighthouse hosts section.
- Set am_lighthouse: true on the lighthouse node
- Define the lighthouse in static_host_map on each host
- Add the lighthouse to the hosts section on each host
- Open udp/4242 or your chosen port
Copy files to each host and start Nebula
For each host, copy the nebula binary, config.yml, ca.crt, the host's .crt file and its .key file. Never copy ca.key to individual nodes.
Start Nebula on each host by pointing it at the config file.
- Copy: nebula binary, config.yml, ca.crt, {host}.crt, {host}.key
- Do not copy ca.key to any node
./nebula -config /path/to/config.ymlBuild Nebula from source (optional)
If you want to build it yourself, install Go, clone the repository and change into the nebula directory. The README lists make all for every platform and make bin-windows for a specific one. See the Makefile for more targets.
For compliance needs, the README covers a P256 curve option when creating a CA and FIPS 140-3 build targets. The default curve is Curve25519, which the README recommends for most users.
make allWhat people use it for
- Connecting servers across several cloud providers into one private network
- Giving a laptop, home machine and servers private addresses without a fixed address plan
- Writing group-based firewall rules, such as allowing only the servers group to reach a service
- Connecting hosts in multiple data centers or endpoints with a consistent addressing scheme
Frequently asked questions
Is Nebula free to use?
Nebula is released under the MIT licence, and the source is on GitHub. The README also mentions a paid managed service from Defined Networking, which handles the certificate authority and lighthouses for you.
What do I need to run Nebula?
You need the nebula and nebula-cert binaries for each platform, at least one lighthouse with a routable IP address, and a certificate authority you create yourself. Go is only needed if you build from source.
How do I install Nebula on Debian or macOS?
On Debian run sudo apt install nebula. On macOS with Homebrew run brew install nebula. You can also pull the Docker image with docker pull nebulaoss/nebula.
Why is my Nebula node not connecting?
Check that the lighthouse has a routable IP and that Nebula UDP traffic on port udp/4242 can reach it. Also confirm the lighthouse is defined in static_host_map and the lighthouse hosts section of each config.
Is Nebula a good alternative to WireGuard or Tailscale?
Nebula is a mesh overlay built around certificates and group-based firewall rules. WireGuard is a simpler tunnel protocol, and Tailscale and ZeroTier offer managed coordination. Headscale is a self-hosted control server for Tailscale. Pick based on whether you want to run your own certificate authority.
Can I use Nebula as a consumer VPN to hide my browsing?
No. The README frames Nebula as a network overlay for connecting hosts, not a consumer privacy VPN.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Nebula suits teams and operators who run servers across several clouds or data centers and are comfortable managing certificates and a small lighthouse host. If you want a plug-and-play VPN with no setup, or do not want to run your own certificate authority, pick a managed option or a simpler tool such as WireGuard or Tailscale.
Install options & downloads