Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Directus
  3. How to Properly Set Up Multiple Directus Environments (Dev, Sandbox, Prod) on Cloudron?

How to Properly Set Up Multiple Directus Environments (Dev, Sandbox, Prod) on Cloudron?

Scheduled Pinned Locked Moved Directus
9 Posts 6 Posters 127 Views 6 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DualOSWinWiz
    wrote last edited by
    #1

    Hi Cloudron team and community,

    I’m planning to deploy Directus on Cloudron and would like to structure it properly from the beginning with three isolated environments:

    Development

    Sandbox / UAT

    Production

    Since Directus uses internal system tables (directus_collections, directus_fields, directus_relations, etc.), I want to avoid schema conflicts or corruption when promoting changes between environments.

    I’m aware that tools like pg_dump, Devart, or traditional SQL export don’t handle Directus metadata well, so I’m exploring directus schema snapshot / schema apply for schema promotion and version control.

    Before I begin, I’d appreciate help with:

    1. What’s the best way to set up three separate Directus instances (e.g., directus-dev.domain.com, directus-sandbox.domain.com, etc.) on a single Cloudron server?

    2. Will I run into any issues running multiple Directus apps on the same box, each with their own PostgreSQL database?

    3. Any best practices or gotchas for syncing schema and config across environments using CLI-based snapshots?

    4. If needed later, can Directus apps on Cloudron be CI/CD integrated (e.g., via schema promotion scripts) without breaking Cloudron’s update flow?

    I'm aiming for a clean, maintainable setup that supports Git-based schema tracking and safe production deployments. Any community-tested advice or examples would be very helpful.

    Thanks in advance!

    andreasduerenA 1 Reply Last reply
    2
    • D DualOSWinWiz

      Hi Cloudron team and community,

      I’m planning to deploy Directus on Cloudron and would like to structure it properly from the beginning with three isolated environments:

      Development

      Sandbox / UAT

      Production

      Since Directus uses internal system tables (directus_collections, directus_fields, directus_relations, etc.), I want to avoid schema conflicts or corruption when promoting changes between environments.

      I’m aware that tools like pg_dump, Devart, or traditional SQL export don’t handle Directus metadata well, so I’m exploring directus schema snapshot / schema apply for schema promotion and version control.

      Before I begin, I’d appreciate help with:

      1. What’s the best way to set up three separate Directus instances (e.g., directus-dev.domain.com, directus-sandbox.domain.com, etc.) on a single Cloudron server?

      2. Will I run into any issues running multiple Directus apps on the same box, each with their own PostgreSQL database?

      3. Any best practices or gotchas for syncing schema and config across environments using CLI-based snapshots?

      4. If needed later, can Directus apps on Cloudron be CI/CD integrated (e.g., via schema promotion scripts) without breaking Cloudron’s update flow?

      I'm aiming for a clean, maintainable setup that supports Git-based schema tracking and safe production deployments. Any community-tested advice or examples would be very helpful.

      Thanks in advance!

      andreasduerenA Offline
      andreasduerenA Offline
      andreasdueren
      wrote last edited by
      #2

      @DualOSWinWiz Absolutely no idea but please keep us updated!

      1 Reply Last reply
      1
      • J Offline
        J Offline
        joseph
        Staff
        wrote last edited by
        #3

        Same here, I don't have much idea of Directus. For the Cloudron specific questions:

        1. Yes, you can just install 3 app instances of Directus
        2. I don't expect any issues. In fact, it's quite a common set up to have many app instances . As you said, each app has it's own PostgreSQL database, they won't mess wieth each other .

        3 and 4 - I don't know the answer . But I would say if you can write up on how what you have in mind can be managed outside of Cloudron, we can help map it to Cloudron workflow.

        1 Reply Last reply
        1
        • D Offline
          D Offline
          DualOSWinWiz
          wrote last edited by
          #4

          The problem is managing the consistency as a pipeline methodology between environments like"development", "sandbox" and "production".

          Where if all 3 apps are on same version how could i push code changes from dev to Production. Because of Metadata postgress to postgree sql migration even with a paid tool like Devarts PostgreSQL Studio failed

          jdaviescoatesJ 1 Reply Last reply
          0
          • jamesJ Offline
            jamesJ Offline
            james
            Staff
            wrote last edited by
            #5

            Hello @DualOSWinWiz

            One Idea:

            Since the prod instance is the master and has the highest priority of data, each dev / sandbox or stage could be a fresh clone from the latest app backup of the master.

            This way all other instances have the master data, and you can work with that data and direct cloned setup to confirm what you are planning to do works.
            Then do the same on the master and all others will then have to re-deploy from the new master.

            D 1 Reply Last reply
            0
            • D DualOSWinWiz

              The problem is managing the consistency as a pipeline methodology between environments like"development", "sandbox" and "production".

              Where if all 3 apps are on same version how could i push code changes from dev to Production. Because of Metadata postgress to postgree sql migration even with a paid tool like Devarts PostgreSQL Studio failed

              jdaviescoatesJ Offline
              jdaviescoatesJ Offline
              jdaviescoates
              wrote last edited by
              #6

              @DualOSWinWiz said in How to Properly Set Up Multiple Directus Environments (Dev, Sandbox, Prod) on Cloudron?:

              how could i push code changes from dev to Production

              I'd try cloning from a backup of staging into production or something like that.

              Or perhapa Syncyhing could somehow ne used? 🤷‍♂️

              I use Cloudron with Gandi & Hetzner

              D 1 Reply Last reply
              1
              • jamesJ james

                Hello @DualOSWinWiz

                One Idea:

                Since the prod instance is the master and has the highest priority of data, each dev / sandbox or stage could be a fresh clone from the latest app backup of the master.

                This way all other instances have the master data, and you can work with that data and direct cloned setup to confirm what you are planning to do works.
                Then do the same on the master and all others will then have to re-deploy from the new master.

                D Offline
                D Offline
                DualOSWinWiz
                wrote last edited by
                #7

                @james, the problem is that, as you said, production will always have priority over data. Let's say I create a clone from production to work on a sprint. After one week of work, if all is good, the sandbox will be ready to be deployed on production. At that time, production will have new data. How to handle that? Because Directus on Cloudron only supports one database, it cannot be linked with another at that crucial time. CI/CD comes into play, which I am trying to figure out. 🤯 #Production #Data #Deployment #CI/CD #Database #Sandbox

                1 Reply Last reply
                1
                • jdaviescoatesJ jdaviescoates

                  @DualOSWinWiz said in How to Properly Set Up Multiple Directus Environments (Dev, Sandbox, Prod) on Cloudron?:

                  how could i push code changes from dev to Production

                  I'd try cloning from a backup of staging into production or something like that.

                  Or perhapa Syncyhing could somehow ne used? 🤷‍♂️

                  D Offline
                  D Offline
                  DualOSWinWiz
                  wrote last edited by
                  #8

                  @jdaviescoates i tried multiple things for synching and app start creating data integrity errors.

                  1 Reply Last reply
                  0
                  • robiR Offline
                    robiR Offline
                    robi
                    wrote last edited by
                    #9

                    Doesn't Directus support more than one project at a time?

                    Conscious tech

                    1 Reply Last reply
                    1
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Bookmarks
                    • Search