Deploy Ds2Api - DeepSeek ,OpenAI,Claude Compatible
DeepSeek compatible Go middleware converts web protocols high concurrency
Ds2Api
Just deployed
/data
Deploy and Host Ds2Api on Railway
Ds2Api is a high-concurrency middleware interface that converts DeepSeek web dialogue capabilities into standard OpenAI, Claude, and Gemini compatible APIs. Written in Go, it features a built-in React management console, multi-account polling, concurrent queue control, and advanced tool calling adaptation for seamless integration with existing AI workflows.
About Hosting Ds2Api
Hosting Ds2Api on Railway provides a scalable, zero-configuration backend for standardizing DeepSeek API requests. Railway handles the underlying infrastructure, allowing you to run the Go-based core alongside the static WebUI seamlessly.
The deployment utilizes Railway's Docker integration to build and run the application automatically from the source repository. A Railway Volume is required to persist the application's configuration file, ensuring that your customized settings, API keys, and account pools are not lost between deployments or restarts. Network traffic is routed through a standard HTTP proxy on port 5001. Railway's automatic TLS provides secure HTTPS access out of the box, making it safe to use the web-based admin panel and expose your API endpoints to client applications.
Common Use Cases
- Standardizing AI workflows by converting DeepSeek capabilities to OpenAI/Claude/Gemini formats.
- Managing multi-account DeepSeek access with built-in concurrency control and token refresh strategies.
- Providing a local or private API gateway for LLM applications, Agents, and LangChain/LlamaIndex integrations.
Dependencies for Ds2Api Hosting
- Railway Persistent Volume (for configuration storage)
Deployment Dependencies
Implementation Details
Docker
Ds2Api is built and deployed using the repository's provided Dockerfile. Railway automatically detects and builds this image.
Public Networking
| Proxy Type | Target Port |
|---|---|
| HTTP Proxy | 5001 |
Environment Variables
| Variable | Required | Description |
|---|---|---|
DS2API_ADMIN_KEY | Yes | Secure password required to log in to the admin panel. |
DS2API_CONFIG_PATH | No | Path to store the persisted configuration file. Default is /data/config.json. |
LOG_LEVEL | No | Application logging verbosity (e.g., INFO). |
PORT | No | Internal application listening port. Default is 5001. |
DS2API_ADMIN_KEY=your_secure_password_here
DS2API_CONFIG_PATH=/data/config.json
LOG_LEVEL=INFO
PORT=5001
Persistent Storage
A persistent volume is required to store the application configuration file (config.json). This ensures your settings, API keys, and account configurations persist across deployments.
To set this up:
- Open your Railway Service
- Navigate to Settings > Volumes
- Click Add Volume
- Set the Mount Path to:
/data
Build & Start
No custom build or start commands are required. Railway automatically builds and runs the application using the repository's Dockerfile.
Accessing the Application
- Navigate to Settings > Networking in your Railway service and click Generate Domain.
- Open your new domain and append
/adminto access the admin panel (e.g.,[https://your-domain.up.railway.app/admin](https://your-domain.up.railway.app/admin)). - Log in using the password you configured in the
DS2API_ADMIN_KEYenvironment variable. - On your first login, use the Admin UI to import or edit your configuration (which will automatically be saved to
/data/config.json). - You can verify the health of your deployment at any time by visiting
/healthz.
Why Deploy Ds2Api on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Ds2Api on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
Ds2Api
bilalnawaz072/ds2api