Open the server Apps tab
Select the tutorial-vps VPS, open the Apps tab, and start a new app deployment. Keep sensitive server details hidden before capturing or sharing screenshots.


Open-source LLM app development platform for building AI workflows, RAG pipelines, and chatbots
Add your server credentials to Server Compass
Choose from our template library
Fill in settings and click Deploy
Use the Dify template in Server Compass to deploy a self-hosted LLM app development platform on your VPS, then verify the first-run web UI in a browser.
Select the tutorial-vps VPS, open the Apps tab, and start a new app deployment. Keep sensitive server details hidden before capturing or sharing screenshots.

Click New App and choose the template deployment path so Server Compass can load the built-in catalog.

Use the template picker search to find Dify in the Server Compass template catalog.

Choose the Dify template. Server Compass fills the API, worker, web, nginx, Postgres, Redis, Weaviate, and sandbox services with generated secrets and persistent volumes.

Confirm the app name and compose services. In this run, the app was named dify-demo and used host port 3001.

Review the generated compose settings, confirm the web port is available, keep generated application/database/sandbox secrets hidden, and click Deploy Now.

Keep the deployment modal open while Server Compass uploads the compose file, pulls the Dify image, starts the container, and verifies the stack.

After deployment finishes, return to the Apps tab and confirm the Dify app is marked Running with its application URL available.

Click Open Application or open the application URL in a browser. The Dify first-run screen confirms the platform is reachable and ready for the first admin account.

It deploys Dify API, worker, web, nginx, Postgres, Redis, Weaviate, and sandbox services with persistent storage and generated secrets.
The tutorial used host port 3001, which maps to the Dify nginx web entrypoint on container port 80.
A fresh Dify deployment is considered reachable when the first-run setup screen loads. Model-provider configuration, workspace policy, and app publishing depend on your own production setup.
No. The deployment guide should live on the Dify template detail page and be linked from the reusable template deployment docs page.
For terminal enthusiasts: deploy Dify manually with these simple steps.
Launch your preferred terminal and connect to your VPS using SSH.
# Log into your server
ssh root@<your-server-ip>
# If using key-based auth
ssh -i ~/.ssh/my-key root@<your-server-ip>First time? Docker not installed? Run: curl -fsSL https://get.docker.com | sh
Prepare a directory for your application files and configuration.
# Create and navigate to project directory
mkdir -p ~/apps/dify
cd ~/apps/difyCreate the Docker Compose configuration file with these contents:
services:
api:
image: langgenius/dify-api:latest
environment:
- MODE=api
- SECRET_KEY=<your-secret-key>
- DB_USERNAME=postgres
- DB_PASSWORD=<your-db-password>
- DB_HOST=db
- DB_PORT=5432
- DB_DATABASE=dify
- REDIS_HOST=redis
- REDIS_PORT=6379
- STORAGE_TYPE=local
- STORAGE_LOCAL_PATH=/app/api/storage
- VECTOR_STORE=weaviate
- WEAVIATE_ENDPOINT=http://weaviate:8080
- SANDBOX_API_KEY=<your-sandbox-key>
- SANDBOX_HOST=http://sandbox:8194
volumes:
- dify_storage:/app/api/storage
restart: unless-stopped
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
worker:
image: langgenius/dify-api:latest
environment:
- MODE=worker
- SECRET_KEY=<your-secret-key>
- DB_USERNAME=postgres
- DB_PASSWORD=<your-db-password>
- DB_HOST=db
- DB_PORT=5432
- DB_DATABASE=dify
- REDIS_HOST=redis
- REDIS_PORT=6379
- STORAGE_TYPE=local
- STORAGE_LOCAL_PATH=/app/api/storage
- VECTOR_STORE=weaviate
- WEAVIATE_ENDPOINT=http://weaviate:8080
volumes:
- dify_storage:/app/api/storage
restart: unless-stopped
depends_on:
- api
web:
image: langgenius/dify-web:latest
environment:
- CONSOLE_API_URL=
- APP_API_URL=
restart: unless-stopped
nginx:
image: nginx:latest
ports:
- "80:80"
entrypoint: sh
command:
- -c
- |
cat > /etc/nginx/conf.d/default.conf << 'CONF'
server {
listen 80;
client_max_body_size 15M;
location /api { proxy_pass http://api:5001; proxy_set_header Host $$host; proxy_set_header X-Real-IP $$remote_addr; }
location /console/api { proxy_pass http://api:5001; proxy_set_header Host $$host; }
location /v1 { proxy_pass http://api:5001; proxy_set_header Host $$host; }
location /files { proxy_pass http://api:5001; proxy_set_header Host $$host; }
location / { proxy_pass http://web:3000; proxy_set_header Host $$host; }
}
CONF
nginx -g 'daemon off;'
restart: unless-stopped
depends_on:
- api
- web
db:
image: postgres:15-alpine
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=<your-db-password>
- POSTGRES_DB=dify
volumes:
- dify_db:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d dify"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
redis:
image: redis:6-alpine
volumes:
- dify_redis:/data
restart: unless-stopped
weaviate:
image: semitechnologies/weaviate:1.27.0
environment:
- QUERY_DEFAULTS_LIMIT=25
- AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED=true
- PERSISTENCE_DATA_PATH=/var/lib/weaviate
- DEFAULT_VECTORIZER_MODULE=none
- CLUSTER_HOSTNAME=node1
volumes:
- dify_weaviate:/var/lib/weaviate
restart: unless-stopped
sandbox:
image: langgenius/dify-sandbox:latest
environment:
- API_KEY=<your-sandbox-key>
- GIN_MODE=release
restart: unless-stopped
volumes:
dify_storage:
dify_db:
dify_redis:
dify_weaviate:
PORTHost port to expose(default: 80)SECRET_KEYApp secretDB_PASSWORDDatabase passwordSANDBOX_KEYSandbox keyLaunch the application stack using Docker Compose.
# Deploy the application
docker compose up -d
# Check container health
docker compose ps
# Monitor logs
docker compose logs -f --tail=100Enable external access by opening the necessary port.
# Allow the application port through firewall
sudo ufw allow 80/tcp
sudo ufw reload
# Access your app at:
# http://your-server-ip:80Deploy Dify without touching the command line. Server Compass gives you a clean UI for one-click deployments.
After deploying Dify with Server Compass, complete these steps to finish setup
Open the Dify URL in your browser
Create your admin account
Configure model providers (OpenAI, Anthropic, etc.)
Create your first AI application
Need help? Check out our documentation for detailed guides.
Common questions about self-hosting Dify
Simply download Server Compass, connect to your VPS, and select Dify from the templates list. Fill in the required configuration and click Deploy. The entire process takes under 3 minutes.
Dify requires a minimum of 4096MB RAM. We recommend a VPS with at least 8192MB RAM for optimal performance. Any modern Linux server with Docker support will work.
Yes! Server Compass provides volume mapping that allows you to import existing data. You can also use standard Dify backup and restore procedures.
Server Compass makes updates easy. Simply click the Update button in your deployment dashboard, and the latest Dify image will be pulled and deployed with zero downtime.
Dify is open-source software. You only pay for your VPS hosting (typically $5-20/month) and optionally Server Compass ($29 one-time). No subscription fees or per-seat pricing.

Open-source backend in a single file with realtime database, auth, and file storage

Open-source backend-as-a-service - self-hosted Firebase alternative

Open-source backend framework with dashboard

Full Supabase self-hosted with Kong, GoTrue Auth, Realtime, and Studio
Download Server Compass and deploy Dify to your VPS in under 3 minutes. No Docker expertise required.
Download Server Compass