Skip to content
TsakmakTsakmak

Project

Secure self-hosted platform

The home server behind my tools, secured with the controls I recommend to others.

Where it runs: On my home server (private)

Platforms
Server

The problem

I work with network segmentation, least privilege and backups in my security work. I also run my own applications, with real data, on one server at home. If those controls are worth recommending, they should hold on my own systems too. And an AI coding agent that deploys a new application there must not be able to weaken them by accident.

What it does

The platform runs every application on this site: Greek Freelancer Finance, Tasks, Job Tracker, ITSRMA, Marangos, the S&P 500 Simulator and the website itself. Nothing on the server is open to the internet. Applications live in their own sealed network zones (a few older and development setups still have exceptions that I am closing, see the limits below), get outbound internet only when they need it, and cannot reach the server or my home network. One written hosting standard tells every builder, human or AI, how an application must be built and deployed. Backups are scripted, and I have tested a restore.

How it works

  1. A visitor opens an application. The request reaches Cloudflare, which handles HTTPS.

  2. An outbound tunnel from my server carries the request in. No port on my router is open to the internet.

  3. One shared reverse proxy passes the request to the application's front container, over that application's own sealed front zone.

  4. The application reaches its database, cache and workers in a second sealed zone that the proxy never joins. The production databases publish nothing and have no route out.

  5. A container that must call an outside service gets a separate outbound network, and only that container. A host firewall still stops it from reaching the server itself or my home network.

Key features

A sealed network zone per application

The standard gives every application two networks that have no route to the server, the home network or the internet: a front zone for the web container and the proxy, and a back zone for the application, its database, cache and workers. Applications cannot reach each other's zones, and the proxy cannot reach any database. Control idea: network segmentation and least privilege.

Diagram of the request path from a visitor through Cloudflare and an outbound tunnel to one shared proxy, then into separate sealed front and back zones for each application, with an optional outbound network fenced off from the server and the home network by a firewall
Request path and network zones (simplified, no real names)
  • Entry only through the tunnel

    There are no open router ports and no public address. All public traffic comes through one outbound tunnel to one shared proxy, and the tunnel never points straight at an application. Control idea: reduce the attack surface and deny inbound traffic by default.

  • Outbound access on request, fenced off from home

    Outbound internet is off unless a container needs it, and the reason is written in the application's README. Tasks, for example, gets it for push notifications, while its database and cache have no route out. A firewall on the server keeps those containers away from the server itself and from every other device on my home network. It is changed with a safe "try, then confirm" step that undoes itself unless I confirm it. Control idea: default deny for outbound traffic, defence in depth and safe change.

  • Debug access that closes itself

    Debug access is closed by default: when a test needs to talk to a sealed container, a small helper opens a temporary port that only the server itself can reach. The helper runs with minimal rights, never closes while a connection is in use, and closes on its own after a short time without connections. Every agent session must end with the helper's port closed. A few older applications still keep a permanent port that answers only on the server itself; those are not part of the helper. Control idea: time-limited, just-in-time access.

  • One written standard for every builder, human or AI

    A written hosting brief covers how a request reaches an application, the network rules, container hardening (no root user, read-only filesystem where possible, all extra privileges dropped), secrets only in protected configuration files that never enter git, and a sign-in baseline for applications that hold data. It is written for two roles: an AI agent that builds an application, and an AI agent on the server that deploys it with a checklist, including a check from inside the container that isolation really works. The same rules are repeated in the agent instructions of each application, and agents are told never to "fix" a failing connection by opening a network. Control idea: secure defaults and clear supplier requirements for AI agents.

  • Full backups with a tested restore

    Nightly scheduled backups run for some applications. A full-server backup script makes a logical dump of every database, archives the data and configuration, writes checksums and stores the set on an external drive. I have tested the restore from this full backup: an agent took the backup and the setup and rebuilt the whole server on a new machine. Control idea: backup with integrity checks and a tested restore.

Security and privacy

  • Nothing on the server is reachable from the internet except through the tunnel.
  • Cloudflare terminates HTTPS, so traffic is decrypted at Cloudflare before it travels through the tunnel to my server.
  • There is no extra identity wall in front of the applications. I chose not to add one for now. Each application that holds data has its own sign-in, and public tools such as Marangos and the S&P 500 Simulator have no login and store nothing on the server.
  • The proxy's admin interface listens only on the server itself.
  • Secrets live in protected configuration files, never in code or in git.
  • Backups go to an external drive. There is no automated off-site copy.
  • There is no monitoring or alerting yet. Container health checks exist, but nothing warns me when something fails.
  • I claim no certification or compliance with any standard for this setup. It applies common control ideas to a home server.

Under the hood

One Linux server at home runs every application in containers. The controls are enforced in configuration and short scripts, not only written down: network rules for each application, a host firewall started as a system service, a self-closing debug helper and a backup script. The repository keeps the hosting standard, the scripts and copies of the shared configuration.

I build and run this by directing AI coding agents. The hosting standard and the repository instructions bind every agent that works on the server, each change is committed with its reason, and some steps stay with me: only I publish a new public address, and agents must not touch other applications. Built with AI agents, reviewed by a security professional.

Limits:

  • It is one machine at home. If it fails, the applications are down until I restore it.
  • No monitoring or alerting yet.
  • There is no automated off-site copy.
  • Not every application has its own nightly backup; the others rely on the full-server backup.
  • A few older applications still have exceptions: one shares a network, one has a front network with a route out, one development database publishes a port on the server itself, and a few keep permanent server-only ports. I am closing these.
  • The platform scripts have no automated tests.

Stack

  • Linux
  • Docker
  • Docker Compose
  • Shell scripts
  • Host firewall rules
  • systemd
  • cron
  • Cloudflare Tunnel

Get in touch