Netbird: Difference between revisions

mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
=== Basic Client Setup ===
=== Basic Client Setup ===


To set up a Netbird client (peer), add the following to your NixOS module:
To set up a Netbird client (peer), you will need to first create a setup key as described in the [https://docs.netbird.io/manage/peers/register-machines-using-setup-keys Netbird setup key documentation].
 
Then, add the following to your NixOS module and rebuild your system:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 12: Line 14:


     # Automatically login to your Netbird network with a setup key
     # Automatically login to your Netbird network with a setup key
    # This is mostly useful for server computers.
    # For manual setup instructions, see the wiki page section below.
     login = {
     login = {
       enable = true;
       enable = true;
Line 19: Line 23:
       setupKeyFile = "/path/to/your/setup-key";
       setupKeyFile = "/path/to/your/setup-key";
     };
     };
    # Port used to listen to wireguard connections
    port = 51821;


     # Set this to true if you want the GUI client
     # Set this to true if you want the GUI client
Line 34: Line 41:
The above configuration will create a command called <code>netbird-wt0</code> available on PATH.
The above configuration will create a command called <code>netbird-wt0</code> available on PATH.


You can confirm the peer's connection using the command: <code>netbird-wt0 status</code>
If you did not enable the <code>login</code> configuration above, you will need to manually login using the command: <code>netbird-wt0 login</code>
 


Once logged in, you can confirm the peer's connection using the command: <code>netbird-wt0 status</code>
=== Routing Peer Setup ===
=== Routing Peer Setup ===


Line 55: Line 62:
==== DNS Resolution ====
==== DNS Resolution ====


To get [https://docs.netbird.io/manage/dns#client-side-how-peers-resolve-dns Netbird's client-side DNS resolution] to work, you must use systemd-resolved for your system's DNS by adding:
To get [https://docs.netbird.io/manage/dns#client-side-how-peers-resolve-dns Netbird's client-side DNS resolution] to work, you must use [[Systemd/resolved|systemd-resolved]] for your system's DNS by adding:
<syntaxhighlight>
<syntaxhighlight>
services.resolved.enable = true;
services.resolved.enable = true;
</syntaxhighlight>
</syntaxhighlight>
== Troubleshooting ==
== Troubleshooting ==


Line 67: Line 72:


[[Category:Applications]]
[[Category:Applications]]
[[Category:Networking]]
[[Category:Server]]