Lesson 6 · Module 3: Your AI Operating System on a Private Server
Backups, updates and monitoring so your server stays healthy
Video coming soon
Learn it with your tutor on the live board
Key points from the video
When the server goes quiet
- AI agents answer, book and invoice overnight
- One full disk stops everything
- The last backup is three weeks old
- Almost always preventable
What you will learn
- Back up workflows, data and documents, and prove it
- Update Docker apps without breaking your agents
- Monitor vital signs and get alerts on your phone
Three habits of a healthy server
- Backups: copies in a safe place
- Updates: a careful routine
- Monitoring: warnings before failures
What to back up, and where
- Database: customers, bookings, chat memory
- n8n: workflows plus its encryption key
- Knowledge base (RAG) documents, .env and docker-compose files
- 3-2-1: three copies, two kinds of storage, one off the server
Worked example: which backups to keep
- Retention: a rule for how long each copy is kept
# Forty nightly backups, today is Friday 2 October
7 | last seven days, keep every day
4 | Sundays aged 12, 19, 26 and 33 days
7 + 4 = 11 | kept
40 - 11 = 29 | deleted || box:29 A backup only counts once restored
- Restore into a test copy, never over live data
- Compare counts: bookings, customers, newest date
- Repeat monthly and write the steps down
A safe update routine
- OS security patches: automatic, weekly
- Pin app versions, never "latest"
- Snapshot first, then one app at a time
- Test a real workflow, keep a way back
Monitoring: watch the trend
- Vital signs: online, disk, memory, CPU
- Failed n8n executions count too
- Alert before the failure, not after
layout: side
kind: line
title: Disk used, last 7 days
unit: "%"
x: [1, 2, 3, 4, 5, 6, 7]
data: {Disk used: [52, 58, 63, 69, 74, 81, 88]}
steps:
- at: "seven days of disk"
show: all
- at: "warning line at eighty"
line: {y: 80, label: alert 80%} Alerts with Uptime Kuma
- Free, self-hosted status checks
- Check n8n, your webhook URL, SSL expiry
- Alerts by Telegram or email
- Add one outside check too
Common mistake: backups on the same server
- Backups sit on the same disk as live data
- One failure or break-in deletes both
- Fix: encrypted copy offsite, automatically
Recap
- Back up nightly, offsite, and test a restore monthly
- Update with pinned versions, snapshots and a test
- Monitor vital signs and alert on trends
Exercise: give your server a health routine
- Schedule a nightly database dump, copied offsite
- Restore it to a test database, compare row counts
- Install Uptime Kuma, alert to Telegram or email
- Stop n8n for a minute and watch the alert arrive
Transcript
When the server goes quiet. Picture this. You run a small online shop, and your AI agents on a private server answer customer messages, book appointments and send invoices while you sleep. One Monday morning the server is silent. The disk filled up overnight, the database crashed, and forty customer messages are stuck in the queue with nobody answering. Worse, the last copy of your bookings is from three weeks ago. This happens to real businesses every month, and it's almost always preventable. Today we make sure it never happens to your server, or to the servers you set up for your clients.
What you will learn. By the end of this lesson you'll be able to do three things. First, set up automatic backups of your n8n workflows, your database and your documents, and prove they work by restoring one. Second, update your Docker apps safely, so a new version never takes your agents down by surprise. Third, monitor the server. That simply means watching a few vital signs, like whether it's online and how full the disk is, and getting an alert on your phone before a small problem becomes an outage. Think of it as routine care for the machine your business runs on.
Three habits of a healthy server. Keeping a server healthy comes down to three habits, a bit like caring for a car. On the left are backups, the safe where copies of your data live, so a crash costs you an hour instead of your customer list. On the right are updates, the toolbox. New versions fix security holes and bugs, but they need a careful routine. And above the server is monitoring, the heart monitor that tells you something's wrong before your customers notice. Skip any one of the three, and the other two can't save you.
What to back up, and where. So what exactly do we copy? The database, here Postgres, holds your customers, your bookings and the conversation memory from lesson four. n8n holds your workflows, and its encryption key, without which your saved credentials can't be read. Then there are the documents behind your knowledge base, the RAG documents, and the small config files, the dot env file and the docker compose file, that describe how everything runs. A good guide is the three two one rule: three copies of your data, on two different kinds of storage, with one copy off the server. Every night a scheduled job dumps the database, which means exporting it to a single file, then compresses it, encrypts it with a password, and ships it to offsite storage. Old copies are then deleted, which we look at next.
Worked example: which backups to keep. Nightly backups pile up fast, so you need a retention policy, which is just a rule for how long each copy is kept. Think of a shop keeping daily receipts for a week and weekly summaries for a month. Let's apply that rule to forty nightly backups, with today being Friday the second of October. From the last seven days, we keep every day: that's seven copies. Older than that, we keep only the Sundays, aged twelve, nineteen, twenty-six and thirty-three days. Those are Sunday copies up to about five weeks old, which here is four of them. Seven plus four gives eleven kept. And forty minus eleven gives twenty-nine deleted. The oldest copy we keep is from the thirtieth of August. You get a week of fine detail and a month of history, without filling the disk.
A backup only counts once restored. Here's the uncomfortable truth: a backup you've never restored is only a hope. Once a month, take last night's backup file and restore it into a separate test database, never over the live one. Then check it the way a client would. Say your booking agent runs appointments for a hair salon. Does the restored copy have the same number of bookings as the live one? Are this week's appointments there? Is the newest record from last night? If the numbers match, write down the exact steps you used. Now, when a real crash happens, restoring is a calm ten-minute job instead of a panic.
A safe update routine. Updates are where many self-hosters get burned, so let's slow down. Operating system security patches are low risk, so let them install automatically every week. App updates, like n8n or your database, need a routine. First, pin versions: in your docker compose file, write a fixed version number instead of the word latest, so nothing changes behind your back. Before updating, take a snapshot, a photo of the whole server disk that most VPS panels offer in one click. Read the release notes for breaking changes, update one app, then send a test customer message through your agent. If anything breaks, roll back to the snapshot.
Monitoring: watch the trend. Monitoring means watching a few vital signs: is the server online, how full is the disk, how much memory is in use, how busy the processor, or CPU, is, and are n8n workflows failing. Here are seven days of disk usage on a client's server. It climbs from fifty-two percent to eighty-eight, because chat logs and backups pile up. Nothing has failed yet, and that's exactly the point. We draw a warning line at eighty percent, and the alert fires on day six, giving you days to clean up instead of minutes. See the pattern? Alert on the trend, before the failure, not after it.
Alerts with Uptime Kuma. For the online check, you don't need to build anything. Uptime Kuma is a free tool you install with one click from the Docker panel you met in lesson three. Every minute it visits your n8n address and the webhook your booking form calls, and it even warns you before your SSL certificate expires. If something stops answering, it messages you on Telegram or by email. One catch: if it lives on the same server and that server dies, it goes quiet too. So also add a free external uptime check, so someone outside is watching the watcher.
Common mistake: backups on the same server. The most common mistake is keeping backups on the same server as the live data. It feels safe, because the files are right there and restoring would be quick. But if the disk fails, your provider has an outage, or someone breaks in and deletes everything, the backup goes down with the server. It's like keeping your spare house key inside the house. The fix is simple: every nightly backup is encrypted and copied automatically to separate storage, such as a storage bucket with another provider. Set it up once, and it protects every client you serve.
Recap. Let's wrap up with three takeaways. First, back up the database, n8n with its encryption key, your documents and your config files every night, keep copies off the server, and prove them with a monthly restore. Second, update with a routine: pinned versions, a snapshot first, one app at a time, and a real test message afterwards. Third, monitor the vital signs and alert on trends, like disk usage crossing eighty percent, using a tool like Uptime Kuma plus an outside check. Do these three, and your server becomes something you can confidently sell to clients.
Exercise: give your server a health routine. Your task before the next lesson is to give your own server a health routine. Set up a nightly n8n workflow, or a cron job, which is the server's built-in scheduler, that dumps your database and copies it to storage outside the server. Then restore last night's file into a test database and compare the number of rows in one table, say customers, with the live one. Finally, install Uptime Kuma, add a check for your n8n address, and connect an alert to Telegram or email. Stop the n8n container for a minute and watch the alert arrive. Next lesson, all of this becomes part of your reusable AI OS blueprint.
Explore the animation
The animations from the video, exact and live: play them, pause, drag the slider or jump to a step at your own pace.
Loading the animation...
Lesson summary
- Video watched
- Back up nightly, offsite, and test a restore monthly
- Update with pinned versions, snapshots and a test
- Monitor vital signs and alert on trends