this post was submitted on 27 Dec 2023
90 points (95.0% liked)

Selfhosted

40329 readers
412 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

n00b question, sorry. If I had a desktop that could hold 4 HD and 2 SSD, could I turn it into a NAS? Could someone point me in the right direction if this makes sense?

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 23 points 11 months ago (1 children)

Yep. Just install Linux, plug it into your router, set a static ip, and install the nas software ya want.

There are plenty of approaches. ChatGPT is great at debugging issues and helping ya through the setup. I did this with a raspberry pi and external usb drive the other week.

[–] [email protected] 7 points 11 months ago (1 children)

Nice, didn't realize a NAS could be on smaller hardware. Thanks for the info!

[–] [email protected] 11 points 11 months ago

Some people even use Raspberry Pis as their NAS. I use an old MacBook (5th gen i5) as a home server with 2 external hard drives as a NAS, which also runs a few docker containers like Jellyfin. Before that, I was using an old PC with 1st gen i3 for all these things.

[–] [email protected] 19 points 11 months ago* (last edited 11 months ago)

yes, try freenas/truenas

[–] [email protected] 17 points 11 months ago* (last edited 11 months ago) (2 children)

It'll work fine. A NAS is just a PC. Try Unraid if you want a user friendly UI. It costs money but it's only a one off payment for a lifetime license, and they have a free trial.

[–] [email protected] 5 points 11 months ago

+1 for unRAID. I did the same when I got tired of Netflix increasing prices while dropping content. Also got annoyed with my cable because it's expensive and good content is rare.

Bought a 12th gen i5 desktop on sale and 4 x 10Tb drives and installed unRAID on a USB key.

Easiest thing I've done in years and it's 100x better than Netflix and 1000x better than cable.

[–] [email protected] 2 points 11 months ago
[–] [email protected] 11 points 11 months ago (2 children)

You totally can, but since it will be on all day with 4 hdd look into wattages you want to live with. There are some small NUCs or Pi based NAS with low wattages. There is OpenMediaVault, FreeNAS/TrueNAS software to install

[–] [email protected] 2 points 11 months ago (2 children)

Hey sorry, thinking on this more, could I just turn on the NAS when desired? What is the benefit of running it constantly?

[–] [email protected] 10 points 11 months ago* (last edited 11 months ago) (3 children)

Yep, look into Wake On LAN if you just want to power the NAS on remotely.

My NAS also powers on at certaIn times of day and off again after a while - IF - no-one's connected / no network traffic / etc.

I do NOT need my NAS on at 3am...

Edit : forgot to say, check out OpenMediaVault

[–] [email protected] 6 points 11 months ago* (last edited 11 months ago)

Note that there is some reliability drawback of spinning hard disks on and off repeatedly. maybe unintuitively HDDs that spin constantly can live much longer than those that spend 90% of their time spun down.

This might not be relevant if you use only SSDs, and might never affect you, but it should be mentioned.

[–] [email protected] 2 points 11 months ago (1 children)

Stellar! Thanks for the info!

[–] [email protected] 4 points 11 months ago

You can also configure the HDDs to power down when they're not in use. HDDs are the biggest power consumer anyway.

load more comments (1 replies)
[–] [email protected] 4 points 11 months ago

You could totally turn on as needed, WakeOnLan is good for that. But typically when people run a NAS it is for streaming audio, video, file sync and backups and maybe docker running other services so the NAS is typically on 24/7 so it is available on demand. But it doean't have to be 100% uptime if you don't want it to be. For example I have two OpenMediaVaults one on a pi and one an old IomegaNAS. The pi is on always with an attached drive, and serves Samba Shares and DLNA/DAAP shares. Has docker running syncthing, CUPS print server, Trillium Notes, and homeassistant; so makes sense for it to be on all day, especially because my wife's system backsup to it daily automatically. The converted Iomega NAS is mainly a backup machine sInce it is old and not as performant (only has 100 network speed. So that gets turned on to do a bulk backup and not much else.

[–] [email protected] 1 points 11 months ago

Nice, good things to balance. Thanks for the info!

[–] [email protected] 7 points 11 months ago

Anything that can can provide storage attached to the network is a potential NAS. It doesn't take a lot of power to just offer and store files. If you start getting into stuff like live transcoding or heavy encrypt/decrypt that's a bit different matter.

[–] [email protected] 6 points 11 months ago (3 children)

No reason why not. May be a little power-hungry depending on the spec but if you already have it go for it. FreeNAS (now TrueNAS) is the usually suggested OS to run: https://www.truenas.com/freenas/

Since you have 4 HDD slots probably run 4 disks in a RAID 5 so think of how much space you need. RAID 5 is n-1 so if you have 4x 10TB drives you will be left with 30TB of space before formatting. You can calculate here: https://www.raid-calculator.com/

Then either mirror the SSDs for OS and caching or just use one. Depends on your budget really.

[–] [email protected] 2 points 11 months ago

Nice, thanks so much for the info!

[–] [email protected] 2 points 11 months ago (2 children)

Maybe I'm dumb but looking at wikipedia I'm a bit confused. Seems like you can do this on almost any linux distro. What is the reason behind setting up a dedicated OS, cost of operation, stability, performance?

[–] [email protected] 3 points 11 months ago (1 children)

kinda the same reason people suggest something like linux mint over slackware, gentoo, arch, etc… mint is easy to install and is preconfigured to be an easy to use user desktop environment. you can configure any other option to be have like that, but they tend to be a bit more “DIY”, which is great if you know what you’re doing!

dedicated NAS OSes will have good software out of the box that make it easy to configure and manage various common disk-related configurations (RAID, SMB, NFS, etc). you can certainly do all this yourself, but it might not have a pretty, unified user interface, or you might have to deal with software that isn’t compatible with some version of a library that’s in your distro of choice… all resolvable things, but they take time to solve: anywhere from installing a package manually to applying a kernel patch and recompiling the kernel to get something to work

load more comments (1 replies)
load more comments (1 replies)
[–] [email protected] 2 points 11 months ago

Power consumption is the main issue. If it's an old, power hungry desktop and you live somewhere with expensive electricity, it can be quite costly to run. If you have an energy efficient desktop or have cheap power then it will be fine. Just make sure it has a good quality power supply if it's going to run 24/7.

[–] [email protected] 5 points 11 months ago* (last edited 11 months ago)

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
LXC Linux Containers
NAS Network-Attached Storage
NUC Next Unit of Computing brand of Intel small computers
Plex Brand of media server package
RAID Redundant Array of Independent Disks for mass storage
SATA Serial AT Attachment interface for mass storage
SSD Solid State Drive mass storage
ZFS Solaris/Linux filesystem focusing on data integrity

[Thread #377 for this sub, first seen 27th Dec 2023, 01:15] [FAQ] [Full list] [Contact] [Source code]

[–] [email protected] 5 points 11 months ago

My NAS is just a very old Acer desktop from like 2011. I bought a Fractal Meshify 2 case which can hold I think 14 hard drives and moved the internals into that. Works great.

Eventually I had to get a pcie card for more data ports, and replace the power supply with one that’s more than 300w.

[–] [email protected] 4 points 11 months ago (1 children)

Another option is to use openmediavault.

I haven't looked at truenas.

[–] [email protected] 3 points 11 months ago (1 children)

TrueNAS is very good at being a NAS. I used it for some time but eventually moved to CasaOS because it's better at being a home server.

[–] [email protected] 2 points 11 months ago (1 children)

I hadn't heard of CasaOS before; looks very cool. I am currently on TrueNAS and it's been fine, but I had been running it in a VM because it wasn't a good fit for running other things along side it. This seems like an interesting solution, thanks!

load more comments (1 replies)
[–] [email protected] 4 points 11 months ago

Of course. Just put disks in and set up whatever remote filesystem and it's a NAS.

[–] [email protected] 3 points 11 months ago

My first NAS was an old desktop that I got for $300 running an FX-6300 and a GTX 550, I slapped a couple hard drives in there, installed Ubuntu, and made an SMB share.

I'd recommend installing TrueNAS Scale on a system rather than doing what I did in part due to it being so much better than what I was doing, but you could run it on a potato if you wanted.

Hell my latest NAS upgrade is going from a PowerEdge T610 (tower server from like 2010ish) running TrueNAS Scale to a normal desktop (from 2017) running TrueNAS Scale

If anything using normal desktop hardware makes servicing it easier than using old server hardware

[–] [email protected] 2 points 11 months ago (1 children)

Unraid is a great option for anyone, but beginners in particular. It does, however, cost money and isn't open source.

[–] [email protected] 1 points 11 months ago

Thanks for the resource, might be good to at least research. Thanks!

[–] [email protected] 2 points 11 months ago

This is what I do, using proxmox.

I do something similar to https://youtu.be/Hu3t8pcq8O0 for the NAS bit. Then I have a VM with docker containers for different services

[–] [email protected] 2 points 11 months ago

Yes most hardware can be a server, but i recommend hdds thats made for nases!

[–] [email protected] 2 points 11 months ago (1 children)

A NAS is basically some software running on a computer, so you can use a desktop as that computer, ideally with a light operating system (for example, Linux in text only mode).

HOWEVER: desktops are designed for far higher computational loads than needed by a NAS, plus things like graphical user interfaces and direct connection of user peripherals such as mice, so even when idle they consume a lot more power than the kind of hardware used in a typical NAS.

Also the hardware in a good NAS will have things like extra higher speed connectors for HDDs/SDDs (such as SATA) rather than you having to use slower stuff like USB.

So keep in mind that a desktop as NAS will consume significantly more power than a dedicated NAS (as the latter will probably be running on something like an ARM and have a power source dimensioned for a couple of HDDs, not to run a dedicate graphics card like a desktop has) and probably won't fit as many disks.

If you're ok with having most disks be accessed a bit slower and USB3 work for you (and, for example, if your NAS is on 100 Mbit Ethernet, it's the network that's the slowest thing, not USB3) then it's usually better to use an old notebook rather than desktop because notebooks were designed for running of batteries hence consume significantly less power.

Frankly I would advise against using an old desktop as NAS mainly because in a year or two of continued use you'll have paid enough in extra electricity costs vs using a NAS to pay for a simple but decent dedicated NAS.

[–] [email protected] 2 points 11 months ago (1 children)

If they were to run some applications on the side it would validate the power usage. Like if it also was a Plex server it could be more reasonable to use more power.

Could also really hinge on the electricity cost for their region. At 10 cents a kwh and a delta of 100 watts we'd be talking 87 dollars a year assuming it's always running at a delta of 100 watts.

I doubt there will be a 100 watt delta especially newer architectures that idle really well.

[–] [email protected] 2 points 11 months ago* (last edited 11 months ago)

Whilst a 100W delta seems unlikelly, a 50W delta seems realistic as the kind of stuff you have in a NAS will use maybe 5W (about the same as a Raspberry PI, possibly less) whilst the typical desktop PC uses significantly more even outside graphics mode (part of the reason to use Linux in text mode only is exactly to try and save power there). It mainly depends on what the desktop was used for before: a "gaming PC" with a dedicated graphics card from an old enough generation (i.e. with HW from back before the manufactures of GPUs started competing on power usage) will use signiificantly more power than integrated graphics even in idle mode.

That said, making it a "home server" as you suggest makes a lot of sense - if that thing is an "All In One" server (media server, NAS, print server, torrent download server and so on) loaded with software of your choice (and hence stuff that respects your privacy and doesn't shove Ads in your face) it's probably a superior solution to getting those things as separate standalone devices, especially in the current era of enshittification.

[–] [email protected] 2 points 11 months ago* (last edited 11 months ago) (1 children)

Yes, you can. What do you want to use it for? If its just a NAS you could use TrueNAS but if you want more services I would use proxmox.

If you are wanting tiered storage (ie SSDs as cache) then TrueNAS is probably the right answer as it uses ZFS and is very flexible.

[–] [email protected] 1 points 11 months ago (1 children)

Just a question but do you use proxmox yourself? And if yes, what services would you recommend to run?

[–] [email protected] 2 points 11 months ago (1 children)

I'm not sure I can recommend anything without knowing your goals. For me my needs quickly outgrew my little mini PC and now I have a cluster with a few single board computers. Here's a basic list of what I run:

Dell workstation (proxmox):

  • Linux Mint
    • GPU and USB passed though via Virtio with a sata to USB adapter for connecting the bluray drive
    • Used as a desktop and is an alternative to my laptop.
    • It also hosts Jellyfin in a podman container
  • Docker 0
    • Nextcloud
  • TrueNAS
    • This is a TrueNAS VM with a dedicated sata controller passed though to it. Its used for storage for nextcloud and jellyfin.

Mini PC (proxmox)

  • landmass

    • this is a simple LXC container to act as a wireguard client with a caddy proxy. It allows me to access my HDhomerun as it is in another building (long story)
  • caddy

    • this used to be for accessing my homerun but is now just for remote access via ssh.
  • outside access

    • this is a VM that connects to the VM in linode to route traffic. It runs Ngnix proxy manager and is a wireguard client.
  • docker1

    • this hosts Matrix and Drupal. Matrix is basiclly unusable for me because as soon as I start joining rooms the resource usage shoots though the roof and it sometimes crashes
  • Linode

    • I have a VM in Linode that routes traffic into outside access via wireguard. It also runs Ngnix proxy manager.
  • Friendlywrt

    • I have a Nanopi that acts as a firewall and dhcp server to isolate everything.

This is a incomplete list and doesn't include my firewall rules or other security measures. I also run Debian on all VMs as it is easy to setup and maintain. If you are looking for somewhere to start I would start by installing nextcloud in a docker container. Proxmox will scale the best but if you are just looking to learn I would install Debian and docker compose. TrueNAS is great for a NAS but its designed to be an appliance so it can be limiting.

[–] [email protected] 1 points 11 months ago

Great rundown, thanks!

I don't have a background in software, but I think I'm doing okay with my Raspberry Pi's so far.

And I'm looking for more challenging stuff, so this was very helpful.

[–] [email protected] 2 points 11 months ago (1 children)

My NAS is an mATX mobo with an i5, 64G RAM, 8 disk drives, 3 nvme drives, and an ARC GPU for video transcoding.

Disk drives are all mirrored. One nvme runs NixOS which is easy enough to redeploy if the drive dies. One nvme is cache on top of the disk drives. Last nvme I use for temp fast storage like Jellyfin transcoding.

Its more of a combo NAS/server as I run most self hosted apps on it (tor node, monero node, jellyfin, *arr stack, etc).

[–] [email protected] 1 points 11 months ago

I just got an arc for jellyfin transcoding. Could you tell me more about your setup for that?

[–] [email protected] 1 points 11 months ago (1 children)
[–] [email protected] 1 points 11 months ago
[–] [email protected] 1 points 11 months ago

Sure. My NAS I use for backups is also made from ancient desktop PC running ownCloud. The system is slow-ish by today's standards, but since I had it already, I could invest in bigger SSD for data storage.

[–] [email protected] 1 points 11 months ago

Unraid as I understand it will do that

load more comments
view more: next ›