Self Hosting Thoughts

I have decided to self host a server rather than using all these cloud services and I would appreciate any thoughts on the matter.

I have a couple older desktops, but I would imaging they are 5th or 6th gen chips. I assume I should use a dedicated PC that only runs the server and has it’s own storage or can I just have a stand-alone NAS for storage?

There is a ton of information out there with a variety of often conflicting information so I am just looking to sort of ground myself and map out a plan to move forward. Any suggestions would be appreciated.

1 Like

I am a fan of self-hosting - but I don't currently have a dedicated self-host thing over the LAN at the moment. A :raspberry_pi: Raspberry Pi use to have that job, but that was decommissioned years ago.

For the hardware and operating system, it depends what you're self hosting - Just file storage? Docker containers (running useful services like PhotoPrism, Jellyfin, Nextcloud)?

The older (headless) desktop should be sufficient. It could run Ubuntu Server (I personally prefer Debian) if you're comfortable with the command line / SSH and configuring each service manually. Or you could go with Ubuntu MATE if you prefer a GUI rather than remotely managing it headlessly.

A NAS enclosure might be easier to physically set up, with its "batteries included" and storage bays, although some brands are proprietary and you're at mercy of their software solution and security.

There's dedicated OSes like TrueNAS Scale (Community) (based on :debian: ) which has a community built around it designed for your use case. That's like having a stand-alone NAS, but it's your hardware and you're in control of the software. I'd probably recommend this route.

Is it hardware or software specifically that you need advice with?

3 Likes

Hardware. I guess I was wondering if an old desktop with like 16 - 20tb of storage would work. When you say headless, I am assuming you mean no input devices or monitors just accessing remotely?

I really just want to be able to keep all my files in one place and be able to access them through any device in my home network.

1 Like

Are you wanting redundancy (RAID) with that storage? If you do, and/or if you pick an OS like TrueNAS Scale, it'll need to format those drives - in case you've got data on them already.

What are the other specs? Like RAM and Ethernet speed? I imagine it'll be a low-traffic with few users/devices. The specs would largely affect how fast server is at serving files, but probably not by a large amount unless everyone accesses large files concurrently at once.

Yep, headless = no monitor or input. The kind where a machine hums in a corner, possibly collecting dust 24/7! :smiley:

SMB (and maybe DLNA if you have a smart TV) are probably the protocols that are universal enough for most devices.

3 Likes

For software, I would look at Nextcloud. It’s easy to install and setup using the snap. In other words it sets up the LAMP stack and hooks everything together for you. You can install clients on any device and it will automatically keep everything synced up.

For hardware I prefer a laptop over any desktop machine or even a Raspberry Pi. A desktop runs around 30 watts at idle, an RPi around 5 and an old laptop around 2 watts. My current setup averages 1.2 watts on average. Idle power consumption matters for me since the server is running 24/7 and sitting on idle 99+ percent of the time.

On top of the low wattage consumption, laptops come with a battery which is your UPS.

3 Likes

How do you handle storage if you are using a laptop? Do you use and external drive or something in an enclosure?

1 Like

Nothing fancy, really. Not sure I am interested in RAID. I thought I would use an external drive to backup my server. Something I could unplug and move to a safe incase of a disaster life a fire or something.

1 Like

I replace the internal laptop drive with a size I want and use that.

I have my work machine with important files that I want to have backups. These automatically get synced to the laptop server. If I want another backup, I turn on another machine that syncs with the server and now I have 3 copies of all my files. If I make changes on the third machine they get pushed out to the server and the 1st machine. All three machines have a local copy. You can make another copy such as to an external drive on any of the machines.

You can also run a machine as a thin client where it has no local copy and you can edit documents on the server. You can also access through a browser.

3 Likes

So let me ask you this, I have a laptop I use with my desktop in the office. The laptop is running with Linux and a Desktop with Windows and I use a KVM to switch between the two. My laptop is mainly used for my ham radio addiction, but I am wondering if I can continue to use it as my ham radio laptop with UM, then add something like Nextcloud and run it like a server?

1 Like

I don’t see why not. I think it would depend on the load of the ham radio apps. Nextcloud as a file server is pretty light. I’ve used laptops with 4 Gb RAM and it’s more than enough. I use mine as a print server also. I run it on U-MATE.

2 Likes

Thanks everyone! I appreciate the input.

1 Like

I run a server running Ubuntu MATE. I stood it up when I was working for pretty much the same reasons you mention. I needed to be able to run multiple VMs to demonstrate software, so I needed a fair amount of horsepower and storage. I'm quite happy with the result.

COVID was the motivating factor, as it forced everyone out of the office and into our homes. I bought a server-class Dell R710 off eBay (2 six-core Intel Xeon processors, 64GB RAM and 8TB HDD, which I have expanded to 20TB. I have a licensed version of VMware Workstation and licensed versions of Windows Server 2019, so it's not uncommon for me to be running as many as five VM servers at a given time. All in the comfort of my office!

Here's the amazing part: The server in its base form (before adding more storage) ran me a mere $267US, which included shipping and handling. I've upgraded the BIOS and UEFI (to accommodate the added storage) and replaced one of the redundant cables (my server has four NICs, four fans, two power plugs, and redundancies galore!). All in all, I think I've spend less than $500US for the server hardware.

I don't know what cloud services you're using, so you'll have to adjust as necessary. I've added Plex (which I'm now migrating to Jellyfin) and tinker a bit with programming the odd job or two, but not much else. I don't sit at the monitor but rather use a remote desktop connection via xrdp which I had to set up, I'm currently in my living room typing this on my laptop which is connected to my server on which I'm running Brave Browser.

It's been a wonderful experience. But I caution you, if you're not into tinkering and configuring, it may be a hair-pulling time until you get everything set up. Go for it!

4 Likes

Good news is I am into tinkering and configuring!

Thanks for you info. While I am intrigued with the laptop idea, I do take the laptop out with me for different ham radio events or when I go camping so I was not 100% sold on that idea and I was leaning towards using an old desktop. Now I will have to at least explore something like the Dell R710.

As usual, the community has provided me with lots of great insite. Now I just have to figure out which on works for me.

Thanks again!

1 Like

That doesn't sound right to me at all; I see <1W at idle on my Pi 4B, and that's one of the more power hungry units - something like a Pi Zero would use even less (but obviously, might struggle in some use cases).

2 Likes

The 5 watts was measured.

Details:

RPi 4, SATA ssd used for storage through a usb port, active cooling case, ethernet.

I’ve never had a Pi 4 get anywhere close to 1 watt idle. I can’t explain our differences.

1 Like

The biggest problem I’ve had using U-MATE as a server is keeping it updated. When it phones home and gives you the pop-up (under) that notifies you that updates are available, the power consumption goes from 1.1 watts to about 4.5 and stays there until you take action.

I’m trying to figure out what to do about it. A weekly chron job, Ubuntu ONE, or something else.

I’ve tried using just Ubuntu server rather than U-MATE but getting it into a low power state that laptops can achieve is challenging. For instance, how do you turn off the screen and stay running in the server version when you close the lid? With U-MATE it’s a battery setting.

1 Like

Don't know if your context would benefit from this, would setting your CPU Frequency at a fixed, specific "low" value be acceptable, or do you need to let it range up and down to meet on-demand loads?

If a fixed frequency (power management) setting is acceptable, I invite you to review the 2nd and 4th link in the following posting:

Otherwise, once you've identified the specific process which is causing the 4.5 W consumption, you could use a system command (I think it involved "cgroups") to impose a quota on CPU usage which would constrain that power consumption. Unfortunately, I don't know anymore on the topic of cgroups. :frowning:

I don't know if there is anything helpful in this next resource, but you might want to give it a once over to see what it covers and how it recommends implementations:

1 Like

You might look into disabling the unattended upgrade service. First, check to see if it's running:

sudo systemctl status unattended-upgrades.service

If it's running, stop it.

sudo systemctl stop unattended-upgrades.service

To keep it from restarting on reboot, disable it.

sudo systemctl disable unattended-upgrades.service

Once done, open the auto-update configuration file using the following command:

sudo nano /etc/apt/apt.conf.d/20auto-upgrades

And change the value of APT::Periodic::Update-Package-Lists and APT::Periodic::Unattended-Upgrade to zero (0):

Save changes and exit from the nano text editor.

To verify the changes, use the following commands one by one:

apt-config dump APT::Periodic::Update-Package-Lists
apt-config dump APT::Periodic::Unattended-Upgrade

It should give you the following output:

APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Unattended-Upgrade "0";

3 Likes

From my knowledge, problems doesn’t come from computer, but from your internet connection. Ensure it’s very reliable

1 Like

Thanks for the links. I’ll check them out when I have the time.

The cause of the problem is the pop-up window that notifies you that updates are available and would you like to install them. Since it’s waiting for an answer, it’s polling the system for a response.

1 Like