| title | Docker Compose Setup |
|---|---|
| description | Deploy DeployStack using Docker Compose for a quick and reliable self-hosted installation. |
| sidebar | Docker Compose |
| icon | Docker |
import { Callout } from 'fumadocs-ui/components/callout'; import { Tabs, Tab } from 'fumadocs-ui/components/tabs';
Deploy DeployStack using Docker Compose for a production-ready, self-hosted installation. This method is recommended for most users as it provides a reliable, scalable setup with minimal configuration.
Docker containers are for production hosting or self-hosting. For development contributions, check the [Local Setup](/local-setup) guide.This guide provides step-by-step instructions to install and configure DeployStack using Docker Compose. The setup includes both frontend and backend services with persistent data storage and proper networking.
Important: Only modify settings explicitly mentioned in this guide. Altering other configurations may lead to issues.
- RAM: Ensure your environment has at least 4GB of RAM. Insufficient memory can cause processes to crash.
- Docker & Docker Compose: Make sure both are installed and up-to-date.
- Storage: At least 2GB of available disk space for images and persistent data.
Follow these steps for a setup with docker compsoe
Download the docker-compose.yml file to your working directory:
curl -o docker-compose.yml https://raw.githubusercontent.com/deploystackio/deploystack/main/docker-compose.ymlDeployStack requires a secure encryption secret for protecting sensitive data like API keys and credentials.
<Tabs items={['Linux/macOS', 'Windows']}> Generate a secure 32-character secret:
```bash
# Using OpenSSL (recommended)
openssl rand -hex 16
# Alternative using Node.js
node -e "console.log(require('crypto').randomBytes(16).toString('hex'))"
```
```powershell
# Using PowerShell
-join ((1..32) | ForEach {'{0:X}' -f (Get-Random -Max 16)})
# Alternative using Node.js (if installed)
node -e "console.log(require('crypto').randomBytes(16).toString('hex'))"
```
Create a .env file in the same directory as your docker-compose.yml:
# Create .env file
cat > .env << EOF
# DeployStack Configuration
DEPLOYSTACK_ENCRYPTION_SECRET=your-generated-secret-here
# Optional: Customize ports (default: frontend=8080, backend=3000)
# FRONTEND_PORT=8080
# BACKEND_PORT=3000
# Optional: Custom app title
# VITE_APP_TITLE=My DeployStack Instance
EOFReplace your-generated-secret-here with the secret you generated in Step 2.
Start the Docker containers:
docker-compose up -dThis command will:
- Pull the latest DeployStack images
- Create necessary volumes for persistent data
- Start both frontend and backend services
- Set up networking between services
Check that all services are running:
docker-compose psYou should see both deploystack-frontend and deploystack-backend containers in "Up" status.
Open your browser and navigate to:
- Frontend: http://localhost:8080
- Backend API: http://localhost:3000
By default, DeployStack runs on localhost. To access it via an external domain or IP address, you need to configure the environment variables.
- Protocol: Use
httporhttpsdepending on your setup - Domain/IP: The domain name or IP address where your application is accessible
- Port: Include the port number if not using standard ports (80 for http, 443 for https)
- Update your
.envfile:
# For direct access without reverse proxy
DEPLOYSTACK_FRONTEND_URL=http://your-domain-or-ip:8080
VITE_DEPLOYSTACK_BACKEND_URL=http://your-domain-or-ip:3000
# For access via reverse proxy with SSL
DEPLOYSTACK_FRONTEND_URL=https://your-domain
VITE_DEPLOYSTACK_BACKEND_URL=https://your-domain/api- Restart the services:
docker-compose down
docker-compose up -dFor HTTPS setup, we recommend using a reverse proxy like Nginx or Traefik:
# Example Nginx configuration
server {
listen 443 ssl;
server_name your-domain.com;
# SSL configuration
ssl_certificate /path/to/certificate.crt;
ssl_certificate_key /path/to/private.key;
# Frontend
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
# Backend API
location /api/ {
proxy_pass http://localhost:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}DeployStack uses Docker volumes to persist data:
- deploystack_backend_persistent: Application database, configuration, and user uploads
Regularly backup your persistent data:
# Create backup directory
mkdir -p backups/$(date +%Y%m%d)
# Backup volume
docker run --rm -v deploystack_backend_persistent:/data -v $(pwd)/backups/$(date +%Y%m%d):/backup alpine tar czf /backup/backend_persistent.tar.gz -C /data .| Variable | Description | Example |
|---|---|---|
DEPLOYSTACK_ENCRYPTION_SECRET |
32-character secret for encrypting sensitive data | a1b2c3d4e5f6... |
| Variable | Description | Default | Example |
|---|---|---|---|
DEPLOYSTACK_FRONTEND_URL |
URL where frontend is accessible | http://localhost:8080 |
https://deploystack.company.com |
VITE_DEPLOYSTACK_BACKEND_URL |
Backend API URL for frontend | http://localhost:3000 |
https://api.deploystack.company.com |
VITE_APP_TITLE |
Custom application title | DeployStack |
Company DeployStack |
FRONTEND_PORT |
Frontend port mapping | 8080 |
80 |
BACKEND_PORT |
Backend port mapping | 3000 |
3001 |
# Check logs
docker-compose logs
# Check specific service
docker-compose logs backend
docker-compose logs frontendIf you encounter issues not covered here:
- Search existing GitHub Issues
- Join our Discord community
- Create a new issue with detailed logs and system information
Need to upgrade? Check our Upgrade Guide for step-by-step instructions.