---
title: "Deploy Dify v1.20.0"
description: "Dify workflows, Classic Knowledge, persistent storage and one-domain login."
category: "AI/ML"
url: https://railway.com/deploy/TiT2V6
---

# Deploy Dify v1.20.0

Dify workflows, Classic Knowledge, persistent storage and one-domain login.

**[Deploy Dify v1.20.0 on Railway](https://railway.com/template/TiT2V6)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/TiT2V6/manifest.json

- **Creator:** RailGenius
- **Category:** AI/ML
- **Total deploys:** 462

## Template content

### Weaviate https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/publication/logo/35d9c94b-b826-4592-8ada-f26fb501b5d4/weaviate-logo-light-transparent.png

- **Image:** semitechnologies/weaviate:1.39.13

### Gateway https://res.cloudinary.com/h5kvzw/image/upload/v1706062979/MINIO_Bird_vbtpet.png

- **Image:** nginx@sha256:0e52bd054126cdc040b1276c0af347aeb02a41b9cfe305d6094767ac30e97949
- **Start command:** `/bin/sh -c 'echo $START_SCRIPT_BASE64 | base64 -d > /tmp/start.sh; exec sh /tmp/start.sh'`
- **Health check:** /health
- **Public domain:** Yes

### Sandbox https://avatars.githubusercontent.com/u/127165244?v=4

- **Image:** langgenius/dify-sandbox:0.2.15

### Worker https://avatars.githubusercontent.com/u/127165244?v=4

- **Image:** langgenius/dify-api:1.20.0@sha256:9acb839cd797532ee2fd7a357c9bca0c15710ace99ceca3702ea990239d5c8b7

### Api https://avatars.githubusercontent.com/u/127165244?v=4

- **Image:** langgenius/dify-api:1.20.0@sha256:9acb839cd797532ee2fd7a357c9bca0c15710ace99ceca3702ea990239d5c8b7
- **Health check:** /health

### Storage https://res.cloudinary.com/h5kvzw/image/upload/v1706062979/MINIO_Bird_vbtpet.png

- **Image:** chrislusf/seaweedfs@sha256:f7a49e3f3972ebed5be2ed4befa4a0c68eb7bdddba6e692d42729ceb545134b8
- **Start command:** `/usr/bin/weed mini -dir=/data -ip=127.0.0.1 -ip.bind=0.0.0.0 -s3.port=9000 -master.telemetry=false -s3.port.iceberg=0 -s3.port.lance=0`

### Scheduler

- **Image:** langgenius/dify-api:1.20.0@sha256:9acb839cd797532ee2fd7a357c9bca0c15710ace99ceca3702ea990239d5c8b7

### SSRF-Proxy

- **Image:** ubuntu/squid@sha256:6a097f68bae708cedbabd6188d68c7e2e7a38cedd05a176e1cc0ba29e3bbe029
- **Start command:** `/bin/sh -c 'printf "%s" "$SQUID_CONFIG" > /etc/squid/squid.conf; exec squid -N -f /etc/squid/squid.conf'`

### plugin-daemon https://avatars.githubusercontent.com/u/127165244?v=4

- **Image:** langgenius/dify-plugin-daemon:0.6.15-local@sha256:14aebd55ff37456dcf4ab8e5a92617eeef767e0e239a13c86083287ee1c1a338

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** postgres:15-alpine
- **Start command:** `/bin/sh -c "unset PGPORT; docker-entrypoint.sh postgres --port=5432"`

### Redis https://devicons.railway.app/i/redis.svg

- **Image:** redis:6-alpine
- **Start command:** `/bin/sh -c 'exec redis-server --bind :: 0.0.0.0 --requirepass "$REDIS_PASSWORD" --appendonly yes'`

### Web https://avatars.githubusercontent.com/u/127165244?v=4

- **Image:** langgenius/dify-web:1.20.0@sha256:70bfcf68a607a38d65fdc3b84a00386bd76413ffb293e2ab1fe5e6768f6b3efc
- **Health check:** /

## Documentation

# Deploy and Host Dify v1.20.0 on Railway

Build AI workflows, chatflows and Classic Knowledge applications with Dify Community Edition. This basic template uses one public Gateway and private application, database, queue, vector, plugin, sandbox and storage services.

## About Hosting Dify v1.20.0

Wait for all services to start, then open the Gateway URL and immediately complete the one-time administrator setup. Custom domains are optional: Web and API traffic share one origin, without two domains or manual cookie-domain settings. Add your own model-provider credentials in Dify; provider usage is billed separately.

Uploads use persistent SeaweedFS S3-compatible storage. Redis requires authentication, internal keys are generated per deployment, and the scheduler runs periodic jobs. The private HTTP proxy blocks private network destinations.

## First deployment: required steps

1. Deploy and wait for initial database migrations and application startup. The Gateway can become healthy before the API is ready; brief initial upstream errors are not a reason to recreate the project.
2. Open the generated HTTPS domain on `Gateway`. Complete administrator setup immediately; if needed, open `/install` on that same domain, then sign in.
3. Install/configure the model-provider plugin you need and enter your own provider credentials in Dify. Provider usage is billed separately.
4. Run a sample workflow. For semantic/vector retrieval, configure an embedding provider before indexing documents. The included Classic Knowledge economy/keyword mode has a different requirement from embedding-based retrieval.

### Steps removed from the old installation flow

- No pair of custom Web/API domains or shared cookie-domain setting is required. Keep the generated Gateway as the single public origin; `COOKIE_DOMAIN` may remain empty.
- No MinIO console, manual S3 bucket creation, bucket-provisioning client or manually generated internal secret is required. SeaweedFS and generated references handle this.
- No manual Redis password wiring, sandbox-key repair, scheduler creation or plugin-storage permission workaround is required for a fresh deployment. These are included in the saved template.
- The old bucket-provisioner role is now `Gateway`. Keep it running: it routes the dashboard, API and files.

Optional configuration includes SMTP/Resend for mail, custom domains, model providers and backups. Mail-variable examples are not working mail credentials. If you add a custom domain, keep Web and API on the same Gateway origin and update `Api.HOST` and `Web.HOST` consistently. Do not expose the private services just to complete setup.

## Common Use Cases

- Build and execute AI workflows and chatflows.
- Install model-provider plugins and connect supported providers.
- Upload documents for Classic Knowledge and RAG after configuring an embedding model.

## Dependencies for Dify v1.20.0 Hosting

Dify API, Web, Worker and Scheduler 1.20.0; PostgreSQL; Redis; Weaviate; Dify plugin daemon and sandbox; SeaweedFS; Squid proxy; Nginx Gateway. Persistent volumes and regular backups are required.

This basic edition excludes Agent V2, its local runtime, collaboration and optional KnowledgeFS. Those features require additional upstream services and configuration. Remote plugin debugging is disabled. Code requiring private network access is restricted by the proxy policy.

## Why Deploy Dify v1.20.0 on Railway

The template connects core services, generated credentials, persistent storage and one-domain routing. Railway bills CPU, memory, storage and network usage; this multi-service stack is not free. Resource needs grow with workers, documents, vectors and traffic.

### Deployment Dependencies

A Railway workspace with capacity for all 12 services and persistent volumes. External model/embedding providers and mail providers require your own accounts and credentials. See the [Dify source and license](https://github.com/langgenius/dify).

### Existing installations

These changes configure new deployments and do not migrate existing data. Existing MinIO uploads need an explicit migration to SeaweedFS; do not attach MinIO data directly to SeaweedFS. Older Weaviate installations need the upstream staged upgrade path.

Dify is maintained by langgenius. This independent Railway template is maintained by RailGenius. Upstream project and license: https://github.com/langgenius/dify.

## Version 1.20.0 and upgrade scope

The API, Web, Worker and Scheduler use 1.20.0. The plugin daemon uses 0.6.15-local. The API runs migrations on fresh deployments. The personal-access-token OpenAPI and instant-messaging approval callbacks are disabled in this template.

For an existing project, follow the [upstream 1.20.0 release notes](https://github.com/langgenius/dify/releases/tag/1.20.0) and back up PostgreSQL, uploaded files, vectors and configuration before migrating.

RailGenius validated first administrator setup and login, file upload and preview, a code-node workflow, Classic Knowledge indexing and an official provider plugin on two independent Railway installations. The first install also preserved the workflow and knowledge records after replacing the PostgreSQL service deployment.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/TiT2V6
