[{"data":1,"prerenderedAt":117},["ShallowReactive",2],{"seo-verification":3,"blog-heberger-directus-vps-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"id":7,"slug":8,"title":9,"excerpt":10,"readTime":11,"views":12,"isPinned":13,"publishedAt":14,"category":15,"categories":21,"featuredImage":23,"bgImage":24,"posterImage":25,"relatedSolution":26,"intro":28,"sections":29,"ctaTitle":72,"ctaBody":73,"ctaButton":74,"ctaUrl":75,"relatedPosts":76},63,"heberger-directus-vps","Hosting Directus on a VPS","Host Directus on your VPS: an open source headless CMS and data platform on top of your SQL database. Docker, Postgres, reverse proxy, and SSL guide.",7,731,false,"2026-04-18T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},6,"Databases","bases-de-donnees","bg-teal-500\u002F10 text-teal-400","database",[22],{"id":16,"name":17,"slug":18,"color":19,"icon":20},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fheberger-directus-vps-poster.svg",{"categorySlug":18,"appSlug":27},"directus","Directus turns any SQL database into an instant REST and GraphQL API, with a no-code administration interface on top. It's a headless CMS and a complete data platform, perfect to self-host on a VPS to manage the content of your sites and applications. Here's how to deploy it with PostgreSQL, Docker, and an SSL certificate.",[30,34,44,47,69],{"type":31,"title":32,"body":33},"h2","Why self-host Directus on a VPS","Directus plugs into your existing database (PostgreSQL, MySQL, SQLite, MariaDB) without imposing its own schema: it introspects your tables and generates an API and an admin interface on top. By self-hosting it on a VPS, you avoid the per-seat pricing of the official Cloud offering and you keep your content, your media, and your SQL database on your own infrastructure. It's a structuring choice for agencies that deliver several sites: a single Directus can serve as the back office for multiple front-ends (Nuxt, Next, mobile). Control of the database, extensions, and webhooks lets you integrate Directus into any data pipeline without depending on a third-party provider, all while benefiting from low latency for your local users.",{"type":35,"title":36,"items":37},"ul","The concrete benefits of self-hosting Directus",[38,39,40,41,42,43],"REST and GraphQL APIs generated automatically from your SQL schema, without writing code.","A no-code admin interface to model content, manage roles, and set granular permissions.","Compatible with an existing SQL database: you can expose it without migrating or altering it.","Media management, on-the-fly image transformations, and local or S3 storage of your choice.","Built-in Flows and webhooks to automate processing (notifications, synchronizations).","Pooling: a single Directus VPS can power several sites and front-end applications.",{"type":31,"title":45,"body":46},"Hardware and software prerequisites","Directus is a Node.js application that relies on an external database. Count on a minimum of 2 GB of RAM to comfortably run Directus and PostgreSQL on the same VPS; 4 GB are recommended in production with image transformations and several simultaneous administrators. One to two vCPU are enough to start. Plan for a Redis cache (optional but recommended for sessions and rate limiting) and a 30 to 60 GB SSD volume depending on your media library. You'll need Docker and Docker Compose, a domain pointing to the VPS, and a robust secret key for `SECRET` and token hashing. Postgres remains the recommended database for advanced features.",{"type":48,"title":49,"steps":50},"steps","Deploying Directus step by step",[51,54,57,60,63,66],{"title":52,"body":53},"Provision the VPS and Docker","After connecting via SSH, install Docker and Docker Compose. Create an A DNS record for `cms.mydomain.com` pointing to the VPS IP. Open only ports 80 and 443 in the firewall (`ufw allow 80,443\u002Ftcp`).",{"title":55,"body":56},"Define the stack in docker-compose.yml","Declare three services: `database` (image `postgres:16` with a persistent volume), `cache` (`redis`), and `directus` (`directus\u002Fdirectus`). Connect Directus to Postgres via the variables `DB_CLIENT=pg`, `DB_HOST=database`, `DB_DATABASE`, `DB_USER`, `DB_PASSWORD`.",{"title":58,"body":59},"Configure the environment variables","Fill in `KEY` and `SECRET` with random strings (`openssl rand -hex 32`), set `ADMIN_EMAIL` and `ADMIN_PASSWORD` for the first account, and `PUBLIC_URL=https:\u002F\u002Fcms.mydomain.com` so that links and uploads are correct.",{"title":61,"body":62},"Start and initialize the database","Run `docker compose up -d`. On the first startup, Directus automatically creates the system tables and the admin account. Follow the initialization with `docker compose logs -f directus`.",{"title":64,"body":65},"Connect the reverse proxy and TLS","Put Caddy or Traefik in front of Directus to handle Let's Encrypt. With Traefik, add the routing labels on the `directus` service and the ACME certresolver. Make sure `PUBLIC_URL` exactly matches the HTTPS domain to avoid CORS and upload issues.",{"title":67,"body":68},"Secure and back up","Restrict the CORS origins to your front-ends' domains, disable public registration if unnecessary, then schedule a daily `pg_dump` plus a copy of the `uploads` folder to remote storage.",{"type":70,"body":71},"tip","To serve images performantly, enable media storage on an S3-compatible bucket rather than the local disk, and cache the image transformations (`ASSETS_CACHE_TTL`). Coupled with a CDN in front of Directus, this offloads media requests from the VPS and speeds up front-end rendering. Also consider limiting the size of allowed transformations via `ASSETS_TRANSFORM_MAX_OPERATIONS` to prevent abuse of on-the-fly image generation.","Host your Directus headless CMS in full autonomy","With the ServOrbit Cloud VPS, deploy Directus and PostgreSQL in a high-performance Docker environment, with scalable resources and automatic SSL to power all your front-ends.","Deploy on Cloud VPS","\u002Fvps-cloud",[77,91,104],{"id":78,"slug":79,"title":80,"excerpt":81,"readTime":82,"views":83,"isPinned":13,"publishedAt":84,"category":85,"categories":86,"featuredImage":23,"bgImage":24,"posterImage":88,"relatedSolution":89},56,"heberger-postgresql-vps","PostgreSQL on a VPS: a reliable and controlled database","Host PostgreSQL on a VPS: volumes, backups, restricted network access and sound configuration for your applications.",8,2240,"2026-04-25T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},[87],{"id":16,"name":17,"slug":18,"color":19,"icon":20},"\u002Fblog\u002Fcovers\u002Fheberger-postgresql-vps-poster.svg",{"categorySlug":18,"appSlug":90},"postgresql",{"id":92,"slug":93,"title":94,"excerpt":95,"readTime":11,"views":96,"isPinned":13,"publishedAt":97,"category":98,"categories":99,"featuredImage":23,"bgImage":24,"posterImage":101,"relatedSolution":102},57,"heberger-mysql-vps","Hosting MySQL on a VPS","Host MySQL on your Cloud VPS: Docker deployment, hardening, InnoDB tuning, and automated backups, step by step.",509,"2026-04-24T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},[100],{"id":16,"name":17,"slug":18,"color":19,"icon":20},"\u002Fblog\u002Fcovers\u002Fheberger-mysql-vps-poster.svg",{"categorySlug":18,"appSlug":103},"mysql",{"id":105,"slug":106,"title":107,"excerpt":108,"readTime":11,"views":109,"isPinned":13,"publishedAt":110,"category":111,"categories":112,"featuredImage":23,"bgImage":24,"posterImage":114,"relatedSolution":115},58,"heberger-redis-vps","Hosting Redis on a VPS","Deploy Redis on your Cloud VPS: ultra-fast cache, sessions, and queues, with persistence, security, and memory tuning.",546,"2026-04-23T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},[113],{"id":16,"name":17,"slug":18,"color":19,"icon":20},"\u002Fblog\u002Fcovers\u002Fheberger-redis-vps-poster.svg",{"categorySlug":18,"appSlug":116},"redis",1785628435276]