Drupal Self-Hosted
IntermediateWebsiteDrupal in Docker on your own server: structured content, your database, and no per-site hosting bill.
Published 1 December 2026Last updated 1 December 2026
About Drupal Self-Hosted
Drupal Self-Hosted runs Drupal in Docker on a server you control, with its database beside it: MariaDB by default, or MySQL, PostgreSQL, or SQLite, all four supported by Drupal core. It is the same Drupal that governments, universities, and large publishers run, with structured content, Views, multilingual sites, and JSON:API in core. Drupal 11 is the current major version and needs PHP 8.3 or newer, which the official image already contains.
Drupal has no vendor cloud of its own. The managed Drupal platforms charge per site and set monthly visit limits, while this stack is a fixed server bill: one VPS with 2 GB of memory carries a site and its database, with any contributed module, any PHP setting, and your content on your own disk.
Composer is how a Drupal site is built. The official Docker image, maintained through Docker's official-images program rather than by the Drupal project, holds Drupal core behind Apache and nothing more: no Drush, no contributed modules, no extra PHP extensions. A real site keeps composer.json and its lock file in Git and builds its own image on top, from plain core or the Drupal CMS distribution. Uploaded files and settings.php live in the sites directory, which goes on a volume.
The trade is operations. Drupal publishes security advisories for core and contributed modules, and each minor version gets security fixes for about a year, so updates run on a schedule. Behind a reverse proxy or deploy platform, settings.php also needs the trusted host patterns and the proxy's address.
Key Features
- ✓Drupal 11 from the official Docker image, extended with your own Composer build
- ✓MariaDB by default, with MySQL, PostgreSQL, and SQLite all supported by Drupal core
- ✓Plain Drupal core or the Drupal CMS distribution with recipes and the Canvas page builder
- ✓Content types, Views, multilingual sites, and JSON:API from one install
- ✓Configuration exported to files and versioned in Git next to composer.json
When to Use Drupal Self-Hosted
- Universities, public bodies, and nonprofits that must keep content on infrastructure they control
- Multilingual or multi-department sites with complex content models and permissions
- A content backend serving JSON:API to a separate frontend or mobile app
- Agencies running Drupal sites for clients without per-site platform fees
- Teams leaving a managed Drupal platform whose visit limits or plan prices they have outgrown
Pros
- No per-site or per-visit pricing: the server bill is the whole bill
- Any contributed module, PHP extension, or server setting, with nothing gated by a platform
- Four database engines to choose from, all supported by Drupal core
- Site code, dependencies, and configuration live in Git, so every environment rebuilds the same way
Cons
- Heavier than a WordPress or Ghost server: Drupal.org lists 1 GB of RAM as the minimum, and a site with its database on the same server wants 2 GB
- Security updates for core and every contributed module are a standing obligation, alongside backups and TLS
- Every module change goes through Composer and an image rebuild rather than a click in the admin
- Outgoing mail needs an SMTP module and an external mail service before password resets and notifications arrive
Database Options for Drupal Self-Hosted
The default, and a member of the MySQL family that Drupal's own docs point to when they warn that some contributed modules carry MySQL-specific code. Drupal 11 needs MariaDB 10.6 or newer with InnoDB. It holds content, users, configuration, and by default every cache table, so a busy site's database works harder than its content size suggests. A nightly dump plus the sites volume is a full backup.
Equally supported through the same core driver, at MySQL 8.0 or newer for Drupal 11, which dropped 5.7. Pick it when the managed database or company standard is MySQL, as with RDS or DigitalOcean's managed MySQL. A managed service means you self-host Drupal while the content itself lives on the provider's database servers, which matters when data control is the reason for self-hosting.
Supported by core at PostgreSQL 16 or newer with the pg_trgm extension, which the installer creates itself when its database user is allowed to; on a managed service an admin may have to run CREATE EXTENSION first. It is the engine both Coolify's Drupal template and the Docker image's own Compose example use. Test the contributed modules you depend on, since a few still assume MySQL.
The single-file choice: the database sits in the sites volume, so there is no second container to run, and it is the Docker image's own quickest setup. Drupal 11 needs SQLite 3.45 or newer. It suits a small site with a handful of editors, or an evaluation; writes queue one at a time, and the image's documentation calls the server databases the more production-ready route.
These are highlighted picks. To see all the tools, check the Databases category.
Hosting Options for Drupal Self-Hosted
The default: a flat-rate root VPS whose 2 vCPU, 4 GB server costs from about €6 a month, four times Drupal.org's 1 GB minimum, so the site, its database, and an occasional image build fit on one box. A Storage Box from about €3 a month is a cheap off-site target for nightly database dumps and the sites volume. Updates, backups, and the firewall are yours.
Hostinger's VPS line, not its shared hosting: the KVM 1 plan has 4 GB of memory and one vCPU for $6.49 a month on a two-year term, $11.99 at renewal, with weekly backups and a beginner-friendly panel. A single vCPU makes Composer builds slow, so build the site's image in CI and pull it; serving the site itself is no problem.
A root-access cloud VPS with per-second billing, snapshots, and a cloud firewall from the panel. The 2 GB Droplet at $12 a month runs one site with its database beside it, and the 4 GB size at $24 leaves room for Redis and builds. Managed MySQL or PostgreSQL from $15 a month takes the database off the Droplet, and the marketplace's OpenLiteSpeed Drupal 1-Click is a native install for anyone who would rather skip Docker.
Managed cloud: an EC2 instance, with a t3.small (2 vCPUs, 2 GB) at about $15 a month on demand, for organizations whose accounts, compliance rules, or other systems already sit in AWS. RDS can run the site's MariaDB, MySQL, or PostgreSQL database as a managed service, and the contributed S3 File System module moves uploads to S3 once more than one web server has to share them.
These are highlighted picks. To see all the tools, check the Hosting & Cloud category.
Reverse Proxy Options for Drupal Self-Hosted
Routes to the Drupal container from Docker labels and renews certificates on its own. Drupal then sees every visitor arriving from Traefik's address, so turn on the reverse proxy setting in settings.php with the Docker network's range as a trusted address; without it, login flood control treats all visitors as one IP and can block everyone after 50 failed logins in an hour.
Automatic certificates from a two-line site block, the least upkeep for one site. Caddy forwards X-Forwarded-Proto by default, but Drupal ignores it until settings.php trusts the proxy, and until then absolute links come out as http. Drupal's docs cover only Apache and NGINX as web servers, so Caddy sits in front of the image's Apache here rather than serving PHP itself.
One of the two web servers Drupal documents, with TLS through Certbot. In front of the Apache image, raise client_max_body_size past its 1 MB default and PHP's 2 MB upload limit in the image too, or media uploads fail. NGINX can also replace Apache by serving the image's FPM variant, but then it has to recreate the protections Drupal's .htaccess file provides.
Self-Hosted PaaS Options for Drupal Self-Hosted
Free and self-hosted, with a one-click Drupal template that runs the official Drupal 11 Apache image next to PostgreSQL 16, with volumes for modules, themes, profiles, and sites, and HTTPS through Coolify's bundled proxy. Choosing it means PostgreSQL rather than MariaDB, and the stock image has no Drush or contributed modules, so for a real site point Coolify at the repository with your own Dockerfile.
Free and self-hosted, with no Drupal template in its catalog: deploy your Dockerfile, or a Compose file with Drupal and MariaDB, behind its bundled Traefik with HTTPS from the dashboard. Its scheduled backups cover the database service; add the sites volume to your own backups, since uploaded files and settings.php live there rather than in the database.
Free and self-hosted, with no template: git push the repository with your Dockerfile, or deploy the official image with git:from-image, then link the official MariaDB plugin and enable HTTPS with the Let's Encrypt plugin. Mount persistent storage for the sites directory, or uploaded files and settings.php vanish on the next deploy.
Drupal Self-Hosted Add-ons
Each addition below extends this stack with a capability the base stack works fine without. None are required: include the ones your product actually needs when building this stack, and skip the rest.
Tunnel Add-ons
Add a tunnel when you're self-hosting without a static IP or can't open inbound ports — a home server, a VPS behind restrictive network policies, or anywhere a reverse proxy alone can't reach the internet.
Optional. Publishes a Drupal site on a home or office server through an outbound-only connection, with no open ports or static IP. Add the public hostname to trusted_host_patterns, or Drupal rejects the requests as an invalid host, and mind the free plan's 100 MB request limit if editors upload large video.
Optional and for previews: one command gives a local Drupal a public HTTPS address, for showing a work-in-progress site to a client or testing a webhook. The free plan's limits suit that, not a live site, and the ngrok hostname needs a line in trusted_host_patterns like any other.
Caching Add-ons
Add caching when the same reads or computations repeat and you want them answered from memory: a cache holds hot data, shared counters, and session state in front of a database or an upstream API.
Optional, for busy or module-heavy sites. Drupal keeps its cache in database tables by default; the contributed Redis module moves those cache bins into Redis and takes that read and write load off the database. The official image has no Redis extension, so add PhpRedis to your image, or the Predis library with Composer, before switching it on.
Frequently Asked Questions about Drupal Self-Hosted
Is there a managed Drupal, or should I self-host it?
Drupal has no vendor cloud: the Drupal Association runs the open-source project, not a hosting service. Commercial platforms such as Acquia and Pantheon run it managed, with development, test, and live environments and a CDN, priced per site with monthly visit limits, and a paid plan is required to take a site live. Self-hosting replaces that with one server bill however busy the site gets, root access for any PHP extension or setting, and your content on your own disk. The trade is that security updates, backups, and TLS become your job, which is what those platforms charge for.
What size server does Drupal need?
Drupal.org's memory guide lists 1 GB of RAM as the minimum, and the same page asks for about 1 GB of free memory whenever Composer runs. PHP needs at least 64 MB per process, with 128 or 256 MB typical in production, so concurrent visitors and module weight set the real figure. In practice a site with its database on the same server is comfortable at 2 GB, and a module-heavy or busy site wants 4 GB, with the optional Redis cache taking load off the database. Building the site's image in CI rather than on the server keeps Composer's memory spike off a small production box. Disk needs are modest for code and database; the uploaded files in the sites volume are what grow.
Should I start from Drupal core or Drupal CMS?
Drupal CMS is Drupal core plus a curated set of modules and recipes for SEO, media, forms, and privacy, the Canvas drag-and-drop page builder, and optional AI tools, aimed at marketers and site builders. Start there for an organization's website where editors build pages themselves. Start from core, the recommended-project template the official image already contains, when developers will model the content and choose every module. Either way the site is a Composer project you build into your own image. Drupal CMS also ships Project Browser, which installs modules from the admin interface, but in a container that changes files the image does not keep: add modules with Composer in the build instead, or they can lose their dependencies the next time the container is replaced.
What needs backing up, and how do upgrades work?
Two things hold the site: the database, with content, users, and configuration, and the sites directory on its volume, with uploaded files and settings.php, which carries the site's hash salt. Code is rebuilt from composer.json and composer.lock in Git, and exporting configuration to files in the same repository makes it reproducible too. An update is a routine: back up, rebuild the image with composer update, replace the container, and run Drush's database updates. Minor versions arrive every six months and each gets security fixes for about a year, so staying one minor behind is fine and two is not. Major versions come about every two years; Drupal 11 is supported until late 2028, and Drupal 12, the next major, requires PHP 8.5, so check contributed modules with the Upgrade Status module before moving.
Drupal or WordPress for a self-hosted site?
Pick Drupal when the content has structure: many content types with fields and references, fine-grained roles, several languages, editorial workflows, or a JSON:API backend for a separate frontend, all in core. WordPress is easier to start with, has the larger plugin and theme market, and costs less to staff, and WordPress Self-Hosted runs the same way on the same kind of server with a lighter footprint. Day-to-day work differs too: a WordPress plugin installs from the dashboard, while a Drupal module goes through Composer and an image rebuild, which is more work up front and more reproducible later.
Stacks Related to Drupal Self-Hosted
WordPress Self-Hosted
InfrastructureSelf-hosted WordPress with Docker: the world's CMS on your own infrastructure.
Airbyte Self-Hosted
InfrastructureSelf-hosted Airbyte on your own Kubernetes cluster, with 300-plus connectors and no per-connector cost.
Self-Hosted Version Control
InfrastructureYour team's Git hosting on your own server, with Gitea or Forgejo running in Docker.
MLflow Self-Hosted
InfrastructureSelf-hosted MLflow: every experiment and model version on your infrastructure.
Scores
Popularity3/5
Established
A well-known CMS and second only to WordPress among the largest sites, but it runs a small share of the web overall, and guides to self-hosting it are far fewer than for WordPress.
Learning Curve4/5
Demanding
Docker and a database are the easy part. A working site also asks for a Composer-based image build, settings.php configuration behind a proxy, configuration management, and Drupal's own entity and module concepts.
Flexibility5/5
Unopinionated
Content types, fields, Views, and JSON:API cover anything from a brochure site to a decoupled backend, any of four database engines runs it, and the image extends with any module or PHP extension.
Performance3/5
Average
Core's page and dynamic page caches serve anonymous and repeat traffic quickly on a small server, but uncached pages on a module-heavy site are slow without Redis, a tuned database, or a CDN in front.
Portability4/5
Portable
GPL software, a standard database, and a Composer project in Git move between any server or managed Drupal platform. Leaving Drupal itself means migrating content models and modules.
Tools in the Drupal Self-Hosted Stack
Drupal Self-Hosted Pricing
Drupal, its database, and Docker are free, so the bill is one server: a 2 GB VPS carries a site and its database, and 4 GB plans start around $6 a month on long terms. Managed Drupal platforms charge per site instead, with Pantheon's Basic plan at $55 a month and a visit limit. The Redis cache, the reverse proxies, and the deploy platforms here are free too; paid extras are optional, such as commercial themes or support contracts.
Drupal.org lists 1 GB of RAM as the minimum; 2 GB runs a site with its database on the same server, and 4 GB adds room for Redis and image builds. 4 GB costs about €6 a month at Hetzner when its cost-optimized line is in stock (otherwise about €17) or $6.49 at Hostinger on a two-year term; DigitalOcean is $12 for 2 GB and $24 for 4 GB.
Drupal is GPL-licensed, all four database engines are free and open source, and so is Docker Engine; contributed modules and themes on drupal.org are free as well.
The reverse proxies, deploy platforms, and tunnels here are free, open-source software or free tiers, and TLS certificates come from Let's Encrypt.
Drupal Self-Hosted System Requirements
source- CPU
- No official minimum
- RAM
- 1 GB minimum
- PHP
- 8.3 or newer for Drupal 11
- Database
- MariaDB 10.6+, MySQL 8.0+, PostgreSQL 16+ with pg_trgm, or SQLite 3.45+
- Web server
- Apache 2.4.7+ (bundled in the official image) or NGINX 1.1+
Drupal.org's memory requirements page lists 1 GB of RAM as the minimum and recommends about 1 GB of free memory when Composer runs. PHP's memory_limit must be at least 64 MB, with 128 or 256 MB typical in production. With the database on the same server, 2 GB is the practical size for one site, and a module-heavy or busy site wants 4 GB.