A powerful web-based management application that allows you to create, manage, and host multiple Directus CMS instances on a single server. Each instance runs independently with its own database, storage, and configuration.
- Multi-Instance Management: Create and manage unlimited Directus instances
- Unified Dashboard: Single interface to manage all your instances
- No Sudo Required: Runs entirely with user permissions
- HTTP & HTTPS Support: Caddy handles automatic SSL certificates via Let's Encrypt
- Process Management: PM2 integration for reliable instance management
- Modern UI: Clean, responsive interface built with server-side rendering
- System Monitoring: Real-time status of Caddy, PM2, and system resources
The project is structured as a unified Node.js/Express application that manages child processes for Directus instances.
directus-multimode/
├── app/ # Unified Express application
│ ├── api/ # API routes and logic
│ ├── components/ # UI components and partials
│ ├── lib/ # Utilities and helpers
│ ├── public/ # Static assets (CSS, JS, Images)
│ ├── views/ # EJS Page templates
│ └── server.js # Main application entry point
├── instances/ # Directory where Directus instances live
├── data/ # Application data, PM2 logs, and main DB
├── .env # Main configuration file
├── package.json # Project dependencies and scripts
├── start.sh # Quick start script
└── stop.sh # Stop script
- Node.js 18+ and npm
- Caddy (optional, for reverse proxy with HTTPS)
- macOS:
brew install caddy - macOS:
brew install caddy - Linux: See Caddy installation guide
- macOS:
- PM2 (optional but recommended)
npm install -g pm2- If not installed, the app will use
npx pm2automatically (slower).
Copy the example environment file:
cp .env.example .envInstall the project dependencies:
npm installYou can start the application using the helper script:
./start.shOr directly via npm:
npm startThe application will be available at http://localhost:3001 (or the port defined in your .env file).
For development, use the watch mode which automatically restarts the server when files change:
npm run dev- Views: Edit HTML structure in
app/views/ - Styles: CSS files located in
app/public/css/ - Logic: Backend logic in
app/api/andapp/lib/
- Navigate to the Dashboard.
- Click "+ New Instance".
- Enter the instance name, email, and password.
- The system will create a new Directus instance in the
instances/directory. - Once created, you can Start/Stop/Restart/Clone/Delete the instance from the dashboard cards.
Real-time installation progress
- Direct Port: Each instance runs on a unique port (assigned automatically).
- Subdomain: If Caddy is configured, instances are accessible via
http://<subdomain>.localhost.
Manage your instances directly from the dashboard card menu.
- Start All:
./start.sh - Stop All:
./stop.sh- safe shutdown of all instances and the main app. - PM2 Logs:
npm run pm2:logs- View logs for all running instances.
The application provides a REST API for management functions.
GET /api/instances- List all instancesPOST /api/instances- Create a new instancePOST /api/instances/:id/:action- Perform action (start/stop/restart/delete)GET /api/system/status- Get system status (Caddy, etc.)
- Check if the defined port (default 3001) is in use.
- Verify Node.js version is 18+.
- Check the application logs:
npm run pm2:logs. - Ensure you have write permissions in the
instancesdirectory.
- Ensure Caddy is installed and in your PATH.
- Check the generated Caddyfile in
Caddyfilefor errors.
- The app uses a local PM2 instance stored in
data/.pm2. - View logs:
npm run pm2:logs - Kill all instances:
npm run pm2:stop
MIT License
Contributions are welcome! Please feel free to submit issues or pull requests.



