8 ms·
Selfhosting on Localhost
- mtbkvc 4y agoThis makes perfect sense, especially on some minimal arch install with a tiling window manager. This way you can delegate most of the GUI stuff to the browser and have less stuff installed locally. Nextcloud is also something that can be hosted locally, it can help with calendar, image gallery, contact management, e-mails etc.
- papruapap 4y agodisagree, he doesnt explain how he backups stuff but I guess it is a on external server (otherwise he will lose everything in case the laptop is lost). If you are using an external server you might as well setup everything there (ideally a raspi/minipc). I have a lot of devices (tablet, mobile, laptop, desktop and home media) and being able to use all services from all devices is pretty convenient.
- andrewaylett 4y agoUsing a service like rsync.net (happy customer here!) gives secure and safe backups but without the ability to run services. Which also means pretty much no matter how much I mess up, I can't expose my data to the Internet at large by mistake. I will (and do) run Internet-facing services, but I can definitely empathise with the desire not to. And I'll only do it myself if the benefit over keeping it private outweighs the risk.
- jo-m 4y ago(author) I backup my stuff to three different USB hard drives in three distinct locations, plus rsync.net. All via borg. This works well, is cheap, and a lot would have to happen for me to lose all the data. Of course this self-hosting approach does not work if you have many machines, but I have just my Laptop plus my phone.
- bshipp 4y agorclone is pretty trivial to setup as well. I use it for backing up to my Google drive.
- 878654Tom 4y agoAdditional information if you are interested in self-hosting your personal data, take a look at the awesome-selfhosted (<https://github.com/awesome-selfhosted/awesome-selfhosted https://github.com/awesome-selfhosted/awesome-selfhosted>) list. It contains a lot of information and tools. [1]
- bluehatbrit 4y agoI'm a big fan of this approach and do similar! If it's something I only need when I'm at my computer and where I'm fine if it falls over then I'll host on localhost. I then have a small Lenovo M700 Tiny which I use to run things I may want on multiple devices (use Tailscale so I can access it remotely) but where I don't care too much if it falls over. Anything that I want to be really stable I run on my Hetzner dedicated. It's great fun and I enjoy having the control over the few things I run. It's also super conveniant when it's running locally because I don't really have to worry much about securing the service behind reverse proxies and all that. I can just hit it however I like with any ol script. It's not for everyone, but it works for me.
- bshipp 4y agoSame here! I read the headline and thought "isn't that what Docker is used for?" As soon as i opened the article I saw the author and I had the same idea, even down to using ufw-docker. I have individual ports scripted to open with ufw-docker after docker-compose is run. I know docker isn't the best tool for every task, but I very much enjoy how it allows me to treat my laptop and my cloud servers as almost identical machines and compartmentalize my services.
- bluehatbrit 4y agoYep! Containers are really great for this kind of thing, it's so trivial to run basically anything as long as the configuration docs are reasonable. I use a single node k3s cluster on my lenovo box (for learning) and just straight up docker-compose on my localhost and dedicated because it's just so easy.
- PaulKeeble 4y agoIf you don't share services with others and your machine is usually on then its not much of an issue where you run them. But if you share these services then it need not be all that expensive to host it, a raspberry pi can handle quite a lot especially with an add-on drive and you could backup to an online drive service.
- jve 4y agoAlright, how great is HN? Today, few hours ago, I was thinking: "My nextcloud on SSD@RPI is superslow to render thumbnails for photos. I'v tried once to configure which thumbnails must be prerendered, but I failed and... isn't there a simple web photo album that I can hook my nextloud photos to?" Yesterday I was disappointed that is doesn't show ANY thumbnail for my videos taken on Android. And this post mentions PhotoPrism [1]! Feature page looks nice - exactly what I need for my mess of unorganized photos. Have to try it out. Hope I don't find myself disappointed. [1]: https://photoprism.app/ https://photoprism.app/
- aendruk 4y agoOver the weekend I’d been querying the local LUG for explanations of process scheduling with little success, then like magic “A journey into the Linux scheduler” drifted down my HN feed. It’s a wondrous effect.
- cfu28 4y agoIf you don’t mind closed source software, I’ve found PhotoStructure to be a little nicer. Ive found it’s the closest thing to google photos/apple photos that’s still self-hostable: https://photostructure.com/ https://photostructure.com/
- qbasic_forever 4y agoSomething nice about selfhosting on localhost with a modern linux machine (using systemd and systemd-resolved for DNS) is that by default *.localhost DNS queries are routed to localhost. So you can setup your local apps to have domain names like "photos.localhost", "code.localhost", etc. and not have to muck with hostname entries and such. Setup caddy as a reverse proxy and it will automatically inject a local CA cert into your browsers and auto provision local SSL certs too so you can access local services by names instead of ports, and everything happily works with SSL automagically. I really, really wish windows and mac had a similar behavior to just route all *.localhost queries to localhost.
- jve 4y ago> I really, really wish windows and mac had a similar behavior to just route all *.localhost queries to localhost. Windows 10 has it. Try `nslookup whatever.localhost`
- qbasic_forever 4y agoOh nice! Had no idea they added that behavior.
- CoUHKT57BSe 4y agoIs this some setting you have to enable? cause none of my 3 Windows 10/11 machines to hand do this, I just get the following error. ** one.one.one.one can't find whatever.localhost: Non-existent domain
- dbetteridge 4y agoTry with a trailing slash whatever.localhost/
- CoUHKT57BSe 4y agomakes no difference, same error. ** one.one.one.one can't find whatever.localhost/: Non-existent domain
- derekzhouzhen 4y agoI do this all the time. I have permanent SSH tunnels from my home pc to my VPS and a reverse proxy on my VPS, so I have super fast access to my home apps at home and tolerable access to the same apps when I am outside. Of course, you need to secure your apps, period.
- superkuh 4y agoAnother cargo cult post about self hosting that makes it about 1000 times more complex than it needs to be via containerization. I get that it's what they're used to because of work but this isn't work and has entirely different requirements. There are no "production deployments" at home. You just do what you want. If it's down for a day that's fine. Putting something in a transient docker container and then bending over backwards to enable file persistence is just... wrong. And it'll lead to lots of extra work for no reason.
- hatware 4y agoSpeak for yourself, some of us use our homelabs to serve ourselves as customers because we refuse to pay for nickel and dime services that exist for the sake of convenience. I realize that homelab goes a bit beyond localhost, but we all start somewhere.
- superkuh 4y agoAnd that's fine. But it is not at all required for self-hosting things. Maybe you do that to improve your skills for making money. Maybe you do it because you just enjoy all the complexity and learning the systems. All legit, but completely un-needed obstacles for people that just want to learn how to, or just accomplish, self-hosting. It's like writing a page on how to make bread at home but then spending most of the words on how to build an transient extra-oven outside with special parts instead of just using your oven and talking about the actual recipe steps.
- donmcronald 4y ago> And that's fine. But it is not at all required for self-hosting things. It's not required, but, once you have a handle on it, you get to save a lot of time and hassle. For example, I just checked my old docs for installing and updating Nextcloud. It's 17 printed pages. My new docs are: docker compose pull && docker compose up -d && docker logs -f nextcloud Personally, I run that nightly because, like someone said in another comment, "so what if your homelab is down for a day." For me having a day of downtime wouldn't be the end of the world, so everything's homogenous and auto-updated. I only touch it when I need to update to new major versions. In my experience I spend less time fixing issues related to containers than I used to maintaining everything by hand.
- dontchooseanick 4y ago"Not reachable from outside my home.." If your apps listen on IPV6, they _are_ reachable from outside your home (provided your mobile ISP does IPV6, but they mostly do AFAIK)
- soupbowl 4y agoOnly if they allow access through their firewall.
- dizhn 4y agoThere's no reason to have your services listen on a public IP in such a setup.
- chrisshroba 4y agoCan you elaborate on this or link a resource that explains why this is the case?
- Dagger2 4y agoIt's not the case. Firewalling works the same in v6 as it does in v4, and most people will have a firewall on their router that prevents inbound connections from the Internet by default.
- butz 4y agoBuild static website, run httpd from busybox and call it a day?
- kkfx 4y agoThat's allow me to say: sorry guys you still lost the way. The fact that modern apps are web-apps is a living proof that the old model of document-based UIs was the right way against the widget/form model however old classic document-UIs was interactive, in the sense that the user can create and modify them inside themselves, web-apps might allow "a bit of customization" but are still FAR from being changeable at runtime by their users. Perhaps in another 30+ years will finally rediscover the old model, sold as a very new high-tech thing, since nobody will remember the origin... So far Emacs/org-mode/EXWM/org-roam can be used (I use them) as a document-based UI for almost anything, still integrated (thanks to EXWM) with modern/classic/raw-and-archaic GUIs like Firefox or GIMP. They are limited in GUI terms but at least they can have embedded images, live elements (org-mode headings, search&narrow UI to access them, attachments, links to anything that also just run live embedded code etc...
- softwarebeware 4y agoThe limitation mentioned about not being able to access localhost outside of your home wifi is easily solved with a dynamic DNS. I use DuckDns to be able to access "localhost" when I'm away.