
Deploy Dify (Self-Hosted OpenAI GPTs Alternative)
Open-source Coze & OpenAI GPTs alternative. [Updated Aug '26]
Just deployed
dify-api
Just deployed
dify-web
Just deployed
pgvector
Just deployed
/var/lib/postgresql/data
squid
Just deployed
Just deployed
/data
redis
Just deployed
/data
dify-sandbox
Just deployed
dify-plugin-daemon
Just deployed
/app/storage
Deploy and Host Dify (Self-Hosted OpenAI GPTs Alternative) on Railway
Dify is an open-source LLM application development platform — build AI chatbots, agents, and RAG-powered assistants with a visual builder, then serve them over an OpenAI-compatible API. This template deploys the complete production stack: API, Celery worker, Next.js web console, plugin daemon, sandboxed code executor, PostgreSQL with pgvector, Redis, MinIO object storage, and an SSRF proxy. Every service is pinned to a verified upstream image and wired over Railway's private network, so it boots reliably on the first deploy instead of failing the way older single-service templates do.
About Hosting Dify (Self-Hosted OpenAI GPTs Alternative)
Hosting Dify means running nine coordinated services, not one container. The API server runs database migrations and serves the console and app APIs; a separate Celery worker handles async jobs; the web service is the Next.js console; the plugin daemon and dify-sandbox isolate plugin and code execution; PostgreSQL (pgvector) stores both relational data and vector embeddings; Redis backs the cache and task queue; MinIO holds uploaded files and datasets; and a Squid SSRF proxy safely brokers outbound calls. This template sets every environment variable, shared secret, private-domain reference, and volume so the stack comes up green without manual wiring.
Common Use Cases
- Building and self-hosting AI chatbots, agents, and workflows with your choice of LLM provider (OpenAI, Anthropic, or local models)
- Retrieval-augmented generation (RAG) over your own documents using the built-in pgvector knowledge base
- Shipping internal AI tools behind an OpenAI-compatible API instead of paying per seat for a hosted builder
Dependencies for Dify (Self-Hosted OpenAI GPTs Alternative) Hosting
- PostgreSQL 16 with the pgvector extension (included)
- Redis 6 for cache and Celery queue (included)
- MinIO S3-compatible object storage for files and datasets (included)
- Squid SSRF proxy, Dify sandbox, and plugin daemon (included)
No external services are required to deploy. Bring your own LLM provider API keys, which you add inside Dify after the first-run admin setup.
Why Deploy Dify (Self-Hosted OpenAI GPTs Alternative) on Railway?
Railway's private networking, per-service volumes, and one-click deploys make a nine-service stack like Dify practical to run without Kubernetes. This template pins every image, generates unique secrets on each deploy, and points the console and app URLs at your real Railway domains automatically — so you get a working Dify instance in minutes with data persisted across redeploys. LLM inference runs through the external provider keys you supply, so you only pay Railway for the container usage you actually consume, and can scale each service independently.
Template Content
dify-api
langgenius/dify-api:1.16.0dify-web
langgenius/dify-web:1.16.0pgvector
pgvector/pgvector:pg16squid
ubuntu/squid:latestredis
redis:6-alpinedify-sandbox
langgenius/dify-sandbox:0.2.15dify-plugin-daemon
langgenius/dify-plugin-daemon:0.6.3-local