
This website lives in a spare room
What you will learn
- How a real public website runs from a spare room for about ten dollars a year
- How to put it online without opening a single door into your home network
- Why a website made of plain files is stronger than one with a database
You are reading this off a small computer sitting in a room in my house. Not a hosting company, not a platform, not somebody's network of data centres. A tiny computer that used to do something else entirely, and cost me nothing because I already owned it.
The only thing I pay for is the name of the site. About ten dollars a year. That is the entire running cost of this website.
Why bother, when free hosting exists
Because a platform can decide it is finished with you overnight, and there is nothing you can do about it. Accounts get suspended by systems with no person involved. Services shut down. Terms change.
If your work lives entirely somewhere you do not control, you are one automatic decision away from losing it.
This name is mine, this machine is mine, and the words are on a drive I can physically pick up. The social accounts point here. Not the other way around.
It is just files
There is no database here. No login, no comment system, nothing that runs. It is a folder of ordinary files, and the web server's entire job is to hand them to you.
That sounds primitive. It is the strongest part of the design. There is nothing to crash at three in the morning, nothing to keep patched, and nothing to break into.
Getting it online without opening your house
This is the part people get wrong, and it is the part that actually matters.
The obvious way to put a home computer on the internet is to open a door in your router and point the world at your house.
Do not. That publishes your home address to every scanner on the planet, and it makes your router the front door.
The better way is a tunnel. The little computer makes an outward connection to a service, the same way your laptop connects to a website, and that connection stays open. Traffic comes back down the pipe it already opened.
Nothing comes inward. No doors are opened. My home address appears nowhere in public.
The tightest version of this: my web server does not listen to the network at all. It only answers requests coming from the same machine it is sitting on. The tunnel program is on that same machine, and is the only thing that can reach it.
So there is exactly one door into this site, and it is a door that opens outward.
A side benefit I did not plan for: I have two internet connections, and when one drops the tunnel simply re-establishes itself over the other. The site does not notice.
The part that is a little unusual
I do not intend to leave this site alone. I want to rebuild it constantly.
So the design is split in two. There is a locked layer, which is the colours, the lettering and the mask. That never changes. Then there is everything else, the actual shape of every page, and that is supposed to change every single time.
Both halves are written down in a file that any rebuild has to read first. A rebuild that changes the colours has failed. A rebuild that keeps the same layout has also failed. Identity holds, structure rotates.
Every version is kept, and you can go and look at all of them. Most sites bury their old design as though it were embarrassing.
What it cost
- The name: about ten dollars a year.
- Hosting: nothing. Hardware I already had.
- The tunnel: nothing at this size.
- Software: nothing. All of it open.
- Electricity: a few dollars a year for a computer that sips power.
Ten dollars a year for a site nobody can take away from me. That is the entire pitch.
Any always-on low-power computer works, or an old laptop. You need a name for the site (about ten dollars a year) and a free account with a tunnel provider. Replace anything in angle brackets with your own value.
1. Make the site a folder of plain files
What this does: starts tracking your work so every change can be undone, then turns your source into a finished folder of pages.
What should happen: the last command lists finished files. That folder is the entire website.
git init
python3 build.py # writes the finished site into dist/
ls dist/ # index.html, css, fonts, done
2. Serve it, but only to the same machine
What this is: a settings file for the web server, not a command.
The one line that matters: listen 127.0.0.1. That address means
"this machine only". Nothing on your network, and nothing on the internet, can reach
it directly. Only a program on the same machine can.
This is the whole trick.
server {
listen 127.0.0.1:80; # this machine only. the whole trick.
server_name <your-domain>;
root /var/www/<your-site>; # your finished folder
index index.html;
}
What these do: switch the settings on, check them for mistakes, and then load them.
What should happen: the middle command says the file is fine. If it complains, fix it before the third one.
sudo ln -s /etc/nginx/sites-available/<your-site> /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
3. Put it online with an outward tunnel
What these do: connect your machine to the tunnel service, create a tunnel, and attach your site's name to it.
Why this is safe: your machine reaches out. Nothing ever reaches in, and no door is opened in your router.
cloudflared tunnel login
cloudflared tunnel create <tunnel-name>
cloudflared tunnel route dns <tunnel-name> <your-domain>
What this is: the tunnel's settings file. It connects your site's name to the web server that is listening only to its own machine.
tunnel: <tunnel-name>
credentials-file: /home/<you>/.cloudflared/<tunnel-id>.json
ingress:
- hostname: <your-domain>
service: http://127.0.0.1:80
- service: http_404
4. Make it survive a restart
What this does: sets the tunnel up to start on its own, so it comes back after a power cut.
What should happen: the last command reports "active (running)".
sudo cloudflared service install
sudo systemctl enable --now cloudflared
systemctl status cloudflared
5. Publish an update
What these do: fetch your latest changes, rebuild the finished pages, and swap them in.
What should happen: no interruption. The old files keep being served right up until the new ones replace them.
git pull
python3 build.py
sudo systemctl reload nginx
Bind the web server to this machine only, not to everything. If it listens on all addresses, every device on your network can reach it, and one wrong firewall setting can leak it to the internet.
Never open a door in your router to do this. You do not need to, and it undoes the entire point.
This page in the original Kyber Cypher voice: I put this site in my own house