Skip to main content
FreeAn audit of your Drupal siteA written audit of your Drupal site, within three business days
All articles

PerformanceNov 11, 20265 min read

Why we run websites in hardened containers

Valentin ZsigmondFounder & Lead Engineer

When people picture a web server, they picture a machine: an operating system, a web server installed on it, a database next to it, and a folder where the website lives. That picture was accurate for a long time, and it is still how many sites run. It is not how we run them. Every site on our platform lives inside containers we build ourselves, stripped to the minimum, locked to read-only, and given only the abilities the application needs. This article explains what that means, why it changes what can go wrong, and why it is one of the reasons our sites stay quiet.

What a container is, in one paragraph

A container is a packaged, isolated environment that holds exactly one thing, such as the PHP runtime that executes Drupal, along with the files and libraries it needs, and nothing else. It shares the host machine's hardware with other containers but cannot see them. It starts from an image, which is a fixed snapshot built in advance, so every copy is identical. Your Drupal site runs as a small set of containers: one for PHP, one for the web server, one for the database, one for caching, each doing its job and talking to the others over a private network.

Minimal by construction

A traditional server carries a full operating system with hundreds of tools installed, most of which the website never uses. Each of those tools is code that could contain a vulnerability, and each is a convenience for anyone who gains a foothold. Our images contain only what the application needs to run: the runtime, its extensions and the libraries they depend on. There is no shell to open. There is no package manager to install things with. There is no compiler, no text editor, no network utility.

This has a security effect and an operational one. The security effect is that an attacker who somehow ran code inside the container would find nothing to work with. The operational one is that the image is small, starts fast, and has a short list of components to scan and keep current. Less software is less of everything.

Read-only code

The application code inside a running container is mounted read-only. Drupal core, every module, every theme and every custom component are exactly as they were built, and nothing running inside the container can change them. The only writable locations are the ones Drupal genuinely needs: the folder for uploaded files, a temporary directory, and the database, which lives in its own container.

The consequence is that a whole category of attack, quietly modifying a site's code to insert something malicious, has nowhere to land. Code cannot be altered in place. If a new version is needed, it arrives as a new image through the deployment process, from the repository, reviewed. What is running is always what was deployed, and it can be proven by comparison.

Least privilege at the process level

Inside the container, the application runs as an unprivileged user, not as the administrator. The few system capabilities a web server or PHP process genuinely needs are granted explicitly; all others are dropped. Outbound network connections are restricted to the destinations the site legitimately talks to, so a process cannot be turned into a tool for reaching other systems. Resource limits on memory and processing keep a misbehaving process from affecting its neighbors.

Each of these settings is small. Together they mean that even a compromised process can do very little: it cannot escalate its privileges, cannot change the code, cannot install tools, cannot reach arbitrary destinations and cannot starve the rest of the site. The blast radius of a problem is the container, and the container is disposable.

Isolation between sites

Each site's containers are separate from every other site's, with their own network and their own file storage. An issue in one site cannot reach another, even when they share a host machine. This is what makes shared infrastructure safe: the sharing is of hardware only, and the boundaries between tenants are enforced by the runtime rather than by trust.

Rebuilt, not repaired

Because a container starts from a fixed image, it is never repaired in place. When a vulnerability is fixed in PHP, the web server or a system library, we rebuild the image with the patched version, scan it, and roll it out. Every site receives the update in the same coordinated pass, and the running containers are replaced rather than modified. This is the property that lets us keep hundreds of components current across many sites without visiting each one, and it is why security updates reach every site quickly.

It also means recovery is fast. A container that is misbehaving is stopped and a fresh one started from the same image, in seconds, with no cleanup required. There is no accumulation of state on a server that slowly drifts from what anyone understands.

The same containers, everywhere

One more property matters more than it sounds. The same images run in production, on staging and on every developer's machine. When we test a change, we test it in the exact environment it will run in. Developing on the production stack removes an entire class of surprise, and it is only practical because the stack is packaged as images that run identically anywhere.

Why it belongs in the platform

None of this is visible to visitors or to editors. The site looks and behaves like any Drupal site. What changes is what can go wrong underneath it, and how much effort it takes to keep it that way. On our managed platform, hardened containers are the default for every site, and they are one of the layers of defense that let the others do less. If you would like to understand what your site is currently running on and how it compares, we are glad to explain, in as much or as little detail as you want.

Written by

Valentin Zsigmond

Founder & Lead Engineer

Full-stack Drupal architect with almost two decades of experience leading large teams in enterprise environments. Founded Tilizy Digital to bring senior-level expertise directly to the organizations that need it. Mentor to dozens of Drupal developers and creator of SDX — a Drupal extension for building modern frontends with React and Vue.

Enjoyed this article?

If this resonated, imagine what we could do working together on your Drupal site.