Skip to content

Commit

Permalink
Update Quickstart Guide
Browse files Browse the repository at this point in the history
  • Loading branch information
braginini committed Aug 18, 2024
1 parent c30d01d commit 028dbac
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 34 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/docs-static/img/getting-started/add-peer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/docs-static/img/getting-started/device-confirmation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/docs-static/img/getting-started/peers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 67 additions & 34 deletions src/pages/how-to/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,75 +7,103 @@ export const title = 'Getting Started'
<div className="videowrapper">
<iframe src="https://www.youtube.com/embed/JRCZy4rLi-c" allow="fullscreen;"></iframe>
</div>
<br/>

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.

One machine is a Linux laptop, and the other one a EC2 node running on AWS.
Both machines are running Linux but NetBird also works on Windows, MacOS nad popular mobile platforms like Android and iOS.
## Install NetBird

## Create a NetBird Account
Sign-up at [app.netbird.io](https://app.netbird.io/)
You can use your Google, GitHub or Microsoft account.
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/auth.png" alt="login-to-netbird" className="imagewrapper-big"/>
<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>

## Install NetBird
## 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>

After a successful login you will be redirected to the ```Peers``` screen which is empty because you don't have any peers yet.
<Note>
Alternatively, you can run the `netbird up` command in the terminal.
</Note>

The `Add peer` window should automatically pop up, but if it doesn't, click ```Add new peer``` to add a new machine.
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/empty-peers.png" alt="login-to-netbird" className="imagewrapper-big"/>
<img src="/docs-static/img/getting-started/device-confirmation.png" alt="login-to-netbird" className="imagewrapper-big"/>
</p>

Choose your machine operating system (in our case it is ```Linux```) and proceed with the installation steps.
The NetBird systray icon will turn orange indicating that your laptop was registered in the network:

<p>
<img src="/docs-static/img/getting-started/add-peer.png" alt="login-to-netbird" className="imagewrapper"/>
<img src="/docs-static/img/getting-started/systray-connected.png" alt="login-to-netbird" className="imagewrapper"/>
</p>

## Connect your Laptop
## Confirm the Laptop Registration

If you installed NetBird Desktop UI you can use it to connect to the network instead of running `netbird up` command.
Look for `NetBird` in your application list, run it, and click `Connect`.
>
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/systray.png" alt="login-to-netbird" className="imagewrapper-big"/>
<img src="/docs-static/img/getting-started/dashboard.png" alt="login-to-netbird" className="imagewrapper-big"/>

</p>

At this point a browser window pops up starting a device registration process. Click confirm and follow the steps if required.
## 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/device-confirmation.png" alt="login-to-netbird" className="imagewrapper-big"/>
<img src="/docs-static/img/getting-started/add-linux-peer.png" alt="login-to-netbird" className="imagewrapper"/>
</p>

## Connect Your EC2 Node

On the EC2 node repeat the installation steps and run `netbird up` command.
Copy the installation script and paste in the terminal of your EC2 node:

```bash
sudo netbird up
```
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.

Copy the verification URL from the terminal output and paste it in your browser. Repeat step #5
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/netbird-up.png" alt="login-to-netbird" className="imagewrapper-big"/>
<img src="/docs-static/img/getting-started/setup-key.png" alt="login-to-netbird" className="imagewrapper"/>
</p>

## Validate Connection
<p>
<img src="/docs-static/img/getting-started/setup-key-created.png" alt="login-to-netbird" className="imagewrapper"/>
</p>

Return to ```Peers``` and you should notice 2 new machines with status ```online```
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 you could try pinging devices:
To test the connection ping the machines from each other:

On your laptop:
```bash
Expand All @@ -84,13 +112,18 @@ ping ec2-demo-node.netbird.cloud

On the EC2 node:
```bash
ping my-linux-laptop.netbird.cloud
ping mikhails-macbook-pro.netbird.cloud
```
Done! You now have a secure peer-to-peer private network configured.
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.


<br/>
## Support Us

- Make sure to [star us on GitHub](https://github.com/netbirdio/netbird)
- 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-2p5zwhm4g-8fHollzrQa5y4PZF5AEpvQ)
- NetBird release page on GitHub: [releases](https://github.com/netbirdio/netbird/releases/latest)

0 comments on commit 028dbac

Please sign in to comment.