Overview
DeployStack uses PostgreSQL as its database backend, providing enterprise-grade reliability with ACID compliance, connection pooling, and advanced features for production deployments. Important: PostgreSQL must be running and accessible before starting your DeployStack instance.What You’ll Need
- PostgreSQL 13+ installed and running (or included in Docker Compose)
- Database connection details (host, port, username, password)
- About 5-10 minutes to complete the configuration
Deployment Options
Option 1: Docker Compose (Recommended)
If you’re using our Docker Compose setup, PostgreSQL is included and automatically configured. No manual database setup required!- PostgreSQL 18 Alpine
- Automatic health checks
- Persistent data volume
- Pre-configured connection details
Option 2: External PostgreSQL Server
For production deployments with existing PostgreSQL infrastructure:Step 1: Prepare PostgreSQL Database
Create Database and User
Connect to your PostgreSQL server and create a dedicated database and user:Verify Connection
Test the database connection:Step 2: Configure Environment Variables
Set PostgreSQL connection details in your environment:For Docker Deployments
Add to your.env file:
For Local Development
Editservices/backend/.env:
Step 3: Start DeployStack
Once PostgreSQL is configured, start your DeployStack instance:Docker Compose
Individual Containers
Step 4: Complete Setup Wizard
- Access DeployStack: Navigate to your frontend URL (e.g.,
http://localhost:8080) - Automatic Redirect: You’ll be redirected to
/setup - Database Initialization: The wizard will:
- Test PostgreSQL connection
- Apply database migrations
- Create necessary tables
- Initialize system data
- Create Admin Account: Set up your administrator account
- Configuration: Complete basic platform settings
SSL/TLS Connection
For secure connections to PostgreSQL:Enable SSL in PostgreSQL
-
Configure PostgreSQL (
postgresql.conf): -
Set Environment Variable:
- Restart PostgreSQL and DeployStack backend
Production Considerations
Connection Pooling
DeployStack usesnode-postgres with connection pooling:
- Default max connections: 20
- Idle timeout: 30 seconds
- Connection timeout: 2 seconds
Database Maintenance
Backup Strategy
Performance Tuning
Edit PostgreSQL configuration (postgresql.conf):
Troubleshooting
”Connection refused” or “Cannot connect”
Solutions:-
Check PostgreSQL is running:
-
Check PostgreSQL is listening:
-
Check PostgreSQL configuration (
postgresql.conf): -
Check firewall rules:
“Authentication failed”
Solutions:- Verify credentials: Double-check username and password
- Check pg_hba.conf:
- Reload PostgreSQL after config changes:
“Database does not exist”
Solutions:- Create database as shown in Step 1
- Check database name matches environment variable
- Verify user has access:
“Permission denied”
Solutions:- Grant proper privileges as shown in Step 1
- Check user permissions:
Migration Errors
Solutions:- Check PostgreSQL version: DeployStack requires PostgreSQL 13+
- Verify user privileges: User needs CREATE, ALTER, DROP permissions
- Check logs: Review backend logs for detailed error messages
- Manual migration reset (development only):
Monitoring
Check Database Health
Security Notes
- Use strong passwords for database users
- Enable SSL/TLS for production deployments
- Restrict network access using pg_hba.conf
- Regular backups are essential for data protection
- Rotate passwords periodically
- Monitor access logs for suspicious activity
Next Steps
After successful database setup:- Complete Setup Wizard - Create your admin account
- Configure Global Settings - Set up email, authentication, etc.
- Deploy Satellites - Set up MCP server management infrastructure
- Create Teams - Invite team members and set up workspaces

