31 votes

I've been looking into self-hosting, what's the best cost-efficient option?

I host a couple of very small websites for personal stuff and a Foundry server for my weekly RPG. Not exactly resource-intensive. And I've been paying for webhosting for a while for it, and it just feels unnecessary.

I always figured when I finally decided to do it, I'd just grab a Raspberry Pi and go to town. But they're... weirdly expensive. The Zero 2 W is sold out everywhere, they have insane resale prices, and you still need to essentially buy the 'kit' first time to have most of the stuff to set one up. So is it worth it?

I've been toying between that or just grabbing an old server off craigslist or Facebook Marketplace for $25-$30 and just going to town from there. What do you guys recommend?

28 comments

  1. [3]
    mat
    Link
    I recommend paying a web hosting service. You can get low-end web hosting for a few $$/££/etc a month. AWS's bottom end tier is free for a year then essentially free if you don't use many...

    I recommend paying a web hosting service. You can get low-end web hosting for a few $$/££/etc a month. AWS's bottom end tier is free for a year then essentially free if you don't use many resources (you'd probably pay less than $1 a month)

    You'd easily spend that on electricity just keeping your little server on - a Zero really isn't up to the job btw, you want a Pi3/4 really. It'll take much longer to pay back the cost of buying the hardware and all the time your uptime, transfer speed and latency are all dependent on your home connection, none of which it is optimised for.

    Then you have to faff about making sure your server is up to date and secure and so on. Which maybe you'll enjoy, but maybe it's a pain you don't want to bother with.

    edit: the Pi Foundation are getting their supply chains sorted out, they're very easy to come by in the UK now (they were not a few months ago) but I imagine that might take a while to filter down to elsewhere, so pricing may remain wobbly for a while yet. Maybe waiting a little while if you do decide you want a Pi is the way to go.

    21 votes
    1. [2]
      venn177
      Link Parent
      Well right now I'm paying $70 per year for hosting and $18 for the domain. I assumed a mostly idle server wouldn't pull all that much in power.

      Well right now I'm paying $70 per year for hosting and $18 for the domain.

      I assumed a mostly idle server wouldn't pull all that much in power.

      5 votes
      1. mat
        Link Parent
        You can pay a lot less than that if you shop around. Although the domain cost won't change with home hosting, so you can't really save there. A Pi4 will draw somewhere between 3-15W. Let's call it...

        You can pay a lot less than that if you shop around. Although the domain cost won't change with home hosting, so you can't really save there.

        A Pi4 will draw somewhere between 3-15W. Let's call it 8W on average. That's 70kWh a year. Which for me would cost £25 ($30) or so, depending on what future energy prices get up to, of course - last year would have cost rather more! So you do end up saving some at your current costs.

        But then there's the cost of the hardware up front. Plus the time cost of setting it up, then keeping it all up to date and working. Which might not be much but there are security issues coming along all the time that need minor action. Having ports - especially http ones - on your home connection open to the internet requires some degree of vigilance.

        I think that unless you are particularly interested in doing web hosting, web hosting is just easier to pay a tiny amount to someone else and have them do all the boring stuff. Linode host my websites and them handling even just one or two OS upgrades a year makes £7/month worthwhile for me. I do also have requirements for availability and speed that a home connection can't handle, so home hosting isn't really an options anyway.

        20 votes
  2. 3d12
    Link
    I can't offer much advice, since everyone's situation is a little different, but keep in mind that the Pis have an ARM processor, and not all the software you want to use may be compatible. If...

    I can't offer much advice, since everyone's situation is a little different, but keep in mind that the Pis have an ARM processor, and not all the software you want to use may be compatible. If source is available you can usually compile for your specific target, but don't expect software to work out-of-the-box as much as using x86-based hardware.

    For what it's worth, I would trust a refurb from some place like woot.com more than a rando on FB/Craigslist. Or better yet, a local PC shop if you have one that won't price-gouge you on some last-gen tech.

    Power consumption is definitely a good consideration too, my oldest server was a desktop from 2008-ish that pulls 6A (!) which is way too much for a headless server, so it got replaced this year with something a lot more power-efficient. But of course, you can switch out the power supply on whatever chassis you find if you're so inclined, and that could be a good way to mix-and-match your way to some savings. 🤷

    6 votes
  3. [4]
    pondfrog
    Link
    Oracle Cloud has a really nice permanent free tier. It gives you 4 compute cores, 24GB of memory, and 200GB of storage, which is more than enough for a lot of hobby projects. I use it to self-host...

    Oracle Cloud has a really nice permanent free tier. It gives you 4 compute cores, 24GB of memory, and 200GB of storage, which is more than enough for a lot of hobby projects.

    I use it to self-host my photo backups with Immich (a Google Photos alternative) and to occasionally host a private Minecraft server for me and my friends. Works pretty well.

    6 votes
    1. [2]
      adorac
      Link Parent
      I've heard they sometimes delete free accounts with no reason or warning, so I'd be careful about its reliability personally.

      I've heard they sometimes delete free accounts with no reason or warning, so I'd be careful about its reliability personally.

      7 votes
      1. shrike
        Link Parent
        They shut down servers during load balancing, I think you can avoid it by adding your credit card to their system. They won't bill it but it proves you're "real".

        They shut down servers during load balancing, I think you can avoid it by adding your credit card to their system. They won't bill it but it proves you're "real".

        1 vote
    2. Weldawadyathink
      Link Parent
      Some more helpful info on using the Oracle free tier: as @adorac mentions, they sometimes mess around with free tier accounts. And they have a very small selection of virtual machines set aside...
      • Exemplary

      Some more helpful info on using the Oracle free tier: as @adorac mentions, they sometimes mess around with free tier accounts. And they have a very small selection of virtual machines set aside for free tier usage. In most of their data centers, there are so few ampere free tier machines available that it is nearly impossible to get one. Here is a reliable method.

      1. Open an oracle account and wait through the 1 month free trial.
      2. Convert your free account to a paid account by setting up billing. This might be scary if you are trying to avoid paying any money at all. If you are careful you can still avoid all costs. If you are less careful, you can still avoid almost all costs.
      3. Create a new VM that fits within the free tier specs. For the Ampere VM, it won't show a "Always Free" label in the interface. Despite this, you still won't pay for it.

      I have been running a paid oracle account setup this way for a few years now. Since it is a "Paid" account, I don't think Oracle will treat it as poorly as they treat free accounts. The bill each month is $0, except for a few times where I experimented with more than 200 GB storage.

      3 votes
  4. [5]
    stimularity
    Link
    Cloud flare offers a ton of free services like pages which you can use to quickly stand up a website. If you are hosting from home, cloud flare tunnels are the greatest thing ever. No one talks...

    Cloud flare offers a ton of free services like pages which you can use to quickly stand up a website. If you are hosting from home, cloud flare tunnels are the greatest thing ever. No one talks about cloud flare tunnels for some reason.

    You run the service, then point a domain and URL at that local IP and port. Thats it, your service is live and proxied so you dont expose your IP. Its all through port 80 or 443 so you dont need to open ports. They assign SSL certs for you so you dont need to mess with that. You dont need to manage routes localy with NGINX. Just run a service on your local server and set up the tunnel. Done. Highly reccomend.

    6 votes
    1. [4]
      thermopesos
      Link Parent
      I’ve been using cloud flare tunnels for some non-sensitive data hosting, but am thinking about setting up a Nextcloud instance with personal storage. Do recommend any other steps outside of unique...

      I’ve been using cloud flare tunnels for some non-sensitive data hosting, but am thinking about setting up a Nextcloud instance with personal storage. Do recommend any other steps outside of unique password combos to secure data once exposed through the tunnel? It seems too easy..

      3 votes
      1. stimularity
        Link Parent
        I'm no security expert. Obviously set strong passwords and keep your next cloud instance up to date, avoid weird plugins. You can also set up MFA. And lock down your network. Since tunnels...

        I'm no security expert. Obviously set strong passwords and keep your next cloud instance up to date, avoid weird plugins. You can also set up MFA.
        And lock down your network. Since tunnels forwards all traffic through ports 80/443 you can close everything else.

      2. [2]
        Bwerf
        Link Parent
        Not Cloud flare specific, but keep separate accounts for daily use and administration, consider setting up so the administrative accounts can only be logged in from a specific ip range (your home...

        Not Cloud flare specific, but keep separate accounts for daily use and administration, consider setting up so the administrative accounts can only be logged in from a specific ip range (your home machine, your isp, your country, whatever makes sense), its ok to have extra cumbersome steps to the administrative accounts, because you wont be using them as often and if they get compromised you will lose more.

        1. thermopesos
          Link Parent
          This seems obvious, but isn’t something I would have considered doing from the get go. Thanks for your input!

          This seems obvious, but isn’t something I would have considered doing from the get go. Thanks for your input!

          1 vote
  5. [6]
    g33kphr33k
    Link
    Domain names via NameCheap are usually the cheapest, and some of the newer TLDs are silly cheap. As for the self-host, you could use a router type box, and it'd be more than enough power for what...

    Domain names via NameCheap are usually the cheapest, and some of the newer TLDs are silly cheap.

    As for the self-host, you could use a router type box, and it'd be more than enough power for what you want. Something like this: https://www.aliexpress.com/item/1005004880536701.html

    It'll take almost 2 years to break even, but it's the fun along the way that you can have that matters.

    5 votes
    1. [5]
      jackson
      Link Parent
      While you may get a better first-year deal from Namecheap, Cloudflare has the cheapest renewals typically since they sell the domains at-cost.

      While you may get a better first-year deal from Namecheap, Cloudflare has the cheapest renewals typically since they sell the domains at-cost.

      6 votes
      1. [4]
        g33kphr33k
        Link Parent
        And there's nothing wrong with changing registrar's yearly like you should with insurance.

        And there's nothing wrong with changing registrar's yearly like you should with insurance.

        4 votes
        1. [3]
          venn177
          Link Parent
          This never even occurred to me. I've had the same domain for like 10 years, and it was cheap enough that I didn't think it was even worth changing. Is it as easy as insurance to 'shop around' for...

          This never even occurred to me. I've had the same domain for like 10 years, and it was cheap enough that I didn't think it was even worth changing.

          Is it as easy as insurance to 'shop around' for a cheaper registrar?

          4 votes
          1. dysthymia
            Link Parent
            It definitely is. E.g. check here for a price comparison of .eu domains. The process is just picking a registrar, initiating a zone transfer with a transfer code from your old registrar, and...

            It definitely is. E.g. check here for a price comparison of .eu domains. The process is just picking a registrar, initiating a zone transfer with a transfer code from your old registrar, and grabbing a backup of your dns records (if any) to import them to your new registrar. It will take 1-2 working days but you shouldn't have any downtime at all, because until your new registrar starts working, you'll be using your previous one.

            5 votes
          2. Weldawadyathink
            Link Parent
            Here is some info that took me a bit to figure out with domain transfers. Any time you transfer a domain name, you will have to purchase another year for that domain. But that is not a year from...

            Here is some info that took me a bit to figure out with domain transfers. Any time you transfer a domain name, you will have to purchase another year for that domain. But that is not a year from when you transfer. It is a year from the old expiration of the domain name. So you don't loose anything by transferring as much as you want. I have a domain that is paid out like 2 or 3 years because I transferred it a few times fairly quickly.

            2 votes
  6. arch_mage
    Link
    I use fastmail for email with custom domains. As a part of the service, they can host simple websites for you. Its a free option if already using fastmail

    I use fastmail for email with custom domains. As a part of the service, they can host simple websites for you. Its a free option if already using fastmail

    5 votes
  7. CaptainMagma
    (edited )
    Link
    I went through a similar thought process. Like you, I found that the Pi needs additional peripherals to be useful and that really pushes up total cost. I also ruled out cloud providers because I...

    I went through a similar thought process. Like you, I found that the Pi needs additional peripherals to be useful and that really pushes up total cost. I also ruled out cloud providers because I wanted to own my hardware and not deal with all the strings attached to cloud "free" tiers and instance configs.

    For me, I knew my needs would grow from web hosting to media serving and personal backup, and was looking to dip my toes into homelabbing, so I bought my own hardware and can share a starting point for that.

    An off-lease machine (usually an optiplex, prodesk/elitedesk, or thinkcentre) is a prebuilt computer some office or school was throwing away, so it's 1. really freaking cheap and 2. practically plug-and-play. You basically need to worry about buying a boot disk and power cable. The sweet spot for me was:

    • 7th gen intel or later (Kaby Lake was the first generation to include hardware decoding for HEVC 10-bit)
    • SFF form factor (has room for multiple SATA devices and m.2 slots)
    • HP Elitedesk 800 (has 2 3.5" disk slots where most SFF machines have only 1, and you can shove a 3rd in there if you're willing to give up the space above the PCI ports)

    You can easily find a Kaby Lake SFF machine for $60-80 on eBay, or cheaper if you are ok with going older to Skylake or Haswell. USFF (mini/micro machines similar in size to the Pi) are usually around the same price. I don't know what's available on your local craigslist but the serviceability of these business-oriented models is way above that of consumer-grade hardware.

    How much the initial cost of buying the hardware matters depends on how long you intend to use it. You also have to factor in the cost of operation (mainly electricity) for your hardware. I usually see idle power of 35W for my box, and that's with an i5-8500 and 3 SATA drives. That's about 305kWh yearly, which costs me about $40 or so. So if you spend $60 on the hardware and keep it for 2 years, you come out ahead of where you are right now and you have something you can easily expand later.

    4 votes
  8. MetaMoss
    Link
    If you've got the space for it, then going for hardware that's available and affordable should serve your needs just fine. Personally, I just upgraded from an old Pi 2 to a gaming laptop I had...

    If you've got the space for it, then going for hardware that's available and affordable should serve your needs just fine. Personally, I just upgraded from an old Pi 2 to a gaming laptop I had sitting around, which for my developing home server setup has been a welcome bump in power.

    3 votes
  9. mild_takes
    Link
    Probably not worth it if you're getting gouged. Go to a Pi4 or 5 IMO, they are somewhat available now. If you do want a Pi Zero2 AND you're in Canada I'd be willing to ship you one for MSRP +...

    The Zero 2 W is sold out everywhere, they have insane resale prices, and you still need to essentially buy the 'kit' first time to have most of the stuff to set one up. So is it worth it?

    Probably not worth it if you're getting gouged. Go to a Pi4 or 5 IMO, they are somewhat available now.

    If you do want a Pi Zero2 AND you're in Canada I'd be willing to ship you one for MSRP + shipping. I was able to get a few at the initial launch.

    2 votes
  10. PuddleOfKittens
    (edited )
    Link
    The cheapest piece of hardware you'll find is some old PC under your bed. If you buy a laptop it'll be designed to minimize power use, and will have a built-in UPS, keyboard and monitor for...

    The cheapest piece of hardware you'll find is some old PC on ebay. under your bed. If you buy a laptop it'll be designed to minimize power use, and will have a built-in UPS, keyboard and monitor for configuring it.

    2 votes
  11. mxuribe
    Link
    @venn177 Over the years, I have traditionally hosted several static websites as well as a personal instance of NextCloud on small virtual private servers offered by the likes of Digital Ocean,...

    @venn177 Over the years, I have traditionally hosted several static websites as well as a personal instance of NextCloud on small virtual private servers offered by the likes of Digital Ocean, Linode, Hetzner, etc. Several months ago i moved my nextcloud instance to my own homeserver (hosted from my home)...mainly because for my small family the meek performance of small virtual servers on some "cloud provider" were sufficient from performance perspectiuve...but i kept running out of storage space (think: family members loading up their big photos, files, etc.). Well, nowadays i keep the static websites on the same legacy cloud provider, and host nextcloud from home...and my nextcloud server lives on a small old desktop that i simpl,y maxed out the ram...so its leagues more powerfful than what i was getting from cloud provider and tons more storage...though now i have to pay minuscule electricity (again, its a small efficient desktop, and not some rack-mopunted server). My cloud provider monthly bill got cut in half! Now, as others noted, if i really wwanted to sacve more money, i could move my statuic websites to be hosted on free or almost free options like Github pages or CloudFlare, etc...but my cloud provider costs for these websites is low enough, that i think i have found a noice balance of some cloud hosted things and some self-hosted/home-hosted things. Maybe consder if you can do a hybrid approach (both on cloud and on-prem...like enterprises sometimes do)? Reach out if you jhave any questions. Good luck!

    2 votes
  12. UP8
    Link
    Circa 2001 I was working with an MIT MBA who'd worked with the McKinsey group to make a voice chat service for the Brazilian market. The CEO was a genius at finding web hosting situations that...

    Circa 2001 I was working with an MIT MBA who'd worked with the McKinsey group to make a voice chat service for the Brazilian market. The CEO was a genius at finding web hosting situations that were a lot cheaper than what other people were paying but every couple of months we'd hear our web hosting company was going out of business or that owner was kicked out of the data center and moving his racks to his house and one way or another we'd have a crisis. It was a good thing we kept backups!

    I can't say I've been involved with any situation that unstable ever since but it was a harrowing enough experience that I'd question whether you are thinking straight if you are putting cost ahead of everything else.

    2 votes
  13. ulkesh
    Link
    If you're looking for something in the range of $25-30, then I wish you luck. Self-hosting that is reliable, to me, requires some up front cost. I just stumbled upon this seemingly pretty cool...

    If you're looking for something in the range of $25-30, then I wish you luck. Self-hosting that is reliable, to me, requires some up front cost. I just stumbled upon this seemingly pretty cool device. I have not bought it so I cannot tell you how good it is, but the cost (inexpensive to me) and expansion capabilities are rather nice.

    Also, if you want an easy-to-configure system that supports NAS-like storage (if you wish to expand at some point beyond just self-hosting a website), take a look at UnRAID (does have one-time cost per USB stick, which the license can transfer to another USB stick if needing to replace). It's a nice system that boots and runs off a USB stick, with VMs and Docker container applications as options. For example, I run all of the following on my setup (I'm using an older desktop PC as my server):

    • PiHole via Ubuntu VM
    • Redis
    • Adminer
    • MariaDB
    • Postgres
    • Scrutiny (webapp that shows hard drive health information)
    • ZNC (IRC bouncer)
    • Syncthing
    • Duplicati (for backup to Backblaze)
    • Authelia (for SSO of some of my internet-based services)
    • Homebridge
    • Nginx
    • Nginx-Proxy-Manager
    • Dashy
    • Plex
    • ...etc
    1 vote
  14. WobblesdasWombat
    Link
    Like others have said it depends what you want to do. I would like to suggest, however some beefier options. Old computer, if you have an old tower or laptop laying around just use that. Slap...

    Like others have said it depends what you want to do. I would like to suggest, however some beefier options.

    1. Old computer, if you have an old tower or laptop laying around just use that. Slap Ubuntu, Rocky, Debian, etc and you've got a shiney new server
    2. But a mask with compute. Synology, TerraMastee, Buffalo this option gets you on local hosting and an easy way to host apps in your home without turning into a part time sysadmin
    3. Hit eBay and buy a used mini PC. A ThinkCenter, EliteDesk, Nuc, or generic Chinese minipc will all get you a cheap power efficient server. You won't run llms but with 16gb or ram you'll have a nice setup that gets you a platform like option 1. A bonus is these guys are meant to be locked in cupboard and ignored so you'll find them pretty robust.

    If you're looking to play around, learn, and potentially host something useful having a box you can put your hands on may scratch your itch. If you want your own cloud then using a managed server is another good option.

    1 vote