REAL Self-Hosted Remote Access for YOUR Home Server
Read full transcript 24 segments
-
Hello everybody in this video. What I'm Hello everybody in this video. What I'm going to be doing is showing you how to going to be doing is showing you how to going to be doing is showing you how to connect your home lab, your home server connect your home lab, your home server connect your home lab, your home server from anywhere in the world. And not only from anywhere in the world. And not only from anywhere in the world. And not only that, I'm going to show you how to that, I'm going to show you how to that, I'm going to show you how to securely expose services to the public securely expose services to the public securely expose services to the public internet without needing to open up a internet without needing to open up a internet without needing to open up a single port in your home lab. Beautiful single port in your home lab. Beautiful single port in your home lab. Beautiful thing, all this is self-hostable and thing, all this is self-hostable and thing, all this is self-hostable and open source with NetBird. Major bias open source with NetBird. Major bias open source with NetBird. Major bias disclosure here, I work for NetBird, but disclosure here, I work for NetBird, but disclosure here, I work for NetBird, but by golly, it is a great project, by golly, it is a great project, by golly, it is a great project, completely open source like I said, completely open source like I said, completely open source like I said, self-hostable. You can kind of look at self-hostable. You can kind of look at self-hostable. You can kind of look at it as a alternative to something like it as a alternative to something like it as a alternative to something like Tailscale or even now Penguin, all in a Tailscale or even now Penguin, all in a Tailscale or even now Penguin, all in a nice beautiful single package. Now, I nice beautiful single package. Now, I nice beautiful single package. Now, I will note, we are going to be hosting will note, we are going to be hosting will note, we are going to be hosting the NetBird services on a VPS. So, that the NetBird services on a VPS. So, that the NetBird services on a VPS. So, that is because there are a few ports that is because there are a few ports that is because there are a few ports that are required to be open. You can see are required to be open. You can see are required to be open. You can see them right here, 80, 443, and 3478. And them right here, 80, 443, and 3478. And them right here, 80, 443, and 3478. And I'm doing this on a VPS cuz I don't want I'm doing this on a VPS cuz I don't want I'm doing this on a VPS cuz I don't want to open those ports in my home server. to open those ports in my home server. to open those ports in my home server. And with NetBird, the NetBird client, I And with NetBird, the NetBird client, I And with NetBird, the NetBird client, I can install a couple clients in my home can install a couple clients in my home can install a couple clients in my home network, connect to the management network, connect to the management network, connect to the management dashboard in the VPS, and that will dashboard in the VPS, and that will dashboard in the VPS, and that will establish a secure peer-to-peer establish a secure peer-to-peer establish a secure peer-to-peer connection with WireGuard in the connection with WireGuard in the connection with WireGuard in the backend. In turn, if you're somebody who backend. In turn, if you're somebody who backend. In turn, if you're somebody who uses, I could actually go to it right uses, I could actually go to it right uses, I could actually go to it right here, this feature right here on here, this feature right here on here, this feature right here on Cloudflare, this will kind of act as Cloudflare, this will kind of act as Cloudflare, this will kind of act as that because you are filtering all this that because you are filtering all this that because you are filtering all this traffic through your own VPS. So, traffic through your own VPS. So, traffic through your own VPS. So, instead of exposing your actual home's instead of exposing your actual home's instead of exposing your actual home's IP address for these services, you're IP address for these services, you're IP address for these services, you're exposing your VPS IP address, not nearly exposing your VPS IP address, not nearly exposing your VPS IP address, not nearly as big of a deal. And since we're as big of a deal. And since we're as big of a deal. And since we're self-hosting it, there's not going to be
-
self-hosting it, there's not going to be self-hosting it, there's not going to be those restrictions of the data transfer, those restrictions of the data transfer, those restrictions of the data transfer, running video streams, and all that that running video streams, and all that that running video streams, and all that that we see with the Cloudflare proxied we see with the Cloudflare proxied we see with the Cloudflare proxied service. Overall, we can replace quite a service. Overall, we can replace quite a service. Overall, we can replace quite a few things with NetBird, and it's few things with NetBird, and it's few things with NetBird, and it's relatively easy to do. We're going to be relatively easy to do. We're going to be relatively easy to do. We're going to be covering absolutely everything in this covering absolutely everything in this covering absolutely everything in this video, from actually installing it, video, from actually installing it, video, from actually installing it, getting it running. We're going to getting it running. We're going to getting it running. We're going to create a new Docker Compose stack with a create a new Docker Compose stack with a create a new Docker Compose stack with a IDP. So, while NetBird does have the IDP. So, while NetBird does have the IDP. So, while NetBird does have the ability to use local users, just ability to use local users, just ability to use local users, just username password, we're going to use a username password, we're going to use a username password, we're going to use a Pocket ID so we can use some passkeys. Pocket ID so we can use some passkeys. Pocket ID so we can use some passkeys. If you already have an IDP of If you already have an IDP of If you already have an IDP of preference, so if we go over here to preference, so if we go over here to preference, so if we go over here to NetBird self-hosted under NetBird self-hosted under NetBird self-hosted under authentication, you can see we support authentication, you can see we support authentication, you can see we support quite a few of them including like quite a few of them including like quite a few of them including like Google Workspace and stuff. So if you Google Workspace and stuff. So if you Google Workspace and stuff. So if you don't even want to use one of these don't even want to use one of these don't even want to use one of these self-hosted ones, you can use a managed self-hosted ones, you can use a managed self-hosted ones, you can use a managed one if you prefer. We're going to be one if you prefer. We're going to be one if you prefer. We're going to be throwing the NetBird client as a sidecar throwing the NetBird client as a sidecar throwing the NetBird client as a sidecar within a Docker Compose, expose that within a Docker Compose, expose that within a Docker Compose, expose that Docker network, and then use that to Docker network, and then use that to Docker network, and then use that to actually proxy our authentication client actually proxy our authentication client actually proxy our authentication client to the public internet. We're going to to the public internet. We're going to to the public internet. We're going to spin up something locally, so then we spin up something locally, so then we spin up something locally, so then we can remote access anything in our home can remote access anything in our home can remote access anything in our home lab with either having the NetBird lab with either having the NetBird lab with either having the NetBird client or having the option to expose it client or having the option to expose it client or having the option to expose it externally via the built-in proxy externally via the built-in proxy externally via the built-in proxy functionality. So you may be asking, functionality. So you may be asking, functionality. So you may be asking, what have I done so far? I've done a what have I done so far? I've done a what have I done so far? I've done a couple things. Uh we got this VPS that couple things. Uh we got this VPS that couple things. Uh we got this VPS that I'm going to be using this with. This is I'm going to be using this with. This is I'm going to be using this with. This is Hostinger. They've sponsored videos in Hostinger. They've sponsored videos in Hostinger. They've sponsored videos in the past, but they are not sponsoring the past, but they are not sponsoring the past, but they are not sponsoring this video. I do have uh my actual this video. I do have uh my actual this video. I do have uh my actual NetBird instance running on a Hetzner NetBird instance running on a Hetzner NetBird instance running on a Hetzner VPS primarily. And I recommend, if VPS primarily. And I recommend, if VPS primarily. And I recommend, if you're going to pick a VPS to run you're going to pick a VPS to run you're going to pick a VPS to run NetBird on, one, make sure it has some NetBird on, one, make sure it has some NetBird on, one, make sure it has some okay specifications, and two, location
-
okay specifications, and two, location okay specifications, and two, location is key. You want the lowest latency for is key. You want the lowest latency for is key. You want the lowest latency for this stuff. The service I spun up this stuff. The service I spun up this stuff. The service I spun up already has Docker, but over here on the already has Docker, but over here on the already has Docker, but over here on the guide that I wrote for this, we do have guide that I wrote for this, we do have guide that I wrote for this, we do have all the prerequisites and a little thing all the prerequisites and a little thing all the prerequisites and a little thing right here showing you how to install right here showing you how to install right here showing you how to install Docker. Additionally, I've set up my A Docker. Additionally, I've set up my A Docker. Additionally, I've set up my A record and CNAME. You're going to need a record and CNAME. You're going to need a record and CNAME. You're going to need a A record pointing to the IP address of A record pointing to the IP address of A record pointing to the IP address of your VPS. You could see here, I'm just your VPS. You could see here, I'm just your VPS. You could see here, I'm just using this domain for the demo, and I using this domain for the demo, and I using this domain for the demo, and I have the A record right here with the have the A record right here with the have the A record right here with the subdomain netbird. You can use the root subdomain netbird. You can use the root subdomain netbird. You can use the root domain if you want to, but I'm using it domain if you want to, but I'm using it domain if you want to, but I'm using it for something else at the moment. And for something else at the moment. And for something else at the moment. And additionally, we're going to need a additionally, we're going to need a additionally, we're going to need a CNAME record for our proxy service. CNAME record for our proxy service. CNAME record for our proxy service. You're going to need a wildcard pointing You're going to need a wildcard pointing You're going to need a wildcard pointing either at just the wildcard for the either at just the wildcard for the either at just the wildcard for the name, or like this with a subdomain if name, or like this with a subdomain if name, or like this with a subdomain if you're doing it that way. And for the you're doing it that way. And for the you're doing it that way. And for the contents, you're going to want to point contents, you're going to want to point contents, you're going to want to point it at the full domain for your NetBird it at the full domain for your NetBird it at the full domain for your NetBird management panel, which in this case is management panel, which in this case is management panel, which in this case is netbird.mydomain.com. netbird.mydomain.com. netbird.mydomain.com. And again, more information is right And again, more information is right And again, more information is right here. And then finally, I'm going to log here. And then finally, I'm going to log here. And then finally, I'm going to log in to my server with a simple SSH. And in to my server with a simple SSH. And in to my server with a simple SSH. And once we sign in, update everything, just once we sign in, update everything, just once we sign in, update everything, just like that. And now while it updates, like that. And now while it updates, like that. And now while it updates, what I'm going to do is tell you about a what I'm going to do is tell you about a what I'm going to do is tell you about a service that I absolutely love that I've service that I absolutely love that I've service that I absolutely love that I've been using quite a bit to learn a lot, been using quite a bit to learn a lot, been using quite a bit to learn a lot, and that is boot.dev, the sponsor of and that is boot.dev, the sponsor of and that is boot.dev, the sponsor of today's video. So, I talk a lot about today's video. So, I talk a lot about today's video. So, I talk a lot about self-hosting, Linux infrastructure, all self-hosting, Linux infrastructure, all self-hosting, Linux infrastructure, all that stuff. But if you've ever wanted to that stuff. But if you've ever wanted to that stuff. But if you've ever wanted to go deeper and actually learn how to code go deeper and actually learn how to code go deeper and actually learn how to code properly, boot.dev is a really solid way properly, boot.dev is a really solid way properly, boot.dev is a really solid way to go about it. Boot.dev is a hands-on to go about it. Boot.dev is a hands-on to go about it. Boot.dev is a hands-on platform for learning back-end platform for learning back-end platform for learning back-end development. We're talking Python, SQL,
-
development. We're talking Python, SQL, development. We're talking Python, SQL, Go, TypeScript, all the languages that Go, TypeScript, all the languages that Go, TypeScript, all the languages that you need to actually get hired. And the you need to actually get hired. And the you need to actually get hired. And the way they teach it is pretty cool. way they teach it is pretty cool. way they teach it is pretty cool. Instead of just watching videos and Instead of just watching videos and Instead of just watching videos and hoping that it sticks, you're writing hoping that it sticks, you're writing hoping that it sticks, you're writing real code, building real projects, and real code, building real projects, and real code, building real projects, and working through challenges that mirror working through challenges that mirror working through challenges that mirror what you'd actually do in a job. They've what you'd actually do in a job. They've what you'd actually do in a job. They've also got this AI tutor called Boots, also got this AI tutor called Boots, also got this AI tutor called Boots, which is a bear wizard. And yes, that's which is a bear wizard. And yes, that's which is a bear wizard. And yes, that's amazing, but what's actually useful is amazing, but what's actually useful is amazing, but what's actually useful is that it doesn't just give you the that it doesn't just give you the that it doesn't just give you the answers. It asks follow-up questions and answers. It asks follow-up questions and answers. It asks follow-up questions and nudges you in the right direction, which nudges you in the right direction, which nudges you in the right direction, which honestly is how you actually learn honestly is how you actually learn honestly is how you actually learn stuff. And if you're the type of person stuff. And if you're the type of person stuff. And if you're the type of person that needs to go through extra practice that needs to go through extra practice that needs to go through extra practice before moving on, they've recently before moving on, they've recently before moving on, they've recently launched their training grounds, which launched their training grounds, which launched their training grounds, which gives you basically infinite challenges gives you basically infinite challenges gives you basically infinite challenges so you can get as much repetition as you so you can get as much repetition as you so you can get as much repetition as you need. One of my favorite things is all need. One of my favorite things is all need. One of my favorite things is all of the course content is free to read of the course content is free to read of the course content is free to read and watch. A paid membership unlocks the and watch. A paid membership unlocks the and watch. A paid membership unlocks the interactive coding, AI help, progress interactive coding, AI help, progress interactive coding, AI help, progress tracking, and all of the gamification tracking, and all of the gamification tracking, and all of the gamification stuff like the XP levels, achievements, stuff like the XP levels, achievements, stuff like the XP levels, achievements, boss fights, the whole thing. And boss fights, the whole thing. And boss fights, the whole thing. And there's a 30-day no-questions-asked there's a 30-day no-questions-asked there's a 30-day no-questions-asked money-back guarantee. So, go to boot.dev money-back guarantee. So, go to boot.dev money-back guarantee. So, go to boot.dev and use my code to get 25% off your and use my code to get 25% off your and use my code to get 25% off your entire first year of the annual plan.
-
entire first year of the annual plan. entire first year of the annual plan. Scan the code on screen, and the link is Scan the code on screen, and the link is Scan the code on screen, and the link is the first one in the description. So, we the first one in the description. So, we the first one in the description. So, we are just about completely updated here. are just about completely updated here. are just about completely updated here. And now what we can do is get rid of And now what we can do is get rid of And now what we can do is get rid of this. We already set our records and we this. We already set our records and we this. We already set our records and we already have Docker. So, we are going to already have Docker. So, we are going to already have Docker. So, we are going to want to run the setup script. I'm going want to run the setup script. I'm going want to run the setup script. I'm going to copy this and what this is going to to copy this and what this is going to to copy this and what this is going to do is make a new directory for NetBird. do is make a new directory for NetBird. do is make a new directory for NetBird. We're going to change directories into We're going to change directories into We're going to change directories into NetBird and then run the getting started NetBird and then run the getting started NetBird and then run the getting started script. This will kind of show you how script. This will kind of show you how script. This will kind of show you how easy it is to get all this set up. So, easy it is to get all this set up. So, easy it is to get all this set up. So, first what we do is type in our domain first what we do is type in our domain first what we do is type in our domain name, which is going to be netbird.for name, which is going to be netbird.for name, which is going to be netbird.for me.workin.com. me.workin.com. me.workin.com. Obviously, replace it with what yours Obviously, replace it with what yours Obviously, replace it with what yours is. You do need that A record set up to is. You do need that A record set up to is. You do need that A record set up to get it all working. So, do make sure get it all working. So, do make sure get it all working. So, do make sure you've done that first. So, let's hit you've done that first. So, let's hit you've done that first. So, let's hit enter. And then right here, what reverse enter. And then right here, what reverse enter. And then right here, what reverse proxy? I highly suggest you go with the proxy? I highly suggest you go with the proxy? I highly suggest you go with the first one. It will make everything super first one. It will make everything super first one. It will make everything super super easy. Traffic will handle all the super easy. Traffic will handle all the super easy. Traffic will handle all the TLS and everything. So, let's go zero. TLS and everything. So, let's go zero. TLS and everything. So, let's go zero. Hit enter, make the whole setup and Hit enter, make the whole setup and Hit enter, make the whole setup and everything pretty automated. So, now everything pretty automated. So, now everything pretty automated. So, now email address for that certification.
-
email address for that certification. email address for that certification. So, tekkr.tv. Hit enter. Do you want to So, tekkr.tv. Hit enter. Do you want to So, tekkr.tv. Hit enter. Do you want to enable the proxy? Yes, that is one of enable the proxy? Yes, that is one of enable the proxy? Yes, that is one of the new key features. I do want to do the new key features. I do want to do the new key features. I do want to do that. So, now we're going to start up that. So, now we're going to start up that. So, now we're going to start up the core services. Just give that a the core services. Just give that a the core services. Just give that a minute to do what it needs to do. While minute to do what it needs to do. While minute to do what it needs to do. While while it finishes that, we can scroll while it finishes that, we can scroll while it finishes that, we can scroll down a little bit here because the next down a little bit here because the next down a little bit here because the next step is going to be onboarding a local step is going to be onboarding a local step is going to be onboarding a local user. If you don't want an actual IDP or user. If you don't want an actual IDP or user. If you don't want an actual IDP or anything like that, you really don't anything like that, you really don't anything like that, you really don't need one. If username and password is need one. If username and password is need one. If username and password is fine for you, that's great. But, it fine for you, that's great. But, it fine for you, that's great. But, it doesn't come with like multi-factor doesn't come with like multi-factor doesn't come with like multi-factor authentication or like really quick authentication or like really quick authentication or like really quick single sign-on. That's something I want single sign-on. That's something I want single sign-on. That's something I want and I like the passkeys that Pocket ID and I like the passkeys that Pocket ID and I like the passkeys that Pocket ID does. So, we can see this is done. It's does. So, we can see this is done. It's does. So, we can see this is done. It's going to give us some more information going to give us some more information going to give us some more information after the setup. We can access our after the setup. We can access our after the setup. We can access our dashboard here. These are the ports dashboard here. These are the ports dashboard here. These are the ports we're going to want to make sure we have we're going to want to make sure we have we're going to want to make sure we have open, which I won't go through that. I open, which I won't go through that. I open, which I won't go through that. I have all ports basically open on this have all ports basically open on this have all ports basically open on this VPS, but I'll add some more information VPS, but I'll add some more information VPS, but I'll add some more information about opening and closing ports here. about opening and closing ports here. about opening and closing ports here. And we have information on the NetBird And we have information on the NetBird And we have information on the NetBird proxy with the CNAME that we're going to proxy with the CNAME that we're going to proxy with the CNAME that we're going to need to add, which we've already done need to add, which we've already done need to add, which we've already done so. So, we're good to go. Let's go to so. So, we're good to go. Let's go to so. So, we're good to go. Let's go to the domain, shall we? And here we are, the domain, shall we? And here we are, the domain, shall we? And here we are, we're onboarding. So, let's type in our we're onboarding. So, let's type in our we're onboarding. So, let's type in our name, our email address, and give name, our email address, and give name, our email address, and give ourselves a moderately strong password.
-
ourselves a moderately strong password. ourselves a moderately strong password. Granted, it's not too important. I'm not Granted, it's not too important. I'm not Granted, it's not too important. I'm not going to actually end up getting rid of going to actually end up getting rid of going to actually end up getting rid of this local user a little bit later. So, this local user a little bit later. So, this local user a little bit later. So, let's create our admin account, and then let's create our admin account, and then let's create our admin account, and then here we could go to the login, and then here we could go to the login, and then here we could go to the login, and then sign in just like that, and we are now sign in just like that, and we are now sign in just like that, and we are now in NetBird. If you've never installed in NetBird. If you've never installed in NetBird. If you've never installed NetBird, this is a good thing to kind of NetBird, this is a good thing to kind of NetBird, this is a good thing to kind of walk through, kind of helps explain walk through, kind of helps explain walk through, kind of helps explain everything, you test some things, but everything, you test some things, but everything, you test some things, but we're going to go ahead and skip it for we're going to go ahead and skip it for we're going to go ahead and skip it for this video. And then from there, we have this video. And then from there, we have this video. And then from there, we have the Pocket ID setup. Now, one thing the Pocket ID setup. Now, one thing the Pocket ID setup. Now, one thing that's pretty cool about this setup is that's pretty cool about this setup is that's pretty cool about this setup is we're going to spin up this Docker we're going to spin up this Docker we're going to spin up this Docker Compose with a custom Docker network Compose with a custom Docker network Compose with a custom Docker network with the NetBird client running in it. with the NetBird client running in it. with the NetBird client running in it. So, then we can add that network to So, then we can add that network to So, then we can add that network to NetBird and use that to expose services. NetBird and use that to expose services. NetBird and use that to expose services. And the only service we're spinning up And the only service we're spinning up And the only service we're spinning up right now is Pocket ID, but I do do this right now is Pocket ID, but I do do this right now is Pocket ID, but I do do this in a kind of generic services folder. in a kind of generic services folder. in a kind of generic services folder. So, if I want to add anything else to So, if I want to add anything else to So, if I want to add anything else to this VPS, such as N8N or any other self- this VPS, such as N8N or any other self- this VPS, such as N8N or any other self- hosted apps, I could just add it hosted apps, I could just add it hosted apps, I could just add it straight to this Docker Compose, and straight to this Docker Compose, and straight to this Docker Compose, and it's going to be within that Docker it's going to be within that Docker it's going to be within that Docker network. So, I'm going to give this a network. So, I'm going to give this a network. So, I'm going to give this a copy to create that directory and CD copy to create that directory and CD copy to create that directory and CD into it. So, now we're in the new into it. So, now we're in the new into it. So, now we're in the new services directory. And right here, this services directory. And right here, this services directory. And right here, this is Pocket ID specific. We're going to be is Pocket ID specific. We're going to be is Pocket ID specific. We're going to be generating our encryption keys. So, you generating our encryption keys. So, you generating our encryption keys. So, you could see it's going to make a new could see it's going to make a new could see it's going to make a new Pocket ID folder for key, and it's going Pocket ID folder for key, and it's going Pocket ID folder for key, and it's going to use OpenSSL to generate that key into to use OpenSSL to generate that key into to use OpenSSL to generate that key into a encryption key folder, and then we're a encryption key folder, and then we're a encryption key folder, and then we're going to change its permissions. So, going to change its permissions. So, going to change its permissions. So, give that a copy. Bam. Hit enter, and give that a copy. Bam. Hit enter, and give that a copy. Bam. Hit enter, and then just like that, you could see we then just like that, you could see we then just like that, you could see we have a Pocket ID folder have a Pocket ID folder have a Pocket ID folder with the key folder and encryption key with the key folder and encryption key with the key folder and encryption key right in it. So, now we're going to right in it. So, now we're going to right in it. So, now we're going to create the compose file. And I got create the compose file. And I got create the compose file. And I got everything right here, so we're going to
-
everything right here, so we're going to everything right here, so we're going to use nano as our text editor to create use nano as our text editor to create use nano as our text editor to create that compose.yaml, and then give this a that compose.yaml, and then give this a that compose.yaml, and then give this a copy. This is the entire thing, and I'll copy. This is the entire thing, and I'll copy. This is the entire thing, and I'll kind of walk you through it here. So, kind of walk you through it here. So, kind of walk you through it here. So, actually starting on the bottom, we do actually starting on the bottom, we do actually starting on the bottom, we do have our networks. This is that custom have our networks. This is that custom have our networks. This is that custom Docker network that I was talking about Docker network that I was talking about Docker network that I was talking about with the subnet of 172.28.10, with the subnet of 172.28.10, with the subnet of 172.28.10, And we have our gateway, it's bridged, And we have our gateway, it's bridged, And we have our gateway, it's bridged, it's called services, it's nice. Now, if it's called services, it's nice. Now, if it's called services, it's nice. Now, if we scroll up all the way to the top we scroll up all the way to the top we scroll up all the way to the top here, we have pocket ID. So, we have our here, we have pocket ID. So, we have our here, we have pocket ID. So, we have our app URL. This is something that we're app URL. This is something that we're app URL. This is something that we're going to want to change. So, I like to going to want to change. So, I like to going to want to change. So, I like to do off. But, you could change that if do off. But, you could change that if do off. But, you could change that if you'd like to. But, I do need to change you'd like to. But, I do need to change you'd like to. But, I do need to change the word example here to my domain. We the word example here to my domain. We the word example here to my domain. We have the location of our encryption key, have the location of our encryption key, have the location of our encryption key, which you can see right here is pointed which you can see right here is pointed which you can see right here is pointed to that proper key folder cuz these are to that proper key folder cuz these are to that proper key folder cuz these are our volumes for the data and the key. our volumes for the data and the key. our volumes for the data and the key. And then this is running on the IP And then this is running on the IP And then this is running on the IP ending in 10. And that's going to be ending in 10. And that's going to be ending in 10. And that's going to be important when we set up our proxy. important when we set up our proxy. important when we set up our proxy. We have a health check here. And then we We have a health check here. And then we We have a health check here. And then we have our NetBird client. So, under have our NetBird client. So, under have our NetBird client. So, under NetBird management URL, this is another NetBird management URL, this is another NetBird management URL, this is another thing that we could go ahead and change thing that we could go ahead and change thing that we could go ahead and change to this kind of demo instance that I to this kind of demo instance that I to this kind of demo instance that I have set up.
-
have set up. have set up. And we're going to need a setup key to And we're going to need a setup key to And we're going to need a setup key to So, to actually connect this to our So, to actually connect this to our So, to actually connect this to our dashboard. And to do that, we're going dashboard. And to do that, we're going dashboard. And to do that, we're going to go over here to our management, go to to go over here to our management, go to to go over here to our management, go to setup keys, and we're going to create a setup keys, and we're going to create a setup keys, and we're going to create a new one. This doesn't really matter what new one. This doesn't really matter what new one. This doesn't really matter what it's called. I'm going to call it VPS. it's called. I'm going to call it VPS. it's called. I'm going to call it VPS. And here you have some settings. You can And here you have some settings. You can And here you have some settings. You can make it reusable if you're going to spin make it reusable if you're going to spin make it reusable if you're going to spin up a bunch of different things in a up a bunch of different things in a up a bunch of different things in a short period of time. That's a good short period of time. That's a good short period of time. That's a good option for that. But, I'm just going to option for that. But, I'm just going to option for that. But, I'm just going to make this into a new group called VPS make this into a new group called VPS make this into a new group called VPS services and create that. So, now that's services and create that. So, now that's services and create that. So, now that's going to auto-assign to that group when going to auto-assign to that group when going to auto-assign to that group when I use the key. So, let's create that I use the key. So, let's create that I use the key. So, let's create that setup key, give it a copy, and then drop setup key, give it a copy, and then drop setup key, give it a copy, and then drop it on right here. So, that is really it on right here. So, that is really it on right here. So, that is really about it. We also created a NetBird about it. We also created a NetBird about it. We also created a NetBird folder. Our configs are going to be folder. Our configs are going to be folder. Our configs are going to be living in there. And NetBird has its own living in there. And NetBird has its own living in there. And NetBird has its own IP ending in .2. So, let's output, get IP ending in .2. So, let's output, get IP ending in .2. So, let's output, get out of there. And now we should be good out of there. And now we should be good out of there. And now we should be good to go just to spin it up. So, let's do to go just to spin it up. So, let's do to go just to spin it up. So, let's do Docker compose up. I'm not going to do Docker compose up. I'm not going to do Docker compose up. I'm not going to do {dash}d so I can make sure there's no {dash}d so I can make sure there's no {dash}d so I can make sure there's no errors right out of the gate. So, let's errors right out of the gate. So, let's errors right out of the gate. So, let's let that spin up. Absolutely beautiful. let that spin up. Absolutely beautiful. let that spin up. Absolutely beautiful. Everything's looking good now. So, we're Everything's looking good now. So, we're Everything's looking good now. So, we're going to go ahead, close this, and you going to go ahead, close this, and you going to go ahead, close this, and you could see that this is red now, meaning could see that this is red now, meaning could see that this is red now, meaning that this key is now invalid. We can't that this key is now invalid. We can't that this key is now invalid. We can't use it because it's already been used to use it because it's already been used to use it because it's already been used to spin up this peer right here. This peer spin up this peer right here. This peer spin up this peer right here. This peer in that Docker network is going to act in that Docker network is going to act in that Docker network is going to act as a routing peer, which we'll set up as a routing peer, which we'll set up as a routing peer, which we'll set up now. So, to do that, we're going to now. So, to do that, we're going to now. So, to do that, we're going to create a new network. Let's go over to create a new network. Let's go over to create a new network. Let's go over to networks, add a network. So, first we're networks, add a network. So, first we're networks, add a network. So, first we're going to want to give our network a going to want to give our network a going to want to give our network a name, VPS Docker services. What a good name, VPS Docker services. What a good name, VPS Docker services. What a good name. We're going to We're going to add name. We're going to We're going to add name. We're going to We're going to add that there. You can add a description if that there. You can add a description if that there. You can add a description if you want to. So, we'll add that network.
-
you want to. So, we'll add that network. you want to. So, we'll add that network. And now we're going to want to add a And now we're going to want to add a And now we're going to want to add a resource. This is going to be either a resource. This is going to be either a resource. This is going to be either a single IP or a actual the subnet. It single IP or a actual the subnet. It single IP or a actual the subnet. It could be a domain as well, but let's go could be a domain as well, but let's go could be a domain as well, but let's go ahead and detach from this. If I cat to ahead and detach from this. If I cat to ahead and detach from this. If I cat to remind myself of the subnet, this is remind myself of the subnet, this is remind myself of the subnet, this is what we want. So, let's give this a what we want. So, let's give this a what we want. So, let's give this a copy, and then drop it on in here, and copy, and then drop it on in here, and copy, and then drop it on in here, and we could call this something like VPS we could call this something like VPS we could call this something like VPS Docker subnet, and then continue. We do Docker subnet, and then continue. We do Docker subnet, and then continue. We do have some access control policies. I'll have some access control policies. I'll have some access control policies. I'll just set up one just so I could show just set up one just so I could show just set up one just so I could show you. Our source is going to be who is you. Our source is going to be who is you. Our source is going to be who is accessing it. And in this case, I'll accessing it. And in this case, I'll accessing it. And in this case, I'll just create a new admin group. I'll add just create a new admin group. I'll add just create a new admin group. I'll add myself to that a little bit later. And myself to that a little bit later. And myself to that a little bit later. And the destination is going to be the the destination is going to be the the destination is going to be the subnet. You can define specific ports, subnet. You can define specific ports, subnet. You can define specific ports, but it's an admin policy. It's just me. but it's an admin policy. It's just me. but it's an admin policy. It's just me. So, I think all is going to be fine. We So, I think all is going to be fine. We So, I think all is going to be fine. We do have posture checks. These are pretty do have posture checks. These are pretty do have posture checks. These are pretty cool, but for this, I'm not really going cool, but for this, I'm not really going cool, but for this, I'm not really going to need any of those. And the name here, to need any of those. And the name here, to need any of those. And the name here, subnet access, is fine. So, we'll add subnet access, is fine. So, we'll add subnet access, is fine. So, we'll add that policy, add the resource, and then that policy, add the resource, and then that policy, add the resource, and then finally, we're going to need to define finally, we're going to need to define finally, we're going to need to define the routing peer, which is that NetBird the routing peer, which is that NetBird the routing peer, which is that NetBird client right here that we spun up. So, client right here that we spun up. So, client right here that we spun up. So, if I go to select peer, we're going to if I go to select peer, we're going to if I go to select peer, we're going to do the VPS services peer, and then do the VPS services peer, and then do the VPS services peer, and then continue from there. We have some continue from there. We have some continue from there. We have some settings. All this looks good, though.
-
settings. All this looks good, though. settings. All this looks good, though. So, we will add that routing peer. And So, we will add that routing peer. And So, we will add that routing peer. And then just like that, we have our first then just like that, we have our first then just like that, we have our first NetBird network. Later on, I'll add my NetBird network. Later on, I'll add my NetBird network. Later on, I'll add my actual home subnet, so I can access all actual home subnet, so I can access all actual home subnet, so I can access all my services here. But for at least my services here. But for at least my services here. But for at least setting up our remote services, our setting up our remote services, our setting up our remote services, our Pocket ID, and anything else we want to Pocket ID, and anything else we want to Pocket ID, and anything else we want to add to this stack in the future, this is add to this stack in the future, this is add to this stack in the future, this is what we will use. And we're primarily what we will use. And we're primarily what we will use. And we're primarily going to be using this in our reverse going to be using this in our reverse going to be using this in our reverse proxy, so you can see here our reverse proxy, so you can see here our reverse proxy, so you can see here our reverse proxy is in beta. So, if I go down to proxy is in beta. So, if I go down to proxy is in beta. So, if I go down to services, let's go ahead and create a services, let's go ahead and create a services, let's go ahead and create a new one. Here, again, all the steps, new one. Here, again, all the steps, new one. Here, again, all the steps, everything that we're going to do is everything that we're going to do is everything that we're going to do is covered. Since it's running on or since covered. Since it's running on or since covered. Since it's running on or since uh Pocket ID is running with a dedicated uh Pocket ID is running with a dedicated uh Pocket ID is running with a dedicated IP address in the Docker network, we IP address in the Docker network, we IP address in the Docker network, we really don't need to expose the port really don't need to expose the port really don't need to expose the port because we're just going to push it because we're just going to push it because we're just going to push it right through this uh Docker network right through this uh Docker network right through this uh Docker network through a proxy, but 14 11 is the port through a proxy, but 14 11 is the port through a proxy, but 14 11 is the port that we're going to want to expose. So, that we're going to want to expose. So, that we're going to want to expose. So, all we need to do within our reverse all we need to do within our reverse all we need to do within our reverse proxy is add a service. This I'm going proxy is add a service. This I'm going proxy is add a service. This I'm going to call it off. It needs to match with to call it off. It needs to match with to call it off. It needs to match with what you defined right here. So, then we what you defined right here. So, then we what you defined right here. So, then we can add a target. The target is going to can add a target. The target is going to can add a target. The target is going to be a resource, and it's going to be that be a resource, and it's going to be that be a resource, and it's going to be that subnet. And within the subnet, we're subnet. And within the subnet, we're subnet. And within the subnet, we're going to point it to the IP address going to point it to the IP address going to point it to the IP address ending in 10, which again you could see ending in 10, which again you could see ending in 10, which again you could see right here.
-
right here. right here. And then the port is going to be 14 11. And then the port is going to be 14 11. And then the port is going to be 14 11. So, we could continue. We have options So, we could continue. We have options So, we could continue. We have options to add custom headers. We don't need to add custom headers. We don't need to add custom headers. We don't need any. And then from there, we can any. And then from there, we can any. And then from there, we can continue. We have authentication, which continue. We have authentication, which continue. We have authentication, which we're not going to deal with this right we're not going to deal with this right we're not going to deal with this right now. I'll show you an example of this now. I'll show you an example of this now. I'll show you an example of this later, but adding authentication to some later, but adding authentication to some later, but adding authentication to some services like this, this is an services like this, this is an services like this, this is an authentication service, it'd be silly to authentication service, it'd be silly to authentication service, it'd be silly to add double off. And adding add double off. And adding add double off. And adding authentication through the proxy itself authentication through the proxy itself authentication through the proxy itself can break some things. So, if you add a can break some things. So, if you add a can break some things. So, if you add a authentication to like uh Nextcloud authentication to like uh Nextcloud authentication to like uh Nextcloud through here, the Nextcloud app might through here, the Nextcloud app might through here, the Nextcloud app might not work properly. So, do note that when not work properly. So, do note that when not work properly. So, do note that when you're uh adding authentication. So, you're uh adding authentication. So, you're uh adding authentication. So, we'll continue. I don't need any of this we'll continue. I don't need any of this we'll continue. I don't need any of this for this service. So, from there, I can for this service. So, from there, I can for this service. So, from there, I can add that service, click add service, and add that service, click add service, and add that service, click add service, and then you could see it's going to issue then you could see it's going to issue then you could see it's going to issue my certificate. It could take it 5 to my certificate. It could take it 5 to my certificate. It could take it 5 to like 15 seconds, but boom, you could see like 15 seconds, but boom, you could see like 15 seconds, but boom, you could see it's done. So, at this point, if I just it's done. So, at this point, if I just it's done. So, at this point, if I just click on it, go to that domain, it click on it, go to that domain, it click on it, go to that domain, it should open up Pocket ID. So, we're good should open up Pocket ID. So, we're good should open up Pocket ID. So, we're good to go. Now, all I need to do is set this to go. Now, all I need to do is set this to go. Now, all I need to do is set this up. So, if I change this to setup, up. So, if I change this to setup, up. So, if I change this to setup, just like that, we're going to set it just like that, we're going to set it just like that, we're going to set it up. So, give myself a username, an up. So, give myself a username, an up. So, give myself a username, an email, and then my first and last name.
-
email, and then my first and last name. email, and then my first and last name. I can hit sign up. And now we're going I can hit sign up. And now we're going I can hit sign up. And now we're going to add a passkey. Again, or if you're on to add a passkey. Again, or if you're on to add a passkey. Again, or if you're on an Apple device, you could just use the an Apple device, you could just use the an Apple device, you could just use the like your fingerprint, Face ID. It's like your fingerprint, Face ID. It's like your fingerprint, Face ID. It's really nice for that. Um if you're on really nice for that. Um if you're on really nice for that. Um if you're on like I'm on Windows unfortunately at the like I'm on Windows unfortunately at the like I'm on Windows unfortunately at the moment, might do apologize. Combining it moment, might do apologize. Combining it moment, might do apologize. Combining it with a service like a Vault Warden right with a service like a Vault Warden right with a service like a Vault Warden right here, you can see all self-hosted and here, you can see all self-hosted and here, you can see all self-hosted and all that. So, if I click add passkey, all that. So, if I click add passkey, all that. So, if I click add passkey, we're going to save this as a new we're going to save this as a new we're going to save this as a new passkey login, and there we go. Sweet. passkey login, and there we go. Sweet. passkey login, and there we go. Sweet. So, you can see we're in. We're good to So, you can see we're in. We're good to So, you can see we're in. We're good to go. We only have a single passkey. It's go. We only have a single passkey. It's go. We only have a single passkey. It's recommended to add at least two just so recommended to add at least two just so recommended to add at least two just so you have a couple. We're going to go you have a couple. We're going to go you have a couple. We're going to go ahead and set this up with NetBird. ahead and set this up with NetBird. ahead and set this up with NetBird. Where we're going to do that is over Where we're going to do that is over Where we're going to do that is over here under settings, identity providers. here under settings, identity providers. here under settings, identity providers. This right here is where you can add a This right here is where you can add a This right here is where you can add a identity provider. So, you just click identity provider. So, you just click identity provider. So, you just click add right here. Any OIDC provider is add right here. Any OIDC provider is add right here. Any OIDC provider is going to work, but we have a quite a few going to work, but we have a quite a few going to work, but we have a quite a few here to choose from including Pocket ID. here to choose from including Pocket ID. here to choose from including Pocket ID. Now, I do believe that we have a nice Now, I do believe that we have a nice Now, I do believe that we have a nice little quick version here of everything little quick version here of everything little quick version here of everything that we need to do. But, if you go to that we need to do. But, if you go to that we need to do. But, if you go to the NetBird documentation here, it's the NetBird documentation here, it's the NetBird documentation here, it's going to go over a lot more details with going to go over a lot more details with going to go over a lot more details with screenshots and all that. But, basically screenshots and all that. But, basically screenshots and all that. But, basically what we're going to want to do is go what we're going to want to do is go what we're going to want to do is go down to administration. We have our OIDC down to administration. We have our OIDC down to administration. We have our OIDC clients here. We're going to want to add clients here. We're going to want to add clients here. We're going to want to add a new client, and we're going to call a new client, and we're going to call a new client, and we're going to call this this this NetBird. For now, we can basically just NetBird. For now, we can basically just NetBird. For now, we can basically just keep everything as is, and we're going keep everything as is, and we're going keep everything as is, and we're going to click on save. Right here, it's going to click on save. Right here, it's going to click on save. Right here, it's going to bring up our client ID and our client to bring up our client ID and our client to bring up our client ID and our client secret. So, I can go ahead and copy both secret. So, I can go ahead and copy both secret. So, I can go ahead and copy both of these and drop them in. So, we have of these and drop them in. So, we have of these and drop them in. So, we have our client ID, and then our client our client ID, and then our client our client ID, and then our client secret. So, give that a copy, drop her
-
secret. So, give that a copy, drop her secret. So, give that a copy, drop her on in. And for our issuer URL here, I on in. And for our issuer URL here, I on in. And for our issuer URL here, I can just go ahead and grab this without can just go ahead and grab this without can just go ahead and grab this without the trailing {slash}. So, drop that in, the trailing {slash}. So, drop that in, the trailing {slash}. So, drop that in, and then we're going to need our and then we're going to need our and then we're going to need our redirect callback URL. So, give this a redirect callback URL. So, give this a redirect callback URL. So, give this a copy, go back to Pocket ID, and right copy, go back to Pocket ID, and right copy, go back to Pocket ID, and right here for callback URLs, we're going to here for callback URLs, we're going to here for callback URLs, we're going to click on add, drop that on in, and click click on add, drop that on in, and click click on add, drop that on in, and click on save. For NetBird, we're going to add on save. For NetBird, we're going to add on save. For NetBird, we're going to add the user group to it. So, we're just the user group to it. So, we're just the user group to it. So, we're just going to check that, going to check that, going to check that, hit save, and now if I go ahead and log hit save, and now if I go ahead and log hit save, and now if I go ahead and log out, we can see we have Pocket ID. So, out, we can see we have Pocket ID. So, out, we can see we have Pocket ID. So, if I go ahead and click on that and sign if I go ahead and click on that and sign if I go ahead and click on that and sign in, you could see we are signed in, but in, you could see we are signed in, but in, you could see we are signed in, but but it's not going to allow me cuz the but it's not going to allow me cuz the but it's not going to allow me cuz the user is not approved. That's a setting user is not approved. That's a setting user is not approved. That's a setting you can change, but it's a good setting you can change, but it's a good setting you can change, but it's a good setting to have. Uh I'm going to sign out for to have. Uh I'm going to sign out for to have. Uh I'm going to sign out for now, and then go back, continue with the now, and then go back, continue with the now, and then go back, continue with the email, and sign into this account just email, and sign into this account just email, and sign into this account just like so. And now if I go over to team, like so. And now if I go over to team, like so. And now if I go over to team, go to users, you could see our second go to users, you could see our second go to users, you could see our second user here. It's pending approval. We user here. It's pending approval. We user here. It's pending approval. We could go ahead and approve this user, could go ahead and approve this user, could go ahead and approve this user, and you could see it's managed with and you could see it's managed with and you could see it's managed with Pocket ID. So, what I'm going to do real Pocket ID. So, what I'm going to do real Pocket ID. So, what I'm going to do real quick is actually open up this user, and quick is actually open up this user, and quick is actually open up this user, and for the user role, I'm going to switch for the user role, I'm going to switch for the user role, I'm going to switch this to owner. It's going to ask me if I this to owner. It's going to ask me if I this to owner. It's going to ask me if I want to transfer ownership. That's want to transfer ownership. That's want to transfer ownership. That's something I do want to do. So, I can hit something I do want to do. So, I can hit something I do want to do. So, I can hit confirm, confirm, confirm, save those changes, and now that user is save those changes, and now that user is save those changes, and now that user is the owner. So, if I log out again, the owner. So, if I log out again, the owner. So, if I log out again, I continue with Pocket ID, should just
-
I continue with Pocket ID, should just I continue with Pocket ID, should just sign me right in, single sign-on. There sign me right in, single sign-on. There sign me right in, single sign-on. There we are, we're the owner. So, what I we are, we're the owner. So, what I we are, we're the owner. So, what I could do now is actually delete this could do now is actually delete this could do now is actually delete this local account cuz I don't need it local account cuz I don't need it local account cuz I don't need it anymore. So, now when it comes to anymore. So, now when it comes to anymore. So, now when it comes to NetBird itself, we basically have NetBird itself, we basically have NetBird itself, we basically have everything set up. We have a strong everything set up. We have a strong everything set up. We have a strong foundation to begin building our our foundation to begin building our our foundation to begin building our our networks, our access control policies, networks, our access control policies, networks, our access control policies, inviting family members, just doing what inviting family members, just doing what inviting family members, just doing what we want to do with our remote access and we want to do with our remote access and we want to do with our remote access and exposing services with the proxy. Now, I exposing services with the proxy. Now, I exposing services with the proxy. Now, I do want to go ahead and connect this to do want to go ahead and connect this to do want to go ahead and connect this to my home lab cuz again, we just have the my home lab cuz again, we just have the my home lab cuz again, we just have the VPS. The only network we have is for VPS. The only network we have is for VPS. The only network we have is for that VPS. I want to add this to my home that VPS. I want to add this to my home that VPS. I want to add this to my home lab. Now, there's a lot of different lab. Now, there's a lot of different lab. Now, there's a lot of different ways to go ahead and do this. The ways to go ahead and do this. The ways to go ahead and do this. The easiest is the actual Linux installer. easiest is the actual Linux installer. easiest is the actual Linux installer. So, if I go over to the docs, you can So, if I go over to the docs, you can So, if I go over to the docs, you can see install NetBird, install Linux. It's see install NetBird, install Linux. It's see install NetBird, install Linux. It's just a one-line script, but it works for just a one-line script, but it works for just a one-line script, but it works for Docker, iOS, various different platforms Docker, iOS, various different platforms Docker, iOS, various different platforms you can easily get this set up in. But, you can easily get this set up in. But, you can easily get this set up in. But, I do actually have a Linux box in there I do actually have a Linux box in there I do actually have a Linux box in there that I know doesn't already have NetBird that I know doesn't already have NetBird that I know doesn't already have NetBird on it. So, let's just go ahead and SSH on it. So, let's just go ahead and SSH on it. So, let's just go ahead and SSH into that machine.
-
into that machine. into that machine. So, to zoom in a bit so you can see, I So, to zoom in a bit so you can see, I So, to zoom in a bit so you can see, I believe this is 191, if I'm not believe this is 191, if I'm not believe this is 191, if I'm not mistaken. Hey, there we go. So, this mistaken. Hey, there we go. So, this mistaken. Hey, there we go. So, this right here is a machine in my home lab. right here is a machine in my home lab. right here is a machine in my home lab. So, all I need to do is go over to setup So, all I need to do is go over to setup So, all I need to do is go over to setup keys, create a new setup key just like keys, create a new setup key just like keys, create a new setup key just like before. This is a Zimaboard, and we before. This is a Zimaboard, and we before. This is a Zimaboard, and we could create a new group called home could create a new group called home could create a new group called home lab. lab. lab. Hit enter. Hit enter. Hit enter. And then create the setup key. Now, And then create the setup key. Now, And then create the setup key. Now, instead of just copying the key, if we instead of just copying the key, if we instead of just copying the key, if we hit install NetBird here, it's going to hit install NetBird here, it's going to hit install NetBird here, it's going to give us the installation options. So, if give us the installation options. So, if give us the installation options. So, if I just copy this first command and drop I just copy this first command and drop I just copy this first command and drop it on in, hit enter, it is going to it on in, hit enter, it is going to it on in, hit enter, it is going to install NetBird for me. So, there we go. install NetBird for me. So, there we go. install NetBird for me. So, there we go. It's telling us to run NetBird up, but It's telling us to run NetBird up, but It's telling us to run NetBird up, but if we run it NetBird up with the if we run it NetBird up with the if we run it NetBird up with the management URL and the setup key all in management URL and the setup key all in management URL and the setup key all in one command, one command, one command, just like so, you can see now we are just like so, you can see now we are just like so, you can see now we are connected. So, if I close this out, that connected. So, if I close this out, that connected. So, if I close this out, that was used. If I go to peers, you could was used. If I go to peers, you could was used. If I go to peers, you could see we now have this little K8 server see we now have this little K8 server see we now have this little K8 server that I was playing around with that is that I was playing around with that is that I was playing around with that is running in in my home lab. Now, let's running in in my home lab. Now, let's running in in my home lab. Now, let's add this to something else. Let's do add this to something else. Let's do add this to something else. Let's do this on the machine running image. So, this on the machine running image. So, this on the machine running image. So, if I create just another setup key, this if I create just another setup key, this if I create just another setup key, this is a VM, add this to my home lab group, is a VM, add this to my home lab group, is a VM, add this to my home lab group, create that key, click install NetBird.
-
create that key, click install NetBird. create that key, click install NetBird. I'm just going to grab this one-liner I'm just going to grab this one-liner I'm just going to grab this one-liner right here, drop it in, hit enter. We're right here, drop it in, hit enter. We're right here, drop it in, hit enter. We're connected. So, now I have two different connected. So, now I have two different connected. So, now I have two different machines in my home lab connected. Now, machines in my home lab connected. Now, machines in my home lab connected. Now, the reason I set up two is for my the reason I set up two is for my the reason I set up two is for my network I want to set up something network I want to set up something network I want to set up something called high availability. So, that way called high availability. So, that way called high availability. So, that way if one of these two machines happens to if one of these two machines happens to if one of these two machines happens to go down, whether if it crashes for go down, whether if it crashes for go down, whether if it crashes for whatever reason or if it like reboots whatever reason or if it like reboots whatever reason or if it like reboots for a system update, I will still for a system update, I will still for a system update, I will still maintain access to my remote network. maintain access to my remote network. maintain access to my remote network. So, let's go to networks and add that. So, let's go to networks and add that. So, let's go to networks and add that. So, add a network. This is going to be So, add a network. This is going to be So, add a network. This is going to be my home network. Add that. Add the my home network. Add that. Add the my home network. Add that. Add the resource. This is going to be my main resource. This is going to be my main resource. This is going to be my main subnet with the IP address of my actual subnet with the IP address of my actual subnet with the IP address of my actual home lab subnet, which looks a little home lab subnet, which looks a little home lab subnet, which looks a little something like this. So, we'll continue. something like this. So, we'll continue. something like this. So, we'll continue. Here, we'll add a policy and again, I'm Here, we'll add a policy and again, I'm Here, we'll add a policy and again, I'm going to give the admin users permission going to give the admin users permission going to give the admin users permission to access the main subnet and then all to access the main subnet and then all to access the main subnet and then all that looks good. Add that resource and that looks good. Add that resource and that looks good. Add that resource and finally, we're going to add the routing finally, we're going to add the routing finally, we're going to add the routing peer or in this case, routing peers. So, peer or in this case, routing peers. So, peer or in this case, routing peers. So, first, I'm just going to add my K8 first, I'm just going to add my K8 first, I'm just going to add my K8 server here.
-
server here. server here. Continue. Now, this is an actual Continue. Now, this is an actual Continue. Now, this is an actual physical server. I prefer this to have physical server. I prefer this to have physical server. I prefer this to have priority, so I can just priority, so I can just priority, so I can just lower this number a little bit here. As lower this number a little bit here. As lower this number a little bit here. As you can see, a lower metric indicates you can see, a lower metric indicates you can see, a lower metric indicates higher routing priority. So, let's add higher routing priority. So, let's add higher routing priority. So, let's add that. And now, right here, if I open up that. And now, right here, if I open up that. And now, right here, if I open up our home network, you can see high our home network, you can see high our home network, you can see high availability is currently inactive, but availability is currently inactive, but availability is currently inactive, but if I go over to routing peers, if I go over to routing peers, if I go over to routing peers, add an additional routing peer. In this add an additional routing peer. In this add an additional routing peer. In this case, it's going to be my VM running case, it's going to be my VM running case, it's going to be my VM running image. Continue. All this looks okay. image. Continue. All this looks okay. image. Continue. All this looks okay. So, there we go. Now, high availability So, there we go. Now, high availability So, there we go. Now, high availability is active. So, if one of these two goes is active. So, if one of these two goes is active. So, if one of these two goes down, I can still access that entire down, I can still access that entire down, I can still access that entire subnet. Now, one thing real quick, let's subnet. Now, one thing real quick, let's subnet. Now, one thing real quick, let's talk about user groups, permissions, and talk about user groups, permissions, and talk about user groups, permissions, and access policies. So, first, I've used access policies. So, first, I've used access policies. So, first, I've used the admin group quite a bit, but I've the admin group quite a bit, but I've the admin group quite a bit, but I've never given myself it. So, if I go to never given myself it. So, if I go to never given myself it. So, if I go to groups, I'm going to give myself the groups, I'm going to give myself the groups, I'm going to give myself the admin group. If you add like friends or admin group. If you add like friends or admin group. If you add like friends or family, you could give them their own family, you could give them their own family, you could give them their own groups if you would like to. Co-workers, groups if you would like to. Co-workers, groups if you would like to. Co-workers, whatever it may be. Or even if you're whatever it may be. Or even if you're whatever it may be. Or even if you're actually setting this up for a business, actually setting this up for a business, actually setting this up for a business, you could do like your devops team, your you could do like your devops team, your you could do like your devops team, your marketing team, and you could really marketing team, and you could really marketing team, and you could really define what resources you want them to define what resources you want them to define what resources you want them to have access to. So, if we go access have access to. So, if we go access have access to. So, if we go access control policies, you can see some of control policies, you can see some of control policies, you can see some of the initial ones that we've set up.
-
the initial ones that we've set up. the initial ones that we've set up. There is a default all-to-all policy. There is a default all-to-all policy. There is a default all-to-all policy. Generally, it's recommended to disable Generally, it's recommended to disable Generally, it's recommended to disable that or completely get rid of it. If that or completely get rid of it. If that or completely get rid of it. If it's just you running your home lab or it's just you running your home lab or it's just you running your home lab or whatever, that all-to-all is usually whatever, that all-to-all is usually whatever, that all-to-all is usually fine, but it's always better to have fine, but it's always better to have fine, but it's always better to have policies like this. Now, these two policies like this. Now, these two policies like this. Now, these two subnet policies we have to find are subnet policies we have to find are subnet policies we have to find are unidirectional, so the admins can access unidirectional, so the admins can access unidirectional, so the admins can access this resource, but it's not really vice this resource, but it's not really vice this resource, but it's not really vice versa. I don't have a good example, but versa. I don't have a good example, but versa. I don't have a good example, but if let's say we added a policy and I if let's say we added a policy and I if let's say we added a policy and I wanted my VPS services and my let's wanted my VPS services and my let's wanted my VPS services and my let's define a specific peer. I wanted my K8 define a specific peer. I wanted my K8 define a specific peer. I wanted my K8 server to have bidirectional control or server to have bidirectional control or server to have bidirectional control or bidirectional permissions, so they can bidirectional permissions, so they can bidirectional permissions, so they can talk to each other on a peer-to-peer talk to each other on a peer-to-peer talk to each other on a peer-to-peer basis, you could set that up. Or basis, you could set that up. Or basis, you could set that up. Or something really cool, let's say I had something really cool, let's say I had something really cool, let's say I had my image server as my destination, the my image server as my destination, the my image server as my destination, the actual peer itself instead of the group, actual peer itself instead of the group, actual peer itself instead of the group, I could do something like create a new I could do something like create a new I could do something like create a new group called family, group called family, group called family, and then I could give this family group and then I could give this family group and then I could give this family group specific access to a specific port, specific access to a specific port, specific access to a specific port, which the port for image is 2283.
-
which the port for image is 2283. which the port for image is 2283. So, you could define things like that as So, you could define things like that as So, you could define things like that as well. So, I could continue, continue. well. So, I could continue, continue. well. So, I could continue, continue. This is my image This is my image This is my image family policy, add that policy, and then family policy, add that policy, and then family policy, add that policy, and then you can see it right there. But, image you can see it right there. But, image you can see it right there. But, image doesn't really need to access family, so doesn't really need to access family, so doesn't really need to access family, so all we would do is click on this. So, all we would do is click on this. So, all we would do is click on this. So, now it's one directional and we're good now it's one directional and we're good now it's one directional and we're good to go. So, then if a family member to go. So, then if a family member to go. So, then if a family member downloaded the NetBird app on their downloaded the NetBird app on their downloaded the NetBird app on their phone and they had the image app phone and they had the image app phone and they had the image app running, all they would do is use the running, all they would do is use the running, all they would do is use the actual NetBird IP address right here actual NetBird IP address right here actual NetBird IP address right here with the port to connect to image. And with the port to connect to image. And with the port to connect to image. And you can actually see this working real you can actually see this working real you can actually see this working real quick. If I go to users and I'm going to quick. If I go to users and I'm going to quick. If I go to users and I'm going to add myself to that uh the family group. add myself to that uh the family group. add myself to that uh the family group. So, save the group, go down here. I do So, save the group, go down here. I do So, save the group, go down here. I do have a couple instances, and if I go to have a couple instances, and if I go to have a couple instances, and if I go to the profile feature, I can actually the profile feature, I can actually the profile feature, I can actually manage profiles here and create a new manage profiles here and create a new manage profiles here and create a new profile. This will just be demo, so you profile. This will just be demo, so you profile. This will just be demo, so you can have multiple NetBird instances that can have multiple NetBird instances that can have multiple NetBird instances that you can easily connect to from clients, you can easily connect to from clients, you can easily connect to from clients, which is a nice feature. So, create which is a nice feature. So, create which is a nice feature. So, create that. Okay. Now, if I select that, go to that. Okay. Now, if I select that, go to that. Okay. Now, if I select that, go to yes. Here, if we want run NetBird up yes. Here, if we want run NetBird up yes. Here, if we want run NetBird up with our management URL, it's going to with our management URL, it's going to with our management URL, it's going to fire up this so we can authenticate fire up this so we can authenticate fire up this so we can authenticate ourselves. And just like that, the login ourselves. And just like that, the login ourselves. And just like that, the login is successful. You can see we're is successful. You can see we're is successful. You can see we're connected here. So, now on this, I connected here. So, now on this, I connected here. So, now on this, I should be able to go to peers, grab our should be able to go to peers, grab our should be able to go to peers, grab our image server, give that NetBird URL or image server, give that NetBird URL or image server, give that NetBird URL or IP address a copy. And this is at 2283, IP address a copy. And this is at 2283, IP address a copy. And this is at 2283, just like that. Hit enter. And just like just like that. Hit enter. And just like just like that. Hit enter. And just like that, I am connected to image through that, I am connected to image through that, I am connected to image through NetBird. And I am logged into my local
-
NetBird. And I am logged into my local NetBird. And I am logged into my local Wi-Fi, but using this like in this way Wi-Fi, but using this like in this way Wi-Fi, but using this like in this way would work anywhere in the world. Now, would work anywhere in the world. Now, would work anywhere in the world. Now, let's say I wanted to expose image with let's say I wanted to expose image with let's say I wanted to expose image with the uh that proxy. Really easy, just the uh that proxy. Really easy, just the uh that proxy. Really easy, just like we saw earlier. So, if I go to like we saw earlier. So, if I go to like we saw earlier. So, if I go to services, services, services, add a service. This can be image. And add a service. This can be image. And add a service. This can be image. And actually, I will note right here, you actually, I will note right here, you actually, I will note right here, you can add more domains if you want to. So, can add more domains if you want to. So, can add more domains if you want to. So, that that's really nice. But, if I go that that's really nice. But, if I go that that's really nice. But, if I go target, we can select the specific peer target, we can select the specific peer target, we can select the specific peer instead of the resource. So, we could go instead of the resource. So, we could go instead of the resource. So, we could go either way. We could either select a either way. We could either select a either way. We could either select a main subnet, point it to the right IP main subnet, point it to the right IP main subnet, point it to the right IP address and port, address and port, address and port, or we can select the peer directly. So, or we can select the peer directly. So, or we can select the peer directly. So, if I go image here, it already filled if I go image here, it already filled if I go image here, it already filled that in. This is at that in. This is at that in. This is at 2283. 2283. 2283. Continue. And I'm not sure on these Continue. And I'm not sure on these Continue. And I'm not sure on these settings for image, but I may have to settings for image, but I may have to settings for image, but I may have to come back and change those later. Here, come back and change those later. Here, come back and change those later. Here, image has its own uh kind of login image has its own uh kind of login image has its own uh kind of login stuff, as you see here. And do note, if stuff, as you see here. And do note, if stuff, as you see here. And do note, if I added this onto authentication, it I added this onto authentication, it I added this onto authentication, it probably would uh break the uh probably would uh break the uh probably would uh break the uh connection on the app. But, just to demo connection on the app. But, just to demo connection on the app. But, just to demo it really quick, uh let's say I want to it really quick, uh let's say I want to it really quick, uh let's say I want to add a PIN code of 22222. Add that PIN.
-
add a PIN code of 22222. Add that PIN. add a PIN code of 22222. Add that PIN. Continue. Continue. Continue. That's probably fine. Add that resource. That's probably fine. Add that resource. That's probably fine. Add that resource. It's going to issue the certificate. We It's going to issue the certificate. We It's going to issue the certificate. We can give that just a minute or less than can give that just a minute or less than can give that just a minute or less than a minute, hopefully. Let's refresh. All a minute, hopefully. Let's refresh. All a minute, hopefully. Let's refresh. All right, we're good. right, we're good. right, we're good. Click on that, and look at that. It's Click on that, and look at that. It's Click on that, and look at that. It's asking for our PIN. So, 2 2 2 2 2 2, asking for our PIN. So, 2 2 2 2 2 2, asking for our PIN. So, 2 2 2 2 2 2, just like that. And now, we're in. But just like that. And now, we're in. But just like that. And now, we're in. But again, that will probably break the app, again, that will probably break the app, again, that will probably break the app, so it's really easy to go ahead and edit so it's really easy to go ahead and edit so it's really easy to go ahead and edit this. All I would do is click configure this. All I would do is click configure this. All I would do is click configure on authentication, I would just remove on authentication, I would just remove on authentication, I would just remove that, save those changes. So, now, if I that, save those changes. So, now, if I that, save those changes. So, now, if I open it up, you could see it doesn't open it up, you could see it doesn't open it up, you could see it doesn't have that PIN anymore. And something have that PIN anymore. And something have that PIN anymore. And something else I wanted to show you all that is else I wanted to show you all that is else I wanted to show you all that is pretty cool is the ability to expose pretty cool is the ability to expose pretty cool is the ability to expose local services. This is also a rather local services. This is also a rather local services. This is also a rather new feature that was added right after new feature that was added right after new feature that was added right after proxy. So, if I CD into something that I proxy. So, if I CD into something that I proxy. So, if I CD into something that I know I can run, so docs, this is the know I can run, so docs, this is the know I can run, so docs, this is the actual NetBird docs. So, if I ran npm actual NetBird docs. So, if I ran npm actual NetBird docs. So, if I ran npm run dev, just like that, it's going to run dev, just like that, it's going to run dev, just like that, it's going to spin up that service locally. So, you spin up that service locally. So, you spin up that service locally. So, you can see it's at localhost:3000.
-
can see it's at localhost:3000. can see it's at localhost:3000. So, this is really nice if I'm building So, this is really nice if I'm building So, this is really nice if I'm building an app or I'm testing something, and I an app or I'm testing something, and I an app or I'm testing something, and I just want to say, "Hey, look at this just want to say, "Hey, look at this just want to say, "Hey, look at this thing I'm building real quick" to thing I'm building real quick" to thing I'm building real quick" to somebody. I think uh ngrok, Cloudflare somebody. I think uh ngrok, Cloudflare somebody. I think uh ngrok, Cloudflare tunnels has similar features. We need to tunnels has similar features. We need to tunnels has similar features. We need to go to settings, uh clients here, and go to settings, uh clients here, and go to settings, uh clients here, and right here, enable peer expose. So, right here, enable peer expose. So, right here, enable peer expose. So, we'll allow that, we'll allow my admin we'll allow that, we'll allow my admin we'll allow that, we'll allow my admin group to do it, and save those changes. group to do it, and save those changes. group to do it, and save those changes. So, now, let's see if it just works So, now, let's see if it just works So, now, let's see if it just works right away. NetBird expose, there we go. right away. NetBird expose, there we go. right away. NetBird expose, there we go. You could see we have a temporary You could see we have a temporary You could see we have a temporary service spun up here. And if I go to the service spun up here. And if I go to the service spun up here. And if I go to the reverse proxy services, you can see it's reverse proxy services, you can see it's reverse proxy services, you can see it's right here. So, if I open that up, we right here. So, if I open that up, we right here. So, if I open that up, we are being routed to the local version of are being routed to the local version of are being routed to the local version of those docs. So, then you can easily just those docs. So, then you can easily just those docs. So, then you can easily just share that with anybody. And then, you share that with anybody. And then, you share that with anybody. And then, you could see right here, if I do a control could see right here, if I do a control could see right here, if I do a control C and stop that, the service is just C and stop that, the service is just C and stop that, the service is just gone, automatically clears itself. And gone, automatically clears itself. And gone, automatically clears itself. And pretty cool, you can do other things. pretty cool, you can do other things. pretty cool, you can do other things. So, there's a bunch of different flags. So, there's a bunch of different flags. So, there's a bunch of different flags. So, I'm just grabbing a bunch of them So, I'm just grabbing a bunch of them So, I'm just grabbing a bunch of them here. We have the ability to add pins, here. We have the ability to add pins, here. We have the ability to add pins, passwords, uh uh passwords, uh uh passwords, uh uh user groups. We can add something like user groups. We can add something like user groups. We can add something like uh with name prefix docs. If you have a uh with name prefix docs. If you have a uh with name prefix docs. If you have a custom domain already enabled, there's a custom domain already enabled, there's a custom domain already enabled, there's a variable for that. But now, if I hit variable for that. But now, if I hit variable for that. But now, if I hit enter, you can see we have docs as the enter, you can see we have docs as the enter, you can see we have docs as the prefix. And if I go ahead and grab this, prefix. And if I go ahead and grab this, prefix. And if I go ahead and grab this, drop it on in here, you can see we could drop it on in here, you can see we could drop it on in here, you can see we could do single sign-on, pin, password. For do single sign-on, pin, password. For do single sign-on, pin, password. For single sign-on, if I just continue with single sign-on, if I just continue with single sign-on, if I just continue with Pocket ID, you could see, just like Pocket ID, you could see, just like Pocket ID, you could see, just like that, I am granted access. So, just
-
that, I am granted access. So, just that, I am granted access. So, just another really cool feature, and there's another really cool feature, and there's another really cool feature, and there's so much more that I don't have time to so much more that I don't have time to so much more that I don't have time to cover. I mean, you could set up DNS cover. I mean, you could set up DNS cover. I mean, you could set up DNS stuff, so name zones, DNS settings. You stuff, so name zones, DNS settings. You stuff, so name zones, DNS settings. You could really dive more into posture could really dive more into posture could really dive more into posture checks and policies. I do have a checks and policies. I do have a checks and policies. I do have a slightly older NetBird video in which we slightly older NetBird video in which we slightly older NetBird video in which we go into that a whole heck of a lot more. go into that a whole heck of a lot more. go into that a whole heck of a lot more. But overall, I'm really happy with how But overall, I'm really happy with how But overall, I'm really happy with how well this works. Now, when I first well this works. Now, when I first well this works. Now, when I first started with NetBird, the self-hosted started with NetBird, the self-hosted started with NetBird, the self-hosted instance, it was still a script, but it instance, it was still a script, but it instance, it was still a script, but it automatically spun up Citadel. It was automatically spun up Citadel. It was automatically spun up Citadel. It was bloated, a lot of things didn't work. bloated, a lot of things didn't work. bloated, a lot of things didn't work. The reverse proxy wasn't there. So, the The reverse proxy wasn't there. So, the The reverse proxy wasn't there. So, the team has definitely made some strides team has definitely made some strides team has definitely made some strides when it comes to getting this to be a when it comes to getting this to be a when it comes to getting this to be a really nice, basically an almost really nice, basically an almost really nice, basically an almost all-in-one remote connectivity platform. all-in-one remote connectivity platform. all-in-one remote connectivity platform. And again, everything that you've seen And again, everything that you've seen And again, everything that you've seen has been on my my infrastructure, has been on my my infrastructure, has been on my my infrastructure, technically. I'll leave a link to my technically. I'll leave a link to my technically. I'll leave a link to my home lab repo so you could see the full home lab repo so you could see the full home lab repo so you could see the full kind of walk-through of most of the kind of walk-through of most of the kind of walk-through of most of the stuff that I covered in this video, as stuff that I covered in this video, as stuff that I covered in this video, as well as to the NetBird docs. But of well as to the NetBird docs. But of well as to the NetBird docs. But of course, the very first link is going to course, the very first link is going to course, the very first link is going to be to boot.dev, be to boot.dev, be to boot.dev, which you should definitely check out. which you should definitely check out. which you should definitely check out. I've had a real good time using it. And I've had a real good time using it. And I've had a real good time using it. And with all that, I do hope you have an with all that, I do hope you have an with all that, I do hope you have an absolutely beautiful day, and good bye.
Summary
This video demonstrates securely exposing home lab services to the internet without opening home router ports, using the self-hostable, open-source NetBird tool. It acts as an alternative to services like Tailscale and leverages WireGuard for peer-to-peer connections, often with a VPS as a control plane. The practical takeaway is that NetBird offers a flexible and secure way to manage remote access to your home infrastructure, with support for various authentication methods including passkeys via providers like Pocket ID.