$ less ~/notes/laptop-as-homeserver.md

How I Am Using My Laptop To Host My Personal Projects And 24/7 AI Agents

7 min read HomeserverDevOpsSide ProjectsAI Agents

The laptop in my hall, doing real work

For the last few months, my personal laptop has been doing something a little unusual. It sits in the corner of my hall, lid closed, slightly warm, and runs everything I build. My portfolio, my email tracker, my disease dashboard, a few AI agents that tweet on their own, and a small army of background scripts.

No VPS. No cloud bill. Just one laptop, a Cloudflare tunnel, and a lot of curiosity.

This is the story of how I got here, and why it has been more fun than any cloud setup I have used before.

Why a Laptop

I already had a Hostinger VPS running my projects. It worked. But every time I wanted to try something new, like running a 20B local model, or keeping a Chrome instance alive for some automation, the VPS started feeling small. More RAM costs more money. More CPU costs more money. And honestly, I had a perfectly good laptop sitting at home doing nothing on most days.

So I asked a simple question. What if the laptop becomes the server?

The hardware is already there. The electricity bill is tiny. The internet is the same one I use every day. The only real cost is a little discipline in how I set things up.

I flipped Ubuntu Server on it, closed the lid, told it not to sleep, and that was day zero.

The Internet Problem

The first real problem is that home internet does not give you a fixed public IP. Even if it did, opening ports on a home router is a bad idea. Your ISP is also not your friend here.

This is where Cloudflare Tunnel saved me.

The idea is simple. The laptop makes an outbound connection to Cloudflare. Cloudflare becomes the public face. When someone visits deepaksilaych.me, Cloudflare routes the request through the tunnel back to my laptop. No open ports. No static IP. No router fights.

I pointed a wildcard subdomain at the tunnel, and now any subdomain I want just works. New project, new subdomain, all of them land on the same laptop.

It feels a bit magical the first time you see it work.

One Caddy To Rule Them All

Inside the laptop, every project runs in Docker on its own internal port. Caddy sits in front and decides which subdomain goes to which port.

root domain        -> portfolio
sub one            -> email tracker dashboard
sub two            -> disease dashboard
sub three          -> analytics
sub four           -> auth gateway

Caddy also handles SSL, which is great, because SSL is one of those things you only want to think about once.

The apps themselves do not care. They just listen on a local port and trust Caddy to do the public part.

Shared Postgres, Shared Redis

If every project starts its own database, the laptop turns into a noisy mess.

So I run one shared Postgres and one shared Redis as part of the base infra. Every project just connects to them over the internal Docker network. New project, new database, same Postgres instance.

This sounds boring, but it makes the whole setup feel calm. Infrastructure is infrastructure. Apps are apps. Each one stays in its own lane.

The 24/7 AI Agents Part

This is the bit that gets me excited.

Because the laptop has way more RAM and CPU than I actually need for the websites, there is a lot of room for background work. So I started running AI agents on it.

One of them runs an Ollama setup with gpt-oss:20b and a few smaller Qwen models. Another one is a Twitter agent that reads tweets, picks the interesting ones, and drafts replies in different personas. A captioner takes tweet images and turns them into one line descriptions so the planner model, which is text only, still understands what the image is about.

A cron tick wakes them up, they do their thing, they go back to sleep. No babysitting. No paying per token for things I am just experimenting with.

This is the part that would have been painful on a VPS. A 20B model wants real RAM. A background browser wants real CPU. A laptop has both, just sitting there, waiting.

The Badge On My Site

I added a small badge on the top of my portfolio that says hosted from a laptop in my hall. There is a tiny green dot next to it that pulses when the server is alive.

It is a small detail. But every time I visit my own site and see that dot pulsing, it reminds me that the website I am looking at is being served by a laptop sitting two rooms away from me. Not a data centre. Not someone else’s computer. Mine.

That feels nice.

What Could Go Wrong

Plenty.

Power can go out. Wifi can drop. The laptop can decide to update itself at 3 am. A background agent can eat all the RAM and take the websites down with it.

None of these are theoretical. All of them have happened at least once.

But here is the thing. None of it has been catastrophic. Cloudflare Tunnel reconnects on its own. Docker containers restart on their own. The shared Postgres has nightly backups. If the laptop dies for a day, the world keeps moving.

The cost of these small risks, for a personal projects setup, is very low. The freedom you get in return is very high.

What I Would Tell Someone Starting

If you have a spare laptop and you are building personal projects, try this. Start with one site, one Cloudflare Tunnel, one Caddy block. Get that one thing working. Then add the next project. Then the next.

Do not start with Kubernetes. Do not start with fancy orchestration. Start with boring Docker Compose files and a port map in a text file.

The whole point of a personal homeserver is that it stays personal. Easy to understand. Easy to fix at 1 am. Easy to explain to a friend in one minute.

A laptop in your hall is more than enough to do real things. Run real websites. Run real AI agents. Run real experiments.

And the dot on the badge will keep pulsing, quietly, doing its job.

← All writing