Railway

Deploy Ds2Api - DeepSeek ,OpenAI,Claude Compatible

DeepSeek compatible Go middleware converts web protocols high concurrency

Deploy Ds2Api - DeepSeek ,OpenAI,Claude Compatible

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 TypeTarget Port
HTTP Proxy5001

Environment Variables

VariableRequiredDescription
DS2API_ADMIN_KEYYesSecure password required to log in to the admin panel.
DS2API_CONFIG_PATHNoPath to store the persisted configuration file. Default is /data/config.json.
LOG_LEVELNoApplication logging verbosity (e.g., INFO).
PORTNoInternal 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:

  1. Open your Railway Service
  2. Navigate to Settings > Volumes
  3. Click Add Volume
  4. 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

  1. Navigate to Settings > Networking in your Railway service and click Generate Domain.
  2. Open your new domain and append /admin to access the admin panel (e.g., [https://your-domain.up.railway.app/admin](https://your-domain.up.railway.app/admin)).
  3. Log in using the password you configured in the DS2API_ADMIN_KEY environment variable.
  4. On your first login, use the Admin UI to import or edit your configuration (which will automatically be saved to /data/config.json).
  5. 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

More templates in this category

View Template
Rocky Linux
[Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
33
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51