From cc774de04c919e82fdcb6dea955d831c24625a73 Mon Sep 17 00:00:00 2001 From: Misha Bragin Date: Fri, 4 Aug 2023 11:05:21 +0200 Subject: [PATCH] Extract quickstart self-hosting t oa separate page (#77) --- src/components/NavigationDocs.jsx | 3 +- src/pages/selfhosted/selfhosted-guide.mdx | 63 +++---------------- .../selfhosted/selfhosted-quickstart.mdx | 60 ++++++++++++++++++ 3 files changed, 69 insertions(+), 57 deletions(-) create mode 100644 src/pages/selfhosted/selfhosted-quickstart.mdx diff --git a/src/components/NavigationDocs.jsx b/src/components/NavigationDocs.jsx index 4f134785..4d6c2370 100644 --- a/src/components/NavigationDocs.jsx +++ b/src/components/NavigationDocs.jsx @@ -36,7 +36,8 @@ export const docsNavigation = [ { title: 'Self-hosting NetBird', links: [ - { title: 'Installation guide', href: '/selfhosted/selfhosted-guide' }, + { title: 'Quickstart guide', href: '/selfhosted/selfhosted-quickstart' }, + { title: 'Advanced guide', href: '/selfhosted/selfhosted-guide' }, { title: 'Supported IdPs', href: '/selfhosted/identity-providers' }, ], }, diff --git a/src/pages/selfhosted/selfhosted-guide.mdx b/src/pages/selfhosted/selfhosted-guide.mdx index 8163d7b5..cb1cf354 100644 --- a/src/pages/selfhosted/selfhosted-guide.mdx +++ b/src/pages/selfhosted/selfhosted-guide.mdx @@ -1,68 +1,19 @@ - -# Self-hosting Guide +## Advanced self-hosting guide with a custom identity provider NetBird is open-source and can be self-hosted on your servers. It relies on components developed by NetBird Authors [Management Service](https://github.com/netbirdio/netbird/tree/main/management), [Management UI Dashboard](https://github.com/netbirdio/dashboard), [Signal Service](https://github.com/netbirdio/netbird/tree/main/signal), -a 3rd party open-source STUN/TURN service [Coturn](https://github.com/coturn/coturn), and an identity provider (available options will be listed later in this guide). +a 3rd party open-source STUN/TURN service [Coturn](https://github.com/coturn/coturn), and an identity provider (IDP). -If you would like to learn more about the architecture please refer to the [Architecture section](/about-netbird/how-netbird-works). +If you would like to learn more about the architecture please refer to the [architecture section](/about-netbird/how-netbird-works). - It might be a good idea to try NetBird before self-hosting. - We run NetBird in the cloud, and it will take less than 5 minutes to get started with our managed version. [Check it out!](https://netbird.io/pricing) + It might be a good idea to try NetBird before self-hosting on your servers. + We run NetBird in the cloud, and it will take a few clicks to get started with our managed version. [Check it out!](https://netbird.io/pricing) - -## Getting started with NetBird and Zitadel -In this guide, we will guide you through deploying NetBird with [Zitadel](https://zitadel.com/) -as the identity provider for user management using a getting started setup script and docker containers. - - - This is the quickest way to try self-hosted NetBird. It should take around 5 minutes to get started if you already have a public domain and a VM. - Follow the [Advanced guide with a custom identity provider](#advanced-guide-with-a-custom-identity-provider) for installations with different IDPs. - - -### Requirements - -**Infrastructure requirements:** -- A Linux VM with at least **1CPU** and **2GB** of memory. -- The VM should be publicly accessible on TCP ports **80** and **443** and UDP ports: **3478**, **49152-65535**. -- **Public domain** name pointing to the VM. - -**Software requirements:** -- Docker installed on the VM with the docker compose plugin ([Docker installation guide](https://docs.docker.com/engine/install/)) or docker with docker-compose in version 2 or higher. -- [jq](https://jqlang.github.io/jq/) installed. In most distributions -Usually available in the official repositories and can be installed with `sudo apt install jq` or `sudo yum install jq` -- [curl](https://curl.se/) installed. -Usually available in the official repositories and can be installed with `sudo apt install curl` or `sudo yum install curl` - -### Download and run the script - -Download and run the installation script in a single line: -```bash -export NETBIRD_DOMAIN=netbird.example.com; curl -fsSL https://github.com/netbirdio/netbird/releases/latest/download/getting-started-with-zitadel.sh | bash -``` -If you want to check the script before running it, you can download it and run it locally: -```bash -curl -sSLO https://github.com/netbirdio/netbird/releases/latest/download/getting-started-with-zitadel.sh -# check the script -cat getting-started-with-zitadel.sh -# run the script -export NETBIRD_DOMAIN=netbird.example.com -bash getting-started-with-zitadel.sh -``` - - Replace `netbird.example.com` with your domain name. - -Once the script execution is complete, you can access your netbird instance via the URL `https://netbird.example.com` using the credentials displayed in your terminal. - -### Creating users -If you want to add additional users, you can access Zitadel's management console via the URL `https://netbird.example.com/ui/console` with the same credentials. Follow the [Users guide](https://zitadel.com/docs/guides/manage/console/users) -from Zitadel to add additional local users or integrate Zitadel with your existing identity provider by following the guide [Configure identity providers](https://zitadel.com/docs/guides/integrate/identity-providers). - -## Advanced guide with a custom identity provider -This guide will walk you through deploying NetBird with a custom identity provider for user management. +If you are looking for a quick way of trying self-hosted NetBird, please refer to [this guide](/about-netbird/how-netbird-works). Otherwise, continue here to set up +NetBird with custom IdPs. ### Requirements diff --git a/src/pages/selfhosted/selfhosted-quickstart.mdx b/src/pages/selfhosted/selfhosted-quickstart.mdx new file mode 100644 index 00000000..ed46c561 --- /dev/null +++ b/src/pages/selfhosted/selfhosted-quickstart.mdx @@ -0,0 +1,60 @@ +# Self-hosting quickstart guide (5 min) + +NetBird is open-source and can be self-hosted on your servers. + +It relies on components developed by NetBird Authors [Management Service](https://github.com/netbirdio/netbird/tree/main/management), [Management UI Dashboard](https://github.com/netbirdio/dashboard), [Signal Service](https://github.com/netbirdio/netbird/tree/main/signal), +a 3rd party open-source STUN/TURN service [Coturn](https://github.com/coturn/coturn), and an identity provider (available options will be listed later in this guide). + +If you would like to learn more about the architecture please refer to the [Architecture section](/about-netbird/how-netbird-works). + + + It might be a good idea to try NetBird before self-hosting on your servers. + We run NetBird in the cloud, and it will take a few clicks to get started with our managed version. [Check it out!](https://netbird.io/pricing) + + +## Quick self-hosting with Zitadel IdP +In this guide, we will guide you through deploying NetBird with [Zitadel](https://zitadel.com/) +as the identity provider for user management using a single-line setup script and docker containers. + + + This is the quickest way to try self-hosted NetBird. It should take around 5 minutes to get started if you already have a public domain and a VM. + Follow the [Advanced guide with a custom identity provider](#advanced-guide-with-a-custom-identity-provider) for installations with different IDPs. + + +### Requirements + +**Infrastructure requirements:** +- A Linux VM with at least **1CPU** and **2GB** of memory. +- The VM should be publicly accessible on TCP ports **80** and **443** and UDP ports: **3478**, **49152-65535**. +- **Public domain** name pointing to the VM. + +**Software requirements:** +- Docker installed on the VM with the docker compose plugin ([Docker installation guide](https://docs.docker.com/engine/install/)) or docker with docker-compose in version 2 or higher. +- [jq](https://jqlang.github.io/jq/) installed. In most distributions +Usually available in the official repositories and can be installed with `sudo apt install jq` or `sudo yum install jq` +- [curl](https://curl.se/) installed. +Usually available in the official repositories and can be installed with `sudo apt install curl` or `sudo yum install curl` + +### Download and run the script + +Download and run the installation script in a single line: +```bash +export NETBIRD_DOMAIN=netbird.example.com; curl -fsSL https://github.com/netbirdio/netbird/releases/latest/download/getting-started-with-zitadel.sh | bash +``` +If you want to check the script before running it, you can download it and run it locally: +```bash +curl -sSLO https://github.com/netbirdio/netbird/releases/latest/download/getting-started-with-zitadel.sh +# check the script +cat getting-started-with-zitadel.sh +# run the script +export NETBIRD_DOMAIN=netbird.example.com +bash getting-started-with-zitadel.sh +``` + + Replace `netbird.example.com` with your domain name. + +Once the script execution is complete, you can access your netbird instance via the URL `https://netbird.example.com` using the credentials displayed in your terminal. + +### Creating users +If you want to add additional users, you can access Zitadel's management console via the URL `https://netbird.example.com/ui/console` with the same credentials. Follow the [Users guide](https://zitadel.com/docs/guides/manage/console/users) +from Zitadel to add additional local users or integrate Zitadel with your existing identity provider by following the guide [Configure identity providers](https://zitadel.com/docs/guides/integrate/identity-providers). \ No newline at end of file