Article · 2 min read · Getting started
kubespin: Add a home server
A PC or small board at home, with no public address and no DNS name, works the same as a cloud server.
A PC or small board at home, with no public address and no DNS name, works the same as a cloud server.
Adding it
Follow kubespin: Add a server with a code. The machine needs Debian or Ubuntu and a connection to the internet. Nothing changes on your router, and nothing on the machine listens to the internet.
How kubespin reaches it afterwards:
- The agent opens a connection out to kubespin and keeps it open.
- kubespin’s SSH runs through that connection, signing in with a certificate that lasts 5 minutes. No SSH key is kept, and port 22 needn’t be open. See kubespin: No stored SSH keys.
- Apps on the machine get generated names, served through the same connection. See kubespin: How traffic reaches an app.
Keeping the agent running
The set-up installs a small watchdog: a systemd timer that runs every two minutes. If no agent is running, it starts the last one again, or pulls and starts a new one, on whichever engine answers.
When it goes quiet
If a home server hasn’t reported for 3 minutes, its page shows Reconnect this computer, with a command to run on the machine. The command:
- starts the agent again;
- installs the watchdog if it’s missing;
- clears out any half-finished agent update;
- keeps the computer on Kiri if it runs Kiri.
After 30 minutes without a report you’re told once (see kubespin: Alarms and alerting).
Laptops and desktops
A laptop or desktop that goes to sleep goes offline. Its page shows what makes it sleep, with Keep awake. See kubespin: Sleep and keep awake. For boards, see kubespin: Boards and what kubespin reads.
Limits today
- Agent updates on a home server never go through SSH; the agent updates itself.
- Every request to an app on a home server passes through kubespin’s host. That suits development, demos and light use. For busy apps, see kubespin: Migrating apps from a home server to the cloud.