logoalt Hacker News

CLI agents like Claude Code make self-hosting on a home server easier and fun

220 pointsby webskuyesterday at 9:29 PM138 commentsview on HN

Comments

thrownawaysztoday at 12:24 AM

I went down the self host route some years ago but once critical problems hit I realized that beyond a simple NAS it can be a very demanding hobby.

I was in another country when there was a power outage at home. My internet went down, the server restart but couldn't reconnect anymore because the optical network router also had some problems after the power outage. I could ask my folks to restart, and turn on off things but nothing more than that. So I couldn't reach my Nextcloud instance and other stuff. Maybe an uninterruptible power supply could have helped but the more I was thinking about it after just didn't really worth the hassle anymore. Add a UPS okay. But why not add a dual WAN failover router for extra security if the internet goes down again? etc. It's a bottomless pit (like most hobbies tbh)

Also (and that's a me problem maybe) I was using Tailscale but I'm more "paranoid" about it nowadays. Single point of failure service, US-only SSO login (MS, Github, Apple, Google), what if my Apple account gets locked if I redeem a gift card and I can't use Tailscale anymore? I still believe in self hosting but probably I want something even more "self" to the extremes.

show 7 replies
simonwyesterday at 10:01 PM

This posts lists inexpensive home servers, Tailscale and Claude Code as the big unlocks.

I actually think Tailscale may be an even bigger deal here than sysadmin help from Claude Code at al.

The biggest reason I had not to run a home server was security: I'm worried that I might fall behind on updates and end up compromised.

Tailscale dramatically reduces this risk, because I can so easily configure it so my own devices can talk to my home server from anywhere in the world without the risk of exposing any ports on it directly to the internet.

Being able to hit my home server directly from my iPhone via a tailnet no matter where in the world my iPhone might be is really cool.

show 9 replies
dwdyesterday at 11:32 PM

Been self-hosting for last 20 years and I would have to say LLMs were good for generating suggestions when debugging an issue I hadn't seen before, or for one I had seen before but was looking for a quicker fix. I've used it to generate bash scripts, firewall regex.

On self-hosting: be aware that it is a warzone out there. Your IP address will be probed constantly for vulnerabilities, and even those will need to dealt with as most automated probes don't throttle and can impact your server. That's probably my biggest issue along with email deliverability.

show 2 replies
fhennigtoday at 12:03 AM

I think it's great that people are getting into self-hosting, but I don't think it's _the_ solution to get us off of big tech.

Having others run a service for you is a good thing! I'd love to pay a subscription for a service, but ran as a cooperative, where I'm not actually just paying a subscription fee, instead I'm a member and I get to decide what gets done as well.

This model works so well for housing, where the renters are also the owners of the building. Incentives are aligned perfectly, rents are kept low, the building is kept intact, no unnecessary expensive stuff added. And most importantly, no worries of the building ever getting sold and things going south. That's what I would like for my cloud storage, e-mail etc.

journaltoday at 12:50 AM

none of you have what it takes to self host your perfect self hosting fantasy because most of you won't cooperate with others. keep waiting for that unicorn you wouldn't see standing right in front of you.

danpalmeryesterday at 10:37 PM

There's something ironic about using Claud Code – a closed source service, that you can't self-host the hardware for, and that you can't get access to the data for – to self-host so that you can reduce your dependencies on things.

show 2 replies
tezzayesterday at 11:01 PM

Wait… tailscale connection to your own network, and unsupervised sysadmin from an oracle that hallucinates and bases its decisions on blog post aggregates?

p0wnland. this will have script kiddies rubbing their hands

show 1 reply
Humorist2290yesterday at 10:10 PM

Fun. I don't agree that Claude Code is the real unlock, but mostly because I'm comfortable with doing this myself. That said, the spirit of the article is spot on. The accessibility to run _good_ web services has never been better. If you have a modest budget and an interest, that's enough -- the skill gap is closing. That's good news I think.

But Tailscale is the real unlock in my opinion. Having a slot machine cosplaying as sysadmin is cool, but being able to access services securely from anywhere makes them legitimately usable for daily life. It means your services can be used by friends/family if they can get past an app install and login.

I also take minor issue with running Vaultwarden in this setup. Password managers are maximally sensitive and hosting that data is not as banal as hosting Plex. Personally, I would want Vaultwarden on something properly isolated and locked down.

show 1 reply
wswinyesterday at 11:21 PM

Home NAS servers are already shipped with user friendly GUI. Personally I haven't used them, but I certainly would prefer it, or recommend it to tech-illitarate people instead of allowing LLM to manage the server.

chasd00yesterday at 11:45 PM

What I do at home is ubuntu on a cheap small computer I found on ebay. ufw blocks everything except 80, 443, and 22. Setup ssh to not use passwords and ensure nginx+letsencrypt doesn’t run as root. Then, forward 80 and 443 from my home router to the server so it’s reachable from the internet. That’s about it, now I have an internet accessible reverse proxy to surface anything running on that server. The computers on the same LAN (just my laptop basically) have host file entries for the server. My registrar handles DNS for the external side (routers public ip). Ssh’ing to the server requires a lan IP but that’s no big deal I’m at home whenever I’m working on it anyway.

show 1 reply
Sirikontoday at 12:50 AM

Self hosting post. Tailscale.

Its comedic at this point.

nojstoday at 12:11 AM

This post is spot on, the combo of tailscale + Claude Code is a game changer. This is particularly true for companies as well.

CC lets you hack together internal tools quickly, and tailscale means you can safely deploy them without worrying about hardening the app and server from the outside world. And tailscale ACLs lets you fully control who can access what services.

It also means you can literally host the tools on a server in your office, if you really want to.

Putting CC on the server makes this set up even better. It’s extremely good at system admin.

shamilnyesterday at 11:21 PM

Tailscsle was never the unlock for me, but I guess I never was the typical use case here.

I have a 1U (or more), sitting in a rack in a local datacenter. I have an IP block to myself.

Those servers are now publicly exposed and only a few ports are exposed for mail, HTTP traffic and SSH (for Git).

I guess my use case also changes in that I don’t use things just for me to consume, select others can consume services I host.

My definition here of self-hosting isn’t that I and I only can access my services; that’s be me having a server at home which has some non critical things on it.

show 1 reply
chaz6yesterday at 10:39 PM

I would really like some kind of agnostic backup protocol, so I can simply configure my backup endpoint using an environment variable (e.g. `-e BACKUP_ENDPOINT=https://backup.example.com/backup -e BACKUP_IDENTIFIER=xxxxx`), then the application can push a backup on a regular schedule. If I need to restore a backup, I log onto the backup app, select a backup file and generate a one time code which I can enter into the application to retrieve the data. To set up a new application for backups, you would enter a friendly name into the backup application and it would generate a key for use in the application.

show 3 replies
recvonlineyesterday at 11:42 PM

I started the same project end of last year and it’s true - having an LLM guide you through the setup and writing docs is a real game changer!

I just wish this post wasn’t written by an LLM! I miss the days where you can feel the nerdy joy through words across the internet.

jackschultzyesterday at 10:27 PM

I literally did this yesterday and had the same thought. Older computer (8 gigs ram) with crappy windows I never used and I thought huh, I wonder how good these models can take me through installing linux with goal of docker deploys of relatively basic things like cron tasks, personal postgres, and minio that I can used for self shared data.

Took a couple hours with some things I ran across, but the model had me go through the setup for debian, how to go through the setup gui, what to check to make it server only, then it took me through commands to run so it wouldn't stop when I closed the laptop, helped with tailscale, getting the ssh keys all setup. Heck it even suggested doing daily dumps of the database and saving to minio and then removing after that. Also knows about the limitations of 8 gigs of ram and how to make sure docker settings for the difference self services I want to build don't cause issues.

Give me a month and true strong intention and ability to google and read posts and find the answer on my own and I still don't think I would have gotten to this point with the amount of trust I have in the setup.

I very much agree with this topic about self hosting coming alive because these models can walk you through everything. Self building and self hosting can really come alive. And in the future when open models are that much better and hardware costs come down (maybe, just guessing of course) we'll be able to also host our own agents on these machines we have setup already. All being able to do it ourselves.

didntknowyoutoday at 12:27 AM

idk exposing your home network to the world and trusting AI will produce secure code is not a risk I want to take

cmiles8yesterday at 10:07 PM

Anyone seriously about tech should have a homelab. It’s a small capital investment that lasts for years and with proxmox or similar having your own personal “private cloud” on demand is simple.

comrade1234yesterday at 10:37 PM

Prices are going to have an effect here. I have a 76TB backup drive of 8 drives. A few months ago one of my 10TB drives failed and I replaced it with a 12 TB WD gold for 269CHF. I was thinking of building a new backup drive (for fun) and so I priced the same drive and now it's 409CHF.

It's not tariffs (I'm in Switzerland). It's 100% the buildout of data centers for AI.

benzguoyesterday at 10:37 PM

Great post! Totally agree – agents like Claude Code make self-hosting a lot more realistic and low maintenance for the average dev.

We've gone a step further, and made this even easier with https://zo.computer

You get a server, and a lot of useful built-in functionality (like the ability to text with your server)

Dbtabachniktoday at 12:34 AM

How is readcheck any different than using raindrop.io?

elemdosyesterday at 10:49 PM

I’ve also found AI to be super helpful for self-hosting but in a different way. I set up a Pocketbase instance with a Lovable-like app on top (repo here: https://github.com/tinykit-studio/tinykit) so I can just pull out my phone, vibecode something, and then instantly host it on the one server with a bunch of other apps. I’ve built a bunch of stuff for myself (journal, CRM, guitar tuner) but my favorite thing has been a period tracker for a close friend who didn’t want that data tracked + sold.

1shooneryesterday at 10:50 PM

Others here mention Coolify for a homeserver. If you're looking for turnkey docker-compose based apps rather than just framework/runtime environments, I will recommend the runtipi project. I have found it to be simple and flexible. It offers an 'app store' like interface, and supports hosting your own app store. It manages certs and reverse proxy via traefik as well.

https://runtipi.io/

show 1 reply
atmosxyesterday at 10:23 PM

Just make sure you have a local and remote backup server.

From to time, test the restore process.

CuriouslyCyesterday at 11:50 PM

Tailscale is pretty sweet. Cloudflare WARP is also pretty sweet, a little clunkier but you get argo routing for free and I trust Cloudflare for security.

easterncalculusyesterday at 10:34 PM

Nice. This is a great start. The next steps are backups and regular security updates. The former is probably pretty easy with Claude and a provider like Backblaze, for updates I wonder if "check for security issues with my software and update anything in need" will work well (and most importantly, how consistently). Alternatively, getting the AI to threat model and perform any docker hardening measures.

Then someday we self-host the AI itself, and it all comes together.

show 1 reply
nick2k3yesterday at 11:50 PM

All fine and great with Tailscale until you company places an iOS restriction on external VPNs and your work phone is also your primary phone :(

show 2 replies
StrLghtyesterday at 10:34 PM

> Your home server's new sysadmin: Claude Code

(In)famous last words?

austin-cheneyyesterday at 11:00 PM

I have found that storage is up in price more than 60% from last year.

I am writing a personal application to simplify home server administration if anybody is interested: https://github.com/prettydiff/aphorio

sprainedanklesyesterday at 10:14 PM

Impeccable timing, I finally got around to putting some old hardware to use and getting a home assistant instance (and jellyfin, and immich, and nextcloud, ...) set up over winter break. Claude (and tailscale) saved hours of my time and enabled me to build enough momentum to get things configured. It's now feasible for me to spend 15-20 minutes knocking down homeserver tasks that I otherwise would've ignored. Quite fun!

hinkleyyesterday at 10:17 PM

What I’d really like is to run the admin interface for an app on a self hosted system behind firewalls, and push read replicas out into the cloud. But I haven’t seen a database where the master pushes data to the replicas instead of the replicas contacting the master. Which creates some pretty substantial tunneling problems that I don’t really want on my home network.

Is there a replica implementation that works in the direction I want?

show 2 replies
sciences44yesterday at 10:20 PM

Interesting subject, thank you! I have a cluster of 2 Orange Pis (16 GB RAM each) plus a Raspberry Pi. I think it's high time to get them back on my desk. I never had time to get very far with the setup due to a lack of time. It took so long to write the Ansible scripts/playbooks, but with Claude Code, it's worth a try now. So thanks for the article; it makes me want to dust it off!

notesinthefieldyesterday at 10:30 PM

I find myself a bit overwhelmed with hardware options during recent explorations. Seemingly everything can handle what I want a local copy of my Bandcamp archive to stream via jellyfin. Good times we’re in but even having good sysadmin skills, I wish someone would just tell me exactly what to buy.

show 1 reply
JodieBenitezyesterday at 11:52 PM

So it's self hosting but with a paid and closed saas dependency ? I'll pass.

Gualdrapoyesterday at 10:12 PM

One day when I have some extra bucks I'd try to get a home server running, but the idea of having something eating grid electricity 24/7 doesn't seem to play along well with this 3rd world budget. Are there some foolproof and not so costly off-grid/solar setups to look at (like a Raspberry-based thingy or similar)?

show 2 replies
ameliusyesterday at 11:19 PM

> The reason is simple: CLI agents like Claude Code make self-hosting on a cheapo home server dramatically easier and actually fun.

But I want to host an LLM.

bicepjaiyesterday at 10:31 PM

I feel the same way. I now have around 7 projects hosted on a home server with Coolify + Cloudflare. Always worry about security and I have seen many posts related to self hosting on HN trending recently

show 1 reply
cafebeenyesterday at 10:24 PM

This is great and echoes my experience. Although I would add a caveat that this mostly applies to solo work. Once you need to collaborate or operate on a team, many of limits of self-hosting return.

reachableceoyesterday at 10:18 PM

Cloudron makes this even easier. Well worth 1.00 a day! Handles the entire stack (backups , monitoring , dns , ssl , updates ).

efilifeyesterday at 10:13 PM

how many times will I get clickbaited by some cool title only to see AI praise in the article and nothing more? It's tiring and happens way too often

related "webdev is fun again": claude. https://ma.ttias.be/web-development-is-fun-again/

Also the "Why it matters" in the article. I thought it's a jab at AI-generated articles but it starts too look like the article was AI written as well

show 2 replies
e2e4yesterday at 10:10 PM

My stack. Claude code working via CLIs: Coolify on hetzner

RicoElectricoyesterday at 11:57 PM

I just use Proxmox on Optiplex 3060 micro. On it, a Wireguard tunnel for remote admin. The ease of creating and tearing down dedicated containers makes it easy to experiment.

fasssssttoday at 12:17 AM

Umm, what happened to zero trust? Network security is not sufficient.

syndacksyesterday at 11:40 PM

Can the same thing be said for using docker compose etc on a VPS to host a web app? Ie you can get the ergonomic / ease of using Fly, Renderer?

Historically, managed platforms like Fly.io, Render, and DigitalOcean App Platform existed to solve three pain points: 1. Fear of misconfiguring Linux 2. Fear of Docker / Compose complexity 3. Fear of “what if it breaks at 2am?”

CLI agents (Claude Code, etc.) dramatically reduce (1) and (2), and partially reduce (3).

So the tradeoff has changed from:

“Pay $50–150/month to avoid yak-shaving” → “Pay $5–12/month and let an agent do the yak-shaving”

crypticayesterday at 11:26 PM

I started self-hosting after noticing that my AWS bill increased from like $300 per month to $600 per month within a couple of years. When looking at my bill, 3/4 of the cost was 'AWS Other'; mostly bandwidth. I couldn't understand why I was paying so much for bandwidth given that all my database instances ran on the same host as the app servers and I didn't have any regular communication between instances.

I suspect it may have been related to the Network File System (NFS)? Like whenever I read a file on the host machine, it goes across the data-center network and charges me? Is this correct?

Anyway, I just decided to take control of those costs. Took me 2 weeks of part-time work to migrate all my stuff to a self-hosted machine. I put everything behind Cloudflare with a load balancer. Was a bit tricky to configure as I'm hosting multiple domains from the same machine. It's a small form factor PC tower with 20 CPU cores; easily runs all my stuff though. In 2 months, I already recouped the full cost of the machine through savings in my AWS bill. Now I pay like $10 a month to Cloudflare and even that's basically an optional cost. I strongly recommend.

Anyway it's impressive how AWS costs had been creeping slowly and imperceptibly over time. With my own machine, I now have way more compute than I need. I did a calculation and figured out that to get the same CPU capacity (no throttling, no bandwidth limitations) on AWS, I would have to pay like $1400 per month... But amortized over 4 years my machine's cost is like $20 per month plus $5 per month to get a static IP address. I didn't need to change my internet plan other than that. So AWS EC2 represented a 56x cost factor. It's mind-boggling.

I think it's one of these costs that I kind of brushed under the carpet as "It's an investment." But eventually, this cost became a topic of conversation with my wife and she started making jokes about our contribution to Jeff Bezos' wife's diamond ring. Then it came to our attention that his megayacht is so large that it comes with a second yacht beside it. Then I understood where he got it all from. Though to be fair to him, he is a truly great businessman; he didn't get it from institutional money or complex hidden political scheme; he got it fair and square through a very clever business plan.

Over 5 years or so that I've been using AWS, the costs had been flat. Meanwhile the costs of the underlying hardware had dropped to like 1/56th... and I didn't even notice. Is anything more profitable than apathy and neglect?

show 1 reply
holyknightyesterday at 10:25 PM

not with these hardware prices...

show 2 replies
minihosteryesterday at 10:27 PM

[dead]

zebnycyesterday at 11:25 PM

Basic question: If I wanted a simple self hosting solution for a bot with a database, what is the simplest solution / provider I can go with. This bot is just for me doesn't need to be accessible to the general public.

Thanks

show 1 reply