No docker compose to babysit
API, worker, web and plugin daemon are separate apps that restart independently.
Self-host Dify · Agent Lab Deploy
Skip the ten-service docker compose: say one sentence and Agent Lab runs Dify as apps on PostgreSQL (pgvector) and Redis.
> Set up Dify from agentlab.cresclab.com/en/deploy/dify
databases_createPostgreSQL 18 · L · pgvector
caches_createRedis · S
sites_createdify-api, dify-worker, dify-web, dify-plugin
sites_secrets_generateSECRET_KEY · generated
sites_deploy_statusAll four apps built
Dify is up: dify-web--acme.hosting.agentlab.run. It asks you to set the admin account on first open.
Why self-host
Self-hosted, quotas, knowledge size and seats follow your resources.
API, worker, web and plugin daemon are separate apps that restart independently.
Vectors live in the same PostgreSQL. No separate Weaviate.
Model keys stay in your database; the platform generates SECRET_KEY.
New releases run on a preview URL first; one action rolls back.
Choosing
The table scrolls sideways.
| What matters to you | Agent Lab Deploy | Dify Cloud | Your own VPS |
|---|---|---|---|
| Quotas | Your resources | Capped per plan | Your server |
| Who runs it | The platform | Dify | You |
| Vector store | PostgreSQL pgvector | Managed by Dify | Weaviate, yours to run |
| Where the data lives | Your Agent Lab organization | Dify's cloud | Your server |
| Setup | One sentence to an AI tool | Sign up | docker compose, ten services |
How
Starts on Pro.
One MCP line in your AI tool, one sign-in.
The agent creates four apps, PostgreSQL (pgvector) and Redis, all connected.
Put your S3-compatible bucket keys in the console's project secrets.
Open dify-web's URL, set the admin, add model keys.
Architecture
api serves, worker indexes, web is the UI, plugin runs plugins; add a sandbox for code nodes.
# 一個 Dify 由幾個 App 組成,每個一份 Dockerfile
# One Dify is several apps, one Dockerfile each
# dify-api
FROM langgenius/dify-api:latest
ENV MODE=api \
DB_TYPE=postgresql \
VECTOR_STORE=pgvector \
STORAGE_TYPE=s3
EXPOSE 5001
# dify-worker: same image, ENV MODE=worker
# dify-web: FROM langgenius/dify-web:latest (EXPOSE 3000)
# dify-plugin: FROM langgenius/dify-plugin-daemon:latest-localDB_HOST / DB_PORT / DB_DATABASE / DB_USERNAME / DB_PASSWORD written by databases_connect_app; needs pgvectorREDIS_HOST / REDIS_PORT / REDIS_PASSWORD written by caches_binding_connectSECRET_KEY from sites_secrets_generate, shared by all fourS3_BUCKET_NAME / S3_ACCESS_KEY / S3_SECRET_KEY upload storage; set as console secretsRead https://app.agentlab.cresclab.com/agent/deploy.md and deploy Dify to Agent Lab following agentlab.cresclab.com/en/deploy/dify: create the dify-api, dify-worker, dify-web and dify-plugin apps; create and connect a PostgreSQL (with pgvector) and a Redis; generate SECRET_KEY on the platform; store files in my S3 bucket and tell me where in the console to enter its keys. Give me Dify's URL when it's up.FAQ