Case study / AutomationSelf-hosted AI automation server

A private server in my home lab that captures and scores ideas, plans the work around my free time, runs a small team of AI agents, and publishes approved content on a schedule. No open ports, and nothing goes public without my approval.

n8n / Docker / PostgreSQL / Node.js / Cloudflare

Problem

I wanted one place that turns ideas into finished work without giving up control. Planning, drafting, scheduling, and publishing are repetitive, but I still want to be the one who decides what goes out.

My role

I designed the architecture, set the rules, reviewed every change, and tested the results. I built it with AI coding agents as my implementation partner.

Tools

Proxmox, Ubuntu Server, Docker Compose, PostgreSQL, Node.js and Express, n8n, Python, and systemd timers. Cloudflare Tunnel, Zero Trust access, R2, and Pages. Git and GitHub, rclone for encrypted backups, and Playwright. The Meta Graph, Google Business Profile, Search Console, and Analytics APIs. Claude and GPT models, a self-hosted multi-agent platform, and AI coding agents.

Infrastructure

  • A Linux virtual machine on my Proxmox server runs a Docker Compose stack: PostgreSQL, n8n, a custom Node.js web app, a self-hosted AI agent platform, and a secure tunnel.
  • No inbound ports are open. Public access goes through Cloudflare Tunnel, and every tool sits behind a Zero Trust login with multi-factor authentication.
  • I administer it remotely over a private mesh VPN.

Ideas and planning

  • A mobile-first web app, installable on my phone, where I capture ideas by voice or text.
  • An n8n workflow uses an LLM to rewrite each idea and score it on seven criteria, with a short reason and a tip to improve it.
  • A focus limit keeps only a few ideas active at once.
  • For active ideas, AI breaks the work into small steps. A deterministic, unit-tested scheduler then assigns due dates based on my actual free time and priorities. Missed steps roll forward instead of piling up.

AI agents

  • A self-hosted, open-source multi-agent platform organized like a small company: a lead agent plus specialists for research, writing, design, web development, and review.
  • Different models for different jobs, on subscriptions instead of pay-per-use API keys. Schedules are off by default, so every run is deliberate.
  • Agents only draft. Nothing they make goes public without my approval.

Publishing

  • Each week a scheduled routine has the agents plan and design a batch of posts, with a version for each platform.
  • Drafts land on an approval dashboard I built, with a preview, a checkbox, and a time for each platform. One click approves a post everywhere.
  • A publisher service posts through the platforms’ official APIs. It checks that files have not changed since approval, strips image metadata, uses temporary public media links that delete themselves, and is built never to post the same thing twice.
  • A reviewer agent checks every batch against written rules. A tool stamps exact contact details onto images and verifies them with OCR. A posting history built from the live feeds stops repeated topics and headlines.

Website changes

  • Agents can build new web pages, but they only hold read-only access. They hand off finished work as a package, a publish script runs safety checks, and the change goes to a preview branch with its own link. I review it on my phone and merge it myself.
  • A monthly analysis agent reads search and analytics data and proposes up to three improvements, each with measured evidence. I approve or reject them on the dashboard.

Performance

When a site’s animations stuttered on fast scrolling, I measured before changing anything: scripted fast-scroll tests in headless WebKit and Chromium, recording frame timing and layout counts. The data pointed to the real causes. The fixes cut dropped frames on the heaviest page by about 75% and removed a visual flicker entirely, with no change to the design.

Security

  • Least privilege everywhere: separate limited identities for automation, read-only access to data, tightly scoped tokens, and an allow-list of the exact API calls each publisher may make, enforced in code and covered by tests.
  • Secrets are entered through hidden prompts and stored with locked-down permissions, never in chats or code.
  • Encrypted nightly off-site backups, with a written restore procedure and real restore tests.
  • Security patches applied across the stack, file handling hardened against symlink tricks, and versions pinned so updates happen on purpose.

Principles

  • A human approves everything that goes public or changes a live system.
  • The smallest access that works, for every account, token, and agent.
  • Measure before fixing, and test before trusting.
  • Keep it cheap and simple: subscriptions over per-use billing, and one weekly batch instead of constant agent activity.

Result

  • A weekly content batch takes about 10 minutes of my time to review and approve, across three platforms.
  • New web pages go from idea to reviewed preview without me writing the code.
  • Zero open inbound ports, tested backups, and an approval gate on every public action.