Setting Up My Ubiquiti 10Gb Switch With A Self-Hosted Controller: How Hard Can It Be?
I recently received my 10 Gigabit Ubiquiti Flex XG managed network switch, and while it IS “plug and play”, that is only for the basic (dumb) mode. I wanted the full management features, but this means diving into Ubiquiti’s network service controller to launch a UniFi Network.
Luckily my Homelab NAS runs 24/7 and it uses Debian which is a fairly server friendly approach, so SURELY installing the Ubiquiti network software on it will be EASY, right?
Well not really… although I did get there in the end, as I showin this video.
If you prefer text over video, please read on for the guide/transcript version of this video.
Video Transcript
My Ubiquiti Switch Is Here
Hey everyone, yesterday I received myUbiquiti 10 GB Network switch, which is great because that’s a key part of my plan to move all my media content off my workstation PC and onto my HomeLab NAS I built recently in another video. I can then do all my video edits, which are 4K, over the network on my workstation PC and my laptop. However, at the moment, my Ubiquiti switch is just running in unmanaged or “dumb” mode.
So what I’ve done so far, I’ve plugged it in withPower over Ethernet‘cos I’ve got a PoE switch down there, and then I plugged inmy HomeLab NAS, which has a 10 GB networking card, and I also plugged in my workstation PC. Now, right now, the workstation PC doesn’t have the 10 GB networking card because the motherboard doesn’t really fit it, unfortunately. So, right now, this is limited to 2.5 gig speeds of the motherboard, but that’s still better than nothing, and it’s still speeding things up by quite a lot.
Ubi Network Controller Install
But in order to actually get a managed network switch online with Ubiquiti, you can’t just go to the web console like you could withmany other managed switches. What you’ve got to do instead is download some software and then provision the management features of the switch.
So, in this video, what I’m going to be doing is actually installing theUniFi Network Server Control software. They changed the name, but it’s called something like that. I’m going to install it on my HomeLab NAS, which is running Debian, and then hopefully, I can actually access the management portal of my network switch on here and get a bit more information than just having a dumb switch floating around doing nothing.
In terms of actually installing the network server software, there is actually somebody called Glenn who has created this massive script that does everything you need to know, and that is brilliant. But in general, I’m always a bit scared. I mean, installation scripts and just running them on my home network if I don’t know what they’re doing. I’m sure the software works well, but I’m going to try installing the network server self-hosted without any scripts or anything like that, just to see how it goes.
So, the first thing I need to do is install some packages. Fine, that should be easy enough. Yes, I want to continue. That’s fine. That’s an easy step, and it’s good to install all the SSL stuff.
Now, I need to actually add a new package. I can see that comes from Ubiquiti – ui.com – so that should be absolutely fine. Yep, so that’s it. That’s just adding that for Debian, which is brilliant. Add the keys, they also come in from ui.com, so that should be fine. As I said, I’m a little bit more paranoid than some people would be. I know some people are happy just to run a script, but I tend to just check things in a bit more detail.
Annoying MongoDB Apt Key Error
Running that… should be okay as well. That’s installed. We need to install MongoDB, which is fair enough as well. We’re also going to install wget. That’s fine. Mongo DB, we add that to the sources list. Should be fine. No, why not? Again, it’s MongoDB, and then they want to make sure that’s up-to-date. Sudo, no, that’s not how you do it. Oh, the following signature was invalid. That’s a good start, isn’t it?
Let’s just Google that error. Release [blah blah blah blah blah]. Not update on that. Brilliant. This is probably because it’s out of date, isn’t it? Okay, I’m just going to switch to root to try and fix this error. Apt key delete, and then I need to delete that key. Would it be that? Yes, okay. So, that’s deleting that.
Now, this is actually installing a newer version of MongoDB, but that could make sense to be honest. Yeah, apt-date. No, couldn’t be verified because the public key is not available. This is a good start, isn’t it?
Okay, following signatures couldn’t. So, that’s probably based on my actual list of sources, I’m supposing. Let’s have a look, ‘cos if I put 4.4, I’d probably need the 4.4 source, don’t I? So, let’s delete that, then let’s delete that and get Debian Stable DB. Okay, there’s actually a specific guide for this on the MongoDB website for Debian, so I should have probably checked that first.
MongoDB is not maintained by MongoDB, and it conflicts with the official one, but I don’t think I’ve got anything anyway. wget, MongoDB, no, I don’t think I do. Okay, so I have to install those. Ask me yes, surprised I didn’t have curl already, but there we are. That’s okay.
So, next, we’re going to do that to download that. Brilliant. And now, I need to check the actual file itself. So, let me move. I may as well just remove this, so remove that, and then touch that. Okay, great. So, if I actually look at that Mongo file now, I have that, which should be the latest. Now, apt update. Right, I just looking at the one guide, that’s okay. Can be updated fine. So, update.
Finally Seeing Progress
Firstly, apt upgrade, so I’m firstly going to do that, just to have a clean slate, and then I can install MongoDB. So, Libre Office, Python, yeah, fine. Right, so as you’re running, it’s just going to be that, isn’t it? apt install MongoDB. Do I need any of the optional stuff? Let’s have a look. No, no, I don’t.
Okay, so just got to wait for this to run. The Ubiquiti install instructions take you to some random place, which don’t give you much information on them, just telling you to download a phone app, but the phone app doesn’t work because you need the Ubiquiti Network Controller. And then, when you look at the documentation for that, it doesn’t actually work because the actual instructions they’re giving are like almost 10 years out of date. So, that’s good.
Why did MongoDB actually release MongoDB 3.8… the release date? When did it actually come out? Let’s have a look. So, that’s what they’re telling me to get is 3.6, sorry, that’s even older. So, when did 3.6 come out? It came out in 2017, yeah, so those install instructions are really out to date. But I’m hoping 7.0 will. It should be able to be installed fine once this upgrade finishes. I’m hoping then that the Ubiquiti software works with that as well. It looks like it, based on the other script, so on Glenn’s script. So, let’s just have a look.
Right, anyway, that’s all updated. So, now let’s install MongoDB. You see there, it’s installed in 7.0, so fingers crossed that should all work fine. Great. Okay, and then, in theory, I can install UniFi. So, in theory, this is the last step, and then I should be able to have managed features on my network switch. But let’s have a look.
Preparing, please don’t give me any errors, please don’t give me errors. Okay, so this is unpacking… Bin utils. Java version 17, fine. And this is the big one then. So, UniFi, the package is coming in, it’s being unpacked. This is version 8.3.32. Okay, so UniFi is being set up. It’s also added a boatload of trusted Keys, which is fine, Certificate Authorities. Creating a Symlink.
So, in my other tab, I’m just going to see if UniFi is running yet. Wait so… UniFi, so it’s a Java application, which, yeah, looks like it’s running one of the UniFi things, and MongoDB is running as well. So, that’s good. Yes, brilliant. Okay, so that’s finished now. It doesn’t give me any more information than that, but it looks like it’s running there.
Unifi Control Software Is Installed
In theory, I can now do, ‘cos it’s installed as a service, so I could just do UniFi status, and it’s saying it’s running. If, whatever reason, I didn’t want it running, I could just stop it, and it’s a bit slow, but if I look in my other tab, it’s now not running. So, that’s not running, and if I come along and click Start, it should also work. Yes, it looks like it started. Okay, so that’s good.
So, the UniFi Network application should now be accessible at the computer’s config good IP address. I don’t actually know. Okay, I wouldn’t be going… I was going to say, I don’t know the IP address of my network switch, although I could find it on my Eero app, but it’s actually the IP address of my Debian server, which makes sense because that’s where everything’s running.
Let’s have a look then. The port, are you going to tell me the port or should I just guess? No. Fine. Ubiquiti network controller default port, let’s just do it like that, 8443. 8443. Okay, ah, that’s worked, right? So, 8443… my understanding is that the script doesn’t tend to run as root. Um, so, as a result, instead of running on 443, which would be the default SSL port, you can’t actually run like that if the port is below 1024 and it’s not running as root. So, that’s why I think they’ve just gone for the port 8443 ‘cos that’s like the alternate one for non-root users. Okay, so I can ignore that.
First-Time Managed Switch Dashboard Check
Certificate, oh, look at this, yeah, fine. My country, that’s the smallest dropdown box I’ve ever seen. My country will be the United Kingdom. I agree, I have to agree, but clearly I’ve read all those agreements offline. Next, sign into my account, setting up the server. Look at that. Okay, so I’ve got a self-hosted Ubiquiti Network at this point.
I’m going to go into fullscreen, so nothing. Absolutely nothing. Why do I get nothing? Server uptime, 6 minutes. Topology, yes. Okay, there’s my Flex. Adopt. That’s it! I read somewhere you need to actually adopt a device. Adopt. It’s updating.
Firmware Updates Complete
Okay, that took absolutely ages. Basically, I finished updating, and then the network died, as you’d probably expect, because the network switch started rebooting as part of the firmware update.
So, I’m hoping if I press this reload button, look at that. I got Network Topology! So, that’s my switch. This is my study PC that I’m logged into, and then, obviously, my DB NAS, which is running Debian. So, that is connected over 10 Gb Ethernet. You can see that, at the moment, it’s only got 3 minutes of uptime because of the network switch updating. And then, the study PC is currently 2.5 gig, and again, not much uptime at the moment.
You can see Insights and stuff, but obviously, right now, it’s not going to do much. But in general, that is all set up. There’s not much to see right now, and in a future video, I’m actually going to be doing is poking through this dashboard in a lot more detail. But right now, you can see I have actually installed the UniFi network controller, and the way I’ve done it was with the self-hosted method instead of using Glenn’s really awesome script.
And I’m sure that Glenn’s script would work absolutely well. I think most people use it. But my only concern with it is, is such a long script, and unless I understand what the script’s going to do, I’m not really willing to run a script by that route in my home network. But that’s no disrespect to Glenn or anything like that. You know, I much prefer to say, right, let’s install MongoDB 7.0 in this case, not 3.6, and then let’s install UniFi directly from the source. And I can see the sources are from ui.com, Ubiquiti, and also the MongoDB website.
Switch Port Level Information
Yeah, you can see that’s all there. Brilliant. So, I got the switch there, and if you look at it in a bit more detail, you can see it’s actually laid out how everything’s connected. So, I’ve got my uplink, which is currently coming in from a PoE switch, so it’s giving gigabit networking. Yeah, you see, green… it’s gigabit there. I’vethen got a 10 Gb port, which is in use, which will be my Debian NAS. And then, the other one is a slightly lighter shade of blue for 2.5 gig.
The benefit of having this is I can actually see exactly what’s happening. So, if suddenly my workstation PC drops down to 100 Meg networking, I can actually come in here and get a bit more information about it. And that wraps up this video. I’m glad to actually get this all set up, and I can see my networking in a lot more detail. I’ve only got two devices there right now, but in time, I have more. But thanks for watching this video. I hope you found it useful or enjoyable. If you did, please hit the thumbs up button. Please subscribe to see more videos like this. Thanks for watching.
Tristan has been interested in computer hardware and software since he was 10 years old. He has built loads of computers over the years, along with installing, modifying and writing software (he’s a backend software developer ‘by trade’).Tristan also has an academic background in technology (in Math and Computer Science), so he enjoys drilling into the deeper aspects of technology.Tristan is also an avid PC gamer, with FFX and Rocket League being his favorite games.