9 ms·
Gentle Guide to Self-Hosting
- asar 2y agoLove self-hosting and really got into it over the last couple of months. I run a bunch of services for my company now and also in my home lab. I use a Hetzner VPS and provision things either via ansible + docker compose files or via https://github.com/coollabsio/coolify/ https://github.com/coollabsio/coolify/. The awesome-selfhosted repository is also a great place to find projects to self-host but lacks some features for ease-of-use, which is why I've created a directory with some UX improvements on https://selfhostedworld.com https://selfhostedworld.com. It has search, filters projects by stars, trending, date and also has a dark-mode.
- b_shulha 2y agoAny chance to get my SaaS into "Heroku alternatives" section as well? https://ptah.sh https://ptah.sh
- user_7832 2y agoSince you seem knowledgeable on this topic I'd like to ask - how risky is it to expose a computer on your network to the internet, if you're somewhat tech-savvy but not very familiar with networking? Is it relatively "safe" with modern tools and VMs or do you need to stay on top and (for eg) always ensure you're updating software weekly? I've thought of setting up and running a server for a long time and finally have a spare laptop so I'm thinking of actually running a NAS at least.
- voidUpdate 2y agoYou'll want to make sure everything stays up to date in case someone finds a vulnerability in whatever software you're currently using. If you have to expose stuff to the outside world, only open the ports you need to. Only allow access to a specific user with a non-default username (or at the very least disable root ssh access), and use long passwords or ssh keys. I think that's generally the bare minimum, but there are online guides to harden your stuff further like using wireguard and fail2ban and stuff
- asar 2y agoThe approach most people use is to tunnel into the server. You install a daemon on your computer which establishes a tunnel to log-into from outside your network. Cloudflare and Tailscale have solutions for this that are very popular among the self-hosted crowd. https://developers.cloudflare.com/cloudflare-one/applications/configure-apps/self-hosted-apps/ https://developers.cloudflare.com/cloudflare-one/application... https://tailscale.com/kb/1151/what-is-tailscale https://tailscale.com/kb/1151/what-is-tailscale
- conradklnspl 2y agoA god option is to setup a wireguard connection between workstation and servers. All traffic has to go through wireguard. Because wireguard is UDP and only responds to valid requests, there isn't any open port from the outside. Not even ssh.
- jimvdv 2y agoAdditionally you can use Tailscale for added convenience. Tailscale is a payed service, for a simple home server you can get away with the free plan and their mobile apps work rather well. Not affiliated with Tailscale at all just shouting them out because they do make things very easy and I often recommend them to hobbyist.
- packetlost 2y agoI've been doing it for about 13 years now with HTTP/s (80, 443), SSH (22), MOSH (lol idk), and IRC (6697) exposed to the internet. You don't need it, but something like fail2ban or crowdsec is a good idea. You will get spammed with attempts to break in using default passwords for commodity routers (Ubiquiti's `ubnt` is rather popular), but if you're up to date and take a few minor precautions it's not all that hard and/or dangerous. That being said, there are alternatives such as Tailscale that are strictly more secure but far less flexible. I've heard of people using Cloudflare tunnels as well, but I'd rather not rely on big players for stuff like that if I'm going through the effort to self host (and don't have any real risk of DDoS). I would try to set up automatic updates for critical security patches or update about weekly. I know people that self host and do it monthly and they seem fine too. Most anything super scary vulnerability wise is on the front page here for awhile, so if you read regularly you'll probably see when a quick update is prudent. I personally use NixOS for all of my servers and have auto-updates configured to run daily. An old laptop is exactly how I got started 13 years ago, they're great because they tend to be pretty power efficient and quiet too.
- bongobingo1 2y agoHm, is there a name for the type of software that Coolify is, where it presents a management plane for other servers, vs Dokku where it runs on the server?
- b_shulha 2y agoCoolify and others mentioned on that website can run on the server itself as well. It happened that Coolify provides the paid option to sponsor the development, but it is not mandatory.
- apitman 2y agoThis is pretty nice. I see sish and inlets. I have a lot more similar tools on my list here: https://github.com/anderspitman/awesome-tunneling https://github.com/anderspitman/awesome-tunneling For auth, I also made a comparison of OIDC servers here: https://github.com/lastlogin-net/obligator#comparison-is-the-thief-of-joy https://github.com/lastlogin-net/obligator#comparison-is-the...
- leosanchez 2y agoMiniflux is very good. It even has a telegram integration which will send you notification whenever a new article is published
- loremm 2y agoin general, it's worth noting telegram bots are easy (free) to make and messages can be sent with one cURL command. Very useful, you can even set it up to send after long terminal commands so you know to check back
- leosanchez 2y agoI am aware. I use it with my backup scripts. But I felt it was cool integration
- Havoc 2y agoBut then someone whispers K8S into your ear…
- arrty88 2y agoI'm a big fan of self hosting. I have learned a lot on a small hobby project. for those who are curious about my setup, I bought a used Dell R630 on ebay for cheap. 1tb raid 1 on ssds, 32gb ram, 32 cores, and i am enjoying running a few small hobby apps with docker, virsh, and minikube (yes i learned all 3). I have a 1gbps fiber connection. I use a 1m cronjob to detect if my IP changes, and i use the linode api to change my DNS A records.
- chadsix 2y agoI am part of a company that promotes self hosting and provides external routing for self hosting [1] We made Cloud Seeder [2] an open source application that makes deploying and managing your self-hosted server a 1-click issue! Hope this comes in handy for someone! :-) [1] https://ipv6.rs https://ipv6.rs [2] https://ipv6.rs/cloudseeder https://ipv6.rs/cloudseeder https://github.com/ipv6rslimited/cloudseeder https://github.com/ipv6rslimited/cloudseeder
- DanAtC 2y agoI like the concept, but only 5 IPs? With IPv6 you should be offering at least a /64 per tunnel.
- chadsix 2y agoGreat point! We offer 5 because we're geared toward helping people host appliances as opposed to raw network setup! We also offer automatic RDNS with this as well as the Cloud Seeder appliance! Thanks again for your comments and as well thoughts!
- xiconfjs 2y agoFrom the FAQ: * Q: "What about IPv4?" * A: "While IPv4 is still widely used, its necessity is diminishing as the world transitions to IPv6. (...)" ;)
- cutler 2y ago1.5Gb RAM/10Gb disk? Hetzner's basic cloud VPS comes with 4Gb RAM and 40Gb disk for E4.51.
- Ringz 2y agoDo you have an eye on the (potential) price difference?
- cutler 2y agoMore the resource difference.
- tarruda 2y agoAFAIK Nothing seems to beat Oracle cloud: https://www.oracle.com/cloud/costestimator.html https://www.oracle.com/cloud/costestimator.html For compute: "Each tenancy gets the first 3,000 OCPU hours and 18,000 GB hours per month for free to create Ampere A1 Compute instances. This free-tier usage is shared across Bare Metal, Virtual Machine, and Container Instances." For block storage: "Block Volume service Free tier allowance is for entire tenancy, 200GB total/tenancy. If there are multiple quotes for the same tenancy, only total 200GB can be applied" In other words: you have a 4-core ARM CPU + 24GB RAM + 200GB space for free.
- sandos 2y agoYep, I was running one of these for the longest time.. until they blocked idle instances! Hah.. thats the kind of usage free gets you, lot of people hoarding it for... nothing. I mean, I could easily have thought of stuff to load the instance up slightly but, eeh.
- tarruda 2y agoYou can also add an extra 50gb of space to pay like $5/month, that way you are paying and it is still an insanely better deal than any of the other cloud providers
- 2y ago
- codevark 2y ago[dead]
- massysett 2y agoI’m an old-timer, I’m surprised that paying for shared hosting is now “self-hosting.” Nothing wrong with that, but that would never have been called self-hosting ten years ago. I guess it’s like how “cooking from scratch” evolved. A cookbook from the nineteenth century might have said “1 hog” as an ingredient and instructed you to slaughter it. Now of course you buy hog pieces on foam trays.
- diggan 2y agoSeems to me the term "self-hosting" tends to auto-adjust its position based on the other end. So if "not self-hosting" is hosting on a shared VPS, then self-hosting is hosting on a computer at home. But "not self-hosting" has now become "hosted in cloud" so self-hosting moved to "shared VPS" instead, as the other end moved. Kind of makes sense, but kind of also makes historical texts more difficult to understand. In the year 2124, who know what "self-hosting" meant in 2054? I guess it's up to future software archeologists to figure out.
- icedchai 2y agoYes, the goalposts move. When I started w/the internet 30+ years ago, self hosting meant your own 56K leased line.
- kayson 2y agoThere are definitely plenty of people who would say that using a hosting provider doesn't count, even if you're deploying the software yourself. The one generally accepted exception to this is network protection. You don't want to expose your home ip address to the outside world if you can help it, so a lot of people use tailscale, cloud flare tunnels, or a vps as a proxy.
- Cyph0n 2y agoA VPS that proxies traffic over Tailscale is another neat option. I use this approach to serve self-hosted services that I want to be accessible over the internet.
- from-nibly 2y ago> Practically, it is foolishness, for what you save in money you lose in time and sanity. Kubernetes gets a lot of side eyes in the self-hosted community. That's all of self hosting though. So why not go all in? I've got 3 dell r720XDs running nixos with k3s in multi master mode. It runs rook/ceph for storage, and I've got like 12 hard drives in various sizes. My favorite party trick is yoinking a random hard drive out of the cluster while streaming videos. Does not care. Plug it back in and it's like nothing happened. I've still got tons of room and I keep finding useful things to host on it.
- kayson 2y agoPlenty of people use k8s or k3s for self hosting. But for most, the added complexity doesn't buy enough for the trade-off to be worth it. Keep in mind most people have a single node, so docker does everything they need. Personally, even with a 4 node setup (of tiny desktops; the hardware you have would easily cost me $200/mo in power bills), I use docker swarm. Old and unloved, but does everything I need for multi node deployment and orchestration with only a sliver more complexity than vanilla docker.
- from-nibly 2y agoYeah don't ask me about my power bill, It's definitely in the vanity realm. I have cheap power where I live so it's not anywhere near $200. Still too high though. One day I'll get solar to offset it.
- Cyph0n 2y agoI just use NixOS as a VM and run services as containers directly. Self-plug: I wrote a tool that makes it easy to run Docker Compose projects on NixOS [1]. This way, I get the advantages of NixOS config, while also being able to run arbitrary applications that might not be available on nixpkgs. As far as storage goes, I just use ZFS on the hypervisor (Proxmox) and expose that over NFS locally. [1] https://github.com/aksiksi/compose2nix https://github.com/aksiksi/compose2nix
- jamwil 2y agoFor a homelab k8s is way overkill. I do it because self-hosting is 1 part utility to 2 parts education.
- ed_mercer 2y agoOnce you graduate from this guide, be sure to check /r/homelab and /r/homedatacenter ;)
- meonkeys 2y agoAnd https://lemmy.world/c/selfhosted https://lemmy.world/c/selfhosted , and https://www.reddit.com/r/selfhosted/ https://www.reddit.com/r/selfhosted/ . There are a few useful Matrix chat rooms related to self-hosting, too: #selfhosted:matrix.org , #self-hosted:jupiterbroadcasting.com , #steadfast:matrix.org
- meonkeys 2y agoThe author nails it here: > It is 2024, and I say it is time we revisited some of the fundamental joys of setting up our own systems. Self-hosting really is joyful. It's that combination of learning, challenge, and utility. +1 to Actual Budget +1 to Changedetection.io -1 for not mentioning threat modeling / security. The author uses HTTPS but leaves their websites open to the public internet. First-timers should host LAN-only or lock their stuff way down. I guess that's tricky with shared hosting without some kind of IP restriction or tunneling, though. No idea if uberspace offers something like that. For folks getting past the initial stages of self-hosting, I'd really recommend something like Docker to run more and more different apps side by side. Bundled dependencies FTW. Shameless plug for my book, which covers the Docker method: https://selfhostbook.com https://selfhostbook.com
- w10-1 2y agoOK: This has not been a detailed step by step walkthrough on how to do things, by design. You are meant to go and explore; this is simply a way pointer to invigorate your curiosities Sorry, but because I came looking for solutions, I found the invigoration aggravating, but then helpful in focusing my attention. Scalable services and sites I can build, 10 different ways. My enduring, blocking need is for dead-simple idiot-proof network management to safely poke a head out on public IP from home. And to make secure peer-to-peer connections. Somehow that process never converges on a solution in O(available) time. </complaining>
- transpute 2y ago> dead-simple idiot-proof Recent thread: https://news.ycombinator.com/item?id=41440855#41460999 https://news.ycombinator.com/item?id=41440855#41460999 > network management to safely poke a head out on public IP from home For remote access to private services, would Tailscale/Wireguard be an option? It can even use Apple TV as an exit node. > secure peer-to-peer connections Which protocols would you consider secure for P2P use, e.g. which solutions have you tried previously which failed to converge?
- jamwil 2y agoTailscale is that.
- transpute 2y ago"Why I self host my servers and what I've recently learned", 130+ comments, https://news.ycombinator.com/item?id=41440855 https://news.ycombinator.com/item?id=41440855
- tonymet 2y agospoiler alert, the article isn't about self-hosting, it's about shared-hosting
- crossroadsguy 2y agoI loved the idea of PikaPods until I realised even if I use 10 small (no tiny) instances/services and that too just for me to be used really really rarely) I was getting into integral USD x 11 (or whatever the number is) cost. Can't blame them because it costs money to run things. But I would have rather preferred something that isn't that costly or doesn't go up in prices with number of services/apps used. I wish there was a cost effective solution for this self/web/app hosting.
- johnklos 2y agoIt's a good writeup, but I do take exception to this: "Seriously, else-hosting is the practical option, let someone else worry about the reliability, concurrency, redundancy and availability of your systems." Spend one time trying to get through a maze of automated phone answering systems, then try to ascertain whether the human, when you finally get them, even understands the issue, then wonder how much of what they're telling you is to just get you off the phone, all the time wondering if calling even really does anything, and you'll wonder whether it's better to blindly trust a company that likely doesn't have tech people we're allowed to talk to or to just do it ourselves. At least when there's an issue with my things, I can address it. Although a bit of a tangent, I'd love to see a review of major hosting providers based on whether you can talk to a human, and whether said human knows anything at all about Internet stuff.
- RajT88 2y agoI'm with the other old timers. If it's not your hardware running in a space you own or rent, you're not self-hosting. Currently I have a little Micro-ITX box. But once upon a time I had a proper server rack with 6 U worth of servers, UPS, networking, etc. (Before I was married...)
- deleted 2y ago[deleted]