Files
netbird-docs/src/pages/how-to/getting-started.mdx
Maycon Santos a19076b13a Update slack invite link (#253)
* Update slack invite link

* fix spelling
2024-11-22 18:33:47 +01:00

130 lines
4.5 KiB
Plaintext

import {Note} from "@/components/mdx";
export const title = 'Getting Started'
## Quickstart Guide
<div className="videowrapper">
<iframe src="https://www.youtube.com/embed/JRCZy4rLi-c" allow="fullscreen;"></iframe>
</div>
This guide describes how to quickly get started with NetBird and create a secure private network with two connected machines.
For this tutorial we will use a Macbook and an EC2 node running Linux on AWS.
## Install NetBird
NetBird works on almost any platform including Windows, macOS, Linux, iOS, Android, Docker, routers, and even serverless environments.
To get started, install NetBird on your laptop by following the instructions on the [installation page](https://app.netbird.io/install):
<p>
<img src="/docs-static/img/getting-started/add-peer.png" alt="login-to-netbird" className="imagewrapper"/>
</p>
<p>
<img src="/docs-static/img/getting-started/mac-installation.png" alt="login-to-netbird" className="imagewrapper"/>
</p>
## Connect Your Laptop
NetBird comes with a Desktop UI application that can be found in the systray. If it hasn't automatically started, look
for `NetBird` in the application list, run it, and click `Connect`:
<p>
<img src="/docs-static/img/getting-started/systray.png" alt="login-to-netbird" className="imagewrapper"/>
</p>
<Note>
Alternatively, you can run the `netbird up` command in the terminal.
</Note>
At this point a browser window pops up starting an interactive SSO login session that will register your laptop.
You will be prompt to sign up and confirm your device registration:
<p>
<img src="/docs-static/img/getting-started/device-confirmation.png" alt="login-to-netbird" className="imagewrapper-big"/>
</p>
The NetBird systray icon will turn orange indicating that your laptop was registered in the network:
<p>
<img src="/docs-static/img/getting-started/systray-connected.png" alt="login-to-netbird" className="imagewrapper"/>
</p>
## Confirm the Laptop Registration
After the registration is complete, proceed to the [NetBird dashboard](https://app.netbid.io) to confirm that your
laptop is in the network. You will see it in the `Peers` view:
<p>
<img src="/docs-static/img/getting-started/dashboard.png" alt="login-to-netbird" className="imagewrapper-big"/>
</p>
## Install NetBird on the EC2 Node
Let's install NetBird on the server. In the `Peers` view, click `Add Peer` and choose Linux:
<p>
<img src="/docs-static/img/getting-started/add-linux-peer.png" alt="login-to-netbird" className="imagewrapper"/>
</p>
Copy the installation script and paste in the terminal of your EC2 node:
```bash
curl -fsSL https://pkgs.netbird.io/install.sh | sh
```
## Connect the EC2 Node
In the previous steps you used the interactive SSO login flow to register a user device. This flow is a convenient way to
register devices with a user interface. However, for servers or containers that don't have a user interface,
you can use a [setup key](/how-to/register-machines-using-setup-keys) to register them.
To create a setup key, go to the `Setup Keys` section, click `Create Setup Key`, name your key, and click `Create`:
<p>
<img src="/docs-static/img/getting-started/setup-key.png" alt="login-to-netbird" className="imagewrapper"/>
</p>
<p>
<img src="/docs-static/img/getting-started/setup-key-created.png" alt="login-to-netbird" className="imagewrapper"/>
</p>
Copy the newly created setup key and use it with the `netbird up --setup-key <KEY>` command to connect your EC2 node to the network.
Run this command in the terminal of your EC2 node:
```bash
netbird up --setup-key PASTE_YOUR_KEY_HERE
```
## Validate the Connection
Return to the `Peers` view in the NetBird dashboard. You should see two machines in the list:
<p>
<img src="/docs-static/img/getting-started/peers.png" alt="login-to-netbird" className="imagewrapper-big"/>
</p>
To test the connection ping the machines from each other:
On your laptop:
```bash
ping ec2-demo-node.netbird.cloud
```
On the EC2 node:
```bash
ping mikhails-macbook-pro.netbird.cloud
```
Done! You now have a secure peer-to-peer WireGuard connection between two machines.
## Next Steps
Try creating a [network access policy](/how-to/manage-network-access) to control the traffic between the two machines.
## Support Us
- Star us on [GitHub](https://github.com/netbirdio/netbird)
- Follow us [on Twitter](https://twitter.com/netbird)
- Join our [Slack Channel](https://join.slack.com/t/netbirdio/shared_invite/zt-2utg2ncdz-W7LEB6toRBLE1Jca37dYpg)
- NetBird release page on GitHub: [releases](https://github.com/netbirdio/netbird/releases/latest)