Deploy dify-template
Dify 1.17.1: pinned images, one domain, Worker, Beat, Sandbox, Weaviate
Just deployed
Redis
Just deployed
/data
Just deployed
PluginDaemon
Just deployed
/app/storage
Just deployed
Just deployed
/var/lib/postgresql/data
Just deployed
Just deployed
Gateway
Just deployed
Weaviate
Just deployed
/var/lib/weaviate
Just deployed
/data
Deploy and Host Dify on Railway
Dify is an open-source platform for building LLM apps: visual workflows, chatbots, agents, RAG knowledge bases and a plugin marketplace. This template deploys the full self-hosted Dify 1.17.1 stack from the official docker-compose, with every image pinned to the matching release.
About Hosting Dify
Dify is several cooperating services, not one container. This template runs 11 of them, already wired together over Railway's private network:
- Gateway (Caddy): one public URL serves the web UI and every API, like Dify's official nginx. Console login works on the default Railway domain because session and CSRF cookies stay on one origin.
- Api + Worker + Beat (dify-api 1.17.1): migrations run automatically, a separate Celery worker handles indexing and workflows, Celery beat runs scheduled triggers and periodic jobs.
- Web (dify-web 1.17.1), Sandbox (0.2.15) for Python / Node.js code nodes, Plugin Daemon (0.6.10) with a persistent volume.
- Weaviate 1.39.2 vector store with API-key auth.
- MinIO S3 storage on the private network only; Dify creates the bucket on first start (maintained
pgsty/minioimage, since upstreamminio/miniotags are no longer pullable). - Postgres 18 and Redis 8.2 with persistent volumes.
Why Deploy Dify on Railway?
All versions are pinned and matched (no latest / main). Worker and Beat run as separate services. Services talk over the private network only. Every secret is generated at deploy time, and keys that must match between services are wired by reference. The setup page is protected by a generated INIT_PASSWORD.
Common Use Cases
- A private LLM app builder for a team: chatbots, agents and workflows on your own infrastructure.
- RAG over your own documents with a persistent vector store.
- Prototyping with marketplace plugins (model providers, tools) that survive redeploys.
Dependencies for Dify Hosting
Deployment Dependencies
- Dify: https://docs.dify.ai
- Official docker-compose the template follows: https://github.com/langgenius/dify/tree/main/docker
- An API key for at least one model provider (OpenAI, Anthropic, ...), added after deploy.
After deploying
Open the Gateway URL, go to /install, enter INIT_PASSWORD (from the Api service variables) and create your admin account. Then add model providers from the Plugins page. Nothing is required before deploy. Generated: INIT_PASSWORD, SECRET_KEY (never change it after first start), plugin, sandbox, Weaviate and MinIO keys, database passwords. Optional: MAIL_TYPE / SMTP_* (or RESEND_API_KEY) on Api and Worker for invitations and password reset. For a custom domain, add it to Gateway and update the *_URL variables.
Template Content
Redis
redis:8.2PluginDaemon
langgenius/dify-plugin-daemon:0.6.10-localGateway
caddy:2.11.7-alpineWeaviate
semitechnologies/weaviate:1.39.2
