The $0 Home Server

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
You know that old laptop you have lying around that you don’t know what to do with, but nobody would buy it if you tried to sell it, but you don’t wanna throw it away at the same time? What if I told you that you could not only find a new use for it, but that you’ll be using it for all sorts of tasks, no matter how weak it is. Want a personal media server to host movies and shows? You got it. Want network storage for your whole house? That too. Want a VPN to your home network? You’re not gonna believe this… I’m Chris Kalos, I like computers, and today I’ll be showing you how to set up The $0 Home Server, a home server with the ESSENTIALS for the average user. Huge thanks to ISL Online for sponsoring this video! Control remote machines with ease for your business with ISL Light. ISL Light is an affordable and feature-rich remote desktop suite, and it is super competitive within the space, especially for enterprise. Connect to unlimited machines securely with end-to-end encryption, from Windows, Mac, Linux, Android, and iOS. Wake your remote machines with wake-on-LAN, and transfer files to and from them securely with a user-friendly interface. On top of all that, ISL Light has RDP support for Windows hosts, for a native-like experience. All that, without breaking the bank. We’ve tested ISL Light ourselves, and we’ve found it to live up to its marketing. It’s the kind of program you set up and stop worrying about. No matter how your business is set up, ISL Light can fit your needs. Start your free trial now and get 15 days free! All features included, no credit card required. “Home server this, home server that, why do I even need a home server? I’m not a developer who needs external computing power or virtual machines, I don’t want to bother trying to install one of those fancy web UIs, and most of all, I don’t want to spend money on a new computer just to have it do nothing most of the time!” You’re right. Home server videos have gotten so complicated on YouTube these days. I love watching videos about extravagant setups, or the quest for the most efficient machine for the task, but the creators that make those videos do things on their machines that I can’t even dream of doing. At the same time, paradoxically, I do have a home server. It’s this! A 2009 IBM ThinkPad with a Core 2 Duo, that my dad saved from the e-waste bin at his workplace. And yet it’s actually useful, and it’s dead simple to use. First of all, let’s begin with the very basics to turn a computer into a home server. The minimum requirement is that it needs to have a 64-bit processor. That's it. We recommend more than 2 GB of RAM, but it's not really a requirement. Back up any data that you may have on it, because we’re going to wipe its drive clean, and install Ubuntu Server LTS on it without a desktop environment, so that we are not wasting precious resources trying to render a UI that will rarely ever be used. Also, it’s highly recommended that you keep this computer connected via ethernet 24/7, and that you disable the function that puts it to sleep when the laptop lid is closed. Check the description for pointers on how to do that once you’ve installed the OS. Ubuntu Server LTS is arguably the most well-supported distro for this use case. We also tried Fedora Server and Debian for this video, but we found that Fedora Server wasn’t as well-supported by the packages we wanted to install, and that Debian’s defaults were completely insane. There is only one little quirk of Ubuntu Server we need to watch out for during installation, which is to uncheck “Set up this drive as an LVM group” when asked about partitioning your drive. If you were to leave that checked, it would split your drive into multiple volumes and not use all of it, and you would have to manually resize it manually, and it just complicates the process. You cold also set up Ubuntu Pro if you’d like, because it’s free for personal use and it has extra features, but it doesn’t change how this guide is carried out whatsoever. Now that we’ve installed Ubuntu Server, let’s get down to business. There’s a guide in the description for you to follow along with the instructions if you want. We’re going to be covering a few utilities in this video: Samba for network storage, Jellyfin for a media server, Wireguard as a VPN to your network so that you can access those two from anywhere, and lastly, as a little bonus, wake-on-LAN so that you can remotely access your machines from anywhere. Perhaps using ISL Light, the sponsor of this video. However, before you do any of that, there’s a really important thing you need to do, and that’s to reserve the **local** IP address of your home server in your router’s DHCP settings. That way, the IP is always going to stay the same and you’re going to know what it is, so that we can set up some utilities with it later. There isn’t one guide that encompasses many routers, so you’ll unfortunately have to do some Googling for this one, I’m sorry. The result we want is that your home server always has the same local IP address. Now that you’ve reserved that address, note it down cuz we’re gonna be needing it. From now on, we will be accessing your soon-to-be home server via SSH. Open a Terminal on your main computer and type in `ssh` followed by the username you set on your server, an @ sign, and the IP of your server that you just reserved. You’ll then be asked for the password you set during installation. You won’t see the password, so just input it, press Enter, and you’re in. This will be the main way you’ll be interacting with your machine from now on. Now let’s get to the good part, and set up some stuff, starting with network storage! Samba is a free and open-source implementation of the Windows SMB protocol, which allows network devices to be seamlessly connected to any Windows machine. It’s not limited to Windows, however, as macOS and Linux machines can also connect to Samba servers, and macOS can even use one for Time Machine backups. This means you can use the extra storage space on your home server as an extra storage space on your desktop! Depending on your local network speed, it could even be fast enough to run a light game or program from it. To install this, run `sudo apt install samba` on your server. Once that’s done, we’ll create a directory that will serve as the network drive, and also where we’ll place our files for the next tool as well. For this video, I’ll create this directory in `/media` and call it `myfiles`. Then, we’re going to have to change the permissions on this folder, so that we don’t run into any issues using Samba or Jellyfin later on. We’re going to run `sudo chown $USER: /media/myfiles` to make your user own this directory, so that all the programs you’re running can access it. Next up, we need to edit the Samba configuration file. Run `sudo nano /etc/samba/smb.conf` to start editing the file. Use the arrow keys to find the line that says “map to guest = bad user” and change it to say “map to guest = never”. This will avoid connection issues in the case that you accidentally enter in the wrong credentials on your client. At the end of the file, add the following lines which you can find in the guide in the description. You can change the path and the title according to your setup. Then, press Ctrl-X to tell Nano to exit, press Y for yes when asked if you want to save the file, and press Enter for the file name to keep it the same. Lastly, run `sudo smbpasswd -a <youruser`> and set a password for Samba. This will be the password you’ll use on client machines to connect to the network storage. Now, run `sudo systemctl restart smbd` to restart Samba and make sure your changes go through. Now, on your Windows PC, you can right-click This PC in the Explorer, and select Map network drive. Input two backslashes followed by the IP of your server, make sure it’s valid by clicking “Browse” and seeing if your files are in there as they should be, and voila! You now have network storage! You can see how much space is left on your server, you can manage the files on it, and you can access it from any device, even a Mac! On the Mac, you can connect to it by opening Finder, selecting Go from the drop-downs, and clicking Connect to Server, where you input smb:// followed by the IP of your server and click Connect. Now how about we populate that network storage with some media, and create a personal movies and shows database of [wink] legally acquired content with Jellyfin! Jellyfin is a free and open-source media manager, with a Netflix-like user interface that can be accessed either from the web or through dedicated apps on Windows, Mac, iOS, Android, Chromecast, and even some other smart TVs. It detects metadata for movies, shows, and even music, and categorizes them in a nice UI that anyone can easily use. I’ve taught my mom how to use this, so it’s officially mom-proof! Setting it up is as easy as running a single command, which is this: `curl https://repo.jellyfin.org/install-debuntu.sh | sudo bash`. After you run this, open a browser and go to your server’s address with :8096 next to it, as Jellyfin runs on port 8096 by default, and set it up to your liking. Since we made the folder /media/myfiles, we’re going to make a “movies” folder and a “shows” folder within that, so that we can use them for Jellyfin, while still being able to add our movies and shows through our SMB shared storage. Let’s point Jellyfin’s Movies directory to /media/myfiles/movies, and the Shows directory to /media/myfiles/shows. Now you can throw some videos in there and enjoy your local media library from anywhere in your network. And if you keep watching, you’ll be able to access it from anywhere in the world, so hit that like button if you’re starting to feel like Mr Worldwide up in here. Dale. Have you ever wanted a guard? For your wires, perhaps? Me neither. I don’t even know what that’s supposed to mean. But thankfully, Wireguard is just the name. Wireguard is a free and open-source virtual private network software that allows you to create a VPN to your home network so you can route all your traffic through it no matter where you’re connecting from. The term VPN has been diluted by marketing so much that many people don’t know what it actually means anymore. It doesn’t have anything to do with inherent privacy or paid services. It’s just a way to route traffic from one network to another, making it seem as if the traffic is coming from Network A instead of Network B. In our case, Network A is your newly set up home server, and Network B can be anything. We’re setting this up so that you can tell your phone, computer, or even Android TV, where your server is located, so that you can access it from anywhere. Now that we’re past introductions, let’s set it up. This process is a bit more involved than the other two, but you got this, I believe in you. Firstly, we’re going to set up Dynamic DNS. This will be a domain, or a web address, that will always point to the public IP of your home network. Chances are, you don’t have a Static IP address from your internet service provider, so it’s going to change periodically. Dynamic DNS will ensure your network will always be addressable from this URL, so that we can set up a VPN with it. We recommend DuckDNS for this purpose. It’s free, permanent, and quite user friendly. Shoot them a donation if you’d like, they’re doing great work! Sign into DuckDNS.org, I signed up with Google, and create a domain. Next, head to the “install” section and follow the instructions for Linux cron, as Ubuntu Server supports crontab. There are other ways to do this, but this is the most popular, and it works. Select the domain you just created and simply copy the commands one by one and follow their instructions. You’ll have it set up in no-time, and we can move on to port forwarding, so that we can set up Wireguard. Go into your router settings and forward port 51820 with the UDP protocol. There are links in the description to help you with port forwarding, I can’t help you with it once again because I don’t know what kind of router you have, and it’s different for every one of them. Now that we’ve forwarded the appropriate port, we’re going to be using PiVPN on our home server to install Wireguard and set it up to our liking. The PiVPN utility is meant to be used on Raspberry Pis, but since those run Debian, and we’re running Ubuntu, we can run it no problem. Run the command `curl -L https://install.pivpn.io | bash` and follow the prompts for Wireguard as shown on the screen. Don’t worry about the DHCP stuff in the installation, you’ve reserved your IP address in your router settings earlier. Leave the port as the default value, port 51820, which is the one we forwarded before. You can select any DNS provider you want, we’re going to scroll down to select CloudFlare. After this step is the important part - make sure to select “DNS Entry” instead of the IP address that shows up. Here, we’re going to input the DuckDNS address we made earlier. We also recommend enabling unattended upgrades, for extra security. Once you’ve rebooted your machine after installation, we’re going to run `pivpn add` and give a name to our client. It can be anything you want, really. Next, run `pivpn -qr`, and a large QR code will appear on your screen. Now go on your phone or whatever other device you want, and open up the Wireguard app. Add your configuration by scanning in the QR code on your screen, and Bob’s your uncle. You should call him… It’s been a while. From this point on, you can turn on the toggle switch that connects to your home network, and route all your traffic through there. If you can see that both “Data Sent” and “Data Received” are going up, the connection works. This means you can use something like Swiftfin to access your Jellyfin media from anywhere. As an added bonus, we can create a second configuration that will only route calls to your local network’s IP addresses through your VPN. This way, you can enjoy the benefits of your home server without slowing down your connection every time you want to do something on it, as any calls to the internet will go through your normal connection instead of the VPN. Scan the same QR code as before, but give it a different name. I prefer something like “Local Only”. Then, edit this configuration in this way: In the “Allowed Addresses” section, replace whatever is in there with your local network address range, and add /24 at the end. For example, my local network addresses start with 192.168.68.X, so I’m going to input `192.168.68.0/24`. Then, if you’re on an iPhone, scroll down to “On-demand activation”, enable both Cellular and Wi-Fi, and under the Wi-Fi section, exclude your home network’s SSID (that’s its name) so that this configuration doesn’t activate when you’re at home. Now, you can keep this configuration open all the time, and access your home server as if it’s a part of the internet! If you have an Android device, you can also add a quick toggle to enable it whenever you want. The hardest part is now behind us, soldiers. Now it’s time to awaken your trusty steed from its eternal slumber. Remotely! With wake-on-LAN. The way this works is: your computer’s Ethernet port stays powered on, even when your PC is off. If it detects a so-called “magic packet” being sent to it, it wakes your computer from its current state, whether it’s powered off or sleeping. At least, that’s what’s gonna happen if you’re lucky and your motherboard supports it. Most desktops do, and some enterprise-grade laptops as well, but you never know. Sometimes, it might only wake your computer up from sleep, not a complete shutdown. Also, Ethernet on your home server and your main computer is pretty much required for this step, unless you have a device with Connected Standby and your luck is casino-worthy. To set this up, you need to enable the Wake-on-LAN feature on the computer you want to remotely wake up. Go into your UEFI or BIOS settings, and look for something called “network wake,” “PCIe wake,” honestly manufacturers name things anything they want these days. Just look around, I trust you. If you can’t find anything, it’s either enabled by default, or not supported. Assuming you’ve now enabled the feature in your UEFI settings, open Device Manager on Windows and go to Network Adapters. Find your Ethernet adapter, typically Realtek or Intel. Double click it, go into the “Power Management” tab, and enable “Allow this device to wake the computer” and “Only allow a magic packet to wake the computer”. Now’s the time to find your Mac Address. No, not the YouTube channel. Your computer’s MAC address. To do that, right click the network icon in your taskbar tray, and click the doohickey that comes up that says “Network and Internet Access”. Go to your Ethernet connection’s properties, and take note of “Physical address (MAC)”. We’re done on the Windows machine front. Connect back to your server, and run `sudo apt install etherwake`. Once it’s installed, run `ip a` and take note which network interface your server is using. Whichever one says “UP” and has the IP address attached, that’s the one. Don’t get confused by `wg0`, that’s Wireguard, so ignore that one. Now, we’re going to set up some Siri Shortcuts to remotely wake your computer from anywhere. You can also do this on Android with something like Tasker, but I’m truly truly sorry for you. Make a new shortcut, and add a “Run script over SSH” action. Input this command `etherwake -i <your interface> -b <your:mac:address>` and fill in the gaps with the data you have from before. Where it says “host” you input your server’s IP, and input your server username and password so that SSH can connect to it. Your shortcut is now complete, and you can add it to your home screen if you’d like. The power of awakening is now bestowed upon you. Use it wisely, child, for it is no mere mortal ability. And hey, if you want to control your machine from anywhere, click the “i” in the corner to watch our video on remote desktop software! We have now successfully set up The $0 Home Server, so let’s recap. This humble old laptop, which used to be e-waste due to how weak it was, now serves as a VPN, a media server, *and* network storage for an entire house. Any computer on the network can mount network storage with ease, using SMB. Jellyfin allows this server to host movies and shows that can be played from anywhere, and that’s thanks to Wireguard acting as a VPN to the home network. Lastly, if you’re away and you want to wake up your old pal the Windows PC, you can do it quite literally at the click of a button, through Siri shortcuts and etherwake. And that’s not even scratching the surface of what you can do with a setup like this! There’s endless possibilities, so if you’re curious to know more, subscribe to Kalos Likes Computers so you don’t miss any future videos. We hope you’ve found this video useful, or at the very least, enjoyable. Thank you for watching! I’m Chris Kalos, I like computers, and I’ll see you next time.
Info
Channel: Kalos Likes Computers
Views: 796,823
Rating: undefined out of 5
Keywords: jellyfin, samba, smb, wireguard, vpn, home server, e-waste, kalos likes computers, klc
Id: IuRWqzfX1ik
Channel Id: undefined
Length: 16min 52sec (1012 seconds)
Published: Tue Sep 26 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.