Skip to main content

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

If you’re using our Docker Compose setup, PostgreSQL is included and automatically configured. No manual database setup required!
The Docker Compose setup includes:
  • 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

Edit services/backend/.env:

Step 3: Start DeployStack

Once PostgreSQL is configured, start your DeployStack instance:

Docker Compose

Individual Containers

Step 4: Complete Setup Wizard

  1. Access DeployStack: Navigate to your frontend URL (e.g., http://localhost:8080)
  2. Automatic Redirect: You’ll be redirected to /setup
  3. Database Initialization: The wizard will:
    • Test PostgreSQL connection
    • Apply database migrations
    • Create necessary tables
    • Initialize system data
  4. Create Admin Account: Set up your administrator account
  5. Configuration: Complete basic platform settings

SSL/TLS Connection

For secure connections to PostgreSQL:

Enable SSL in PostgreSQL

  1. Configure PostgreSQL (postgresql.conf):
  2. Set Environment Variable:
  3. Restart PostgreSQL and DeployStack backend

Production Considerations

Connection Pooling

DeployStack uses node-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:
  1. Check PostgreSQL is running:
  2. Check PostgreSQL is listening:
  3. Check PostgreSQL configuration (postgresql.conf):
  4. Check firewall rules:

“Authentication failed”

Solutions:
  1. Verify credentials: Double-check username and password
  2. Check pg_hba.conf:
  3. Reload PostgreSQL after config changes:

“Database does not exist”

Solutions:
  1. Create database as shown in Step 1
  2. Check database name matches environment variable
  3. Verify user has access:

“Permission denied”

Solutions:
  1. Grant proper privileges as shown in Step 1
  2. Check user permissions:

Migration Errors

Solutions:
  1. Check PostgreSQL version: DeployStack requires PostgreSQL 13+
  2. Verify user privileges: User needs CREATE, ALTER, DROP permissions
  3. Check logs: Review backend logs for detailed error messages
  4. 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:
  1. Complete Setup Wizard - Create your admin account
  2. Configure Global Settings - Set up email, authentication, etc.
  3. Deploy Satellites - Set up MCP server management infrastructure
  4. Create Teams - Invite team members and set up workspaces
Your DeployStack instance is now ready to use!