---
title: "Deploy OpenClaw DeepSeek"
description: "Run OpenClaw on DeepSeek models with your own API key"
category: "AI/ML"
url: https://railway.com/deploy/deploy-openclaw-with-deepseek
---

# Deploy OpenClaw DeepSeek

Run OpenClaw on DeepSeek models with your own API key

**[Deploy OpenClaw DeepSeek on Railway](https://railway.com/template/deploy-openclaw-with-deepseek)**

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

- **Creator:** onepush
- **Category:** AI/ML

## Template content

### OpenClaw

- **Image:** openclaw/openclaw:2026.10.3-browser@sha256:c84c4c37e7b9dc02dd869c9699ba0c4fb20ff821febe4b789bb2f8f4bfd9c8a3
- **Start command:** `/bin/sh -c "set -ef; D=${RAILWAY_VOLUME_MOUNT_PATH:-/data}; mkdir -p $D/.openclaw $D/workspace $D/.config/openclaw; if [ ! -L /home/node/.config/openclaw ]; then rm -rf /home/node/.config/openclaw; ln -s $D/.config/openclaw /home/node/.config/openclaw; fi; find $D ! -user 1000 -exec chown -h 1000:1000 {} +; chmod 700 $D/.openclaw; cd /app; if [ ${#OPENCLAW_RAILWAY_CONFIG} -gt 0 ]; then setpriv --reuid=1000 --regid=1000 --init-groups env HOME=/home/node USER=node node openclaw.mjs config set --batch-json $OPENCLAW_RAILWAY_CONFIG || echo railway-start: config batch failed; fi; exec setpriv --reuid=1000 --regid=1000 --init-groups env HOME=/home/node USER=node tini -s -- node /app/docker-entrypoint.mjs node openclaw.mjs gateway --bind lan --port 18789 --allow-unconfigured"`
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host self hosted OpenClaw DeepSeek (Self-Hosted AI Agent Setup Guide) on Railway

This template runs the OpenClaw gateway on Railway so DeepSeek V4 models can drive your personal agent.

## About Hosting OpenClaw DeepSeek open-source software on Railway (self hosted running OpenClaw agents on DeepSeek models template)

OpenClaw is an MIT-licensed AI assistant gateway, and this template runs it as one Railway service on port 18789 with state under /data/.openclaw on a persistent volume.

Railway handles the container build, the public HTTPS domain, the /healthz check and restarts.

## Why Deploy OpenClaw DeepSeek, the DeepSeek chat app alternative on Railway (Railway Free Trial)

The DeepSeek chat app is the quickest way to reach DeepSeek models, but your conversations and agent behavior stay on DeepSeek's side.

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 OpenClaw DeepSeek 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.

### Railway vs Other Hosting Providers and VPS for OpenClaw DeepSeek self hosting

Railway handles the container, domain, and volume, so you only add your DeepSeek key. Here is how it compares with common VPS options.

| Provider | What You Get with Railway | What You Get with the Other Provider |
| --- | --- | --- |
| DigitalOcean | A template with the OpenClaw image, a /data volume, and HTTPS set up. | A Droplet where you install Docker, set the firewall, and handle updates. |
| AWS | One service with a volume and domain, no VPC or IAM setup. | Full EC2 and networking control, with more work for a simple gateway. |
| Hetzner | A managed deploy with the DeepSeek key added after launch. | Low-cost servers where you manage OS hardening and process supervision. |

After the service runs, add your DeepSeek key and run the provider setup from the OpenClaw docs.

## Common Use Cases for hosted OpenClaw DeepSeek

- **Coding or research agent on V4 Pro:** Point the agent at a repo or a pile of papers and let deepseek/deepseek-v4-pro handle multi-step work. Pro is the onboarding default. Send /think xhigh or /think max for harder reasoning.
- **High-volume runs on Flash:** Run batch jobs and repeated tool loops on deepseek/deepseek-flash with openclaw models set deepseek/deepseek-flash. It keeps the 1,000,000-token context and saves Pro for tasks that need it.
- **Screenshots to the vision model:** Send images through a channel and route them to deepseek/deepseek-flash, the ref that accepts image input. Pro does not, so check the model first.
- **DeepSeek web search as an agent tool:** Set tools.web.search.provider to "deepseek". The key can be reused from DEEPSEEK_API_KEY, so you don't need a second secret.
- **Memory and config on your own volume:** Agent state lives under /data/.openclaw on your Railway volume, so memory and config stay on your server instead of in a hosted chat app's history.

## Dependencies for OpenClaw DeepSeek Docker hosted on Railway

This template runs one OpenClaw gateway container, and the DeepSeek provider is wired in after deploy, so no key gets baked into the image.

### Deployment Dependencies for Managed OpenClaw DeepSeek Service (AI Assistant Gateway)

- **Railway account:** Any plan works, and the $5 trial is enough to test.
- **DeepSeek API key:** Create one on the platform.deepseek.com API keys page. DeepSeek bills usage separately from Railway.
- **Gateway token:** Railway generates `OPENCLAW_GATEWAY_TOKEN` (48 characters) for the Control UI.
- **Persistent volume:** Mounted at `/data`, holding state under `/data/.openclaw`.
- **Public domain:** Railway assigns one, and `RAILWAY_PUBLIC_DOMAIN` feeds the allowed origins.

### Implementation Details for OpenClaw DeepSeek (Using OpenClaw official docker image)

The image is the official OpenClaw build.

## How does OpenClaw DeepSeek compare against other ways to run DeepSeek models for agent work

### OpenClaw DeepSeek vs DeepSeek chat app (DeepSeek Chat Alternative)

- **Where OpenClaw wins:** You run a persistent agent with its own gateway, tools, and channels instead of a chat window that forgets the session.
- **Model access:** OpenClaw calls DeepSeek through the `deepseek` provider, so you pick `deepseek/deepseek-v4-pro` or `deepseek/deepseek-flash` per run.
- **Where the chat app wins:** It needs no setup, no API key, and no server, so it suits a quick one-off question.

### OpenClaw DeepSeek vs Hermes Agent (Open Source Agent Alternative)

- **Model routing:** OpenClaw treats DeepSeek as a provider plugin, with the key in `DEEPSEEK_API_KEY` and the default set by `agents.defaults.model.primary`.
- **Channels:** OpenClaw ships with chat channels such as Telegram, Slack, and Discord, which suits an agent you message from your phone.
- **Where Hermes Agent wins:** If you only want an agent loop for tasks and tool calls, it asks for less configuration.

### OpenClaw DeepSeek vs Claude Code (Coding Agent Alternative)

- **Scope:** OpenClaw is a general gateway for an agent that does more than code, while Claude Code focuses on a repository.
- **Where Claude Code wins:** It is tuned for hands-on coding inside a project directory, so it is the stronger pick for a focused refactor.
- **Model choice:** OpenClaw runs DeepSeek V4 Pro or the cheaper Flash model, and you switch with `openclaw models set deepseek/deepseek-flash`.

### OpenClaw DeepSeek vs OpenRouter (API Gateway Alternative)

- **Routing:** OpenRouter sends requests to many providers through one key, while OpenClaw DeepSeek talks to DeepSeek directly.
- **Where OpenRouter wins:** One key covers dozens of models, which helps if you switch providers often.
- **Where OpenClaw wins:** You keep the agent, its memory, and its channels on your own server, with DeepSeek usage billed by DeepSeek itself.

## How to use OpenClaw DeepSeek (the OSS AI assistant gateway)?

1. Deploy the OpenClaw template on Railway and open the service's public domain.
2. Create an API key on the platform.deepseek.com API keys page.
3. Paste the key into Settings to Models, or set DEEPSEEK_API_KEY on the OpenClaw service.
4. Install the provider with `openclaw plugins install @openclaw/deepseek-provider`.
5. Run `openclaw onboard --auth-choice deepseek-api-key` and paste the key when prompted. This sets deepseek/deepseek-v4-pro as the default.
6. Verify with `openclaw models list --provider deepseek`.
7. To switch to Flash, run `openclaw models set deepseek/deepseek-flash`.
8. For a scripted setup, run `openclaw onboard --non-interactive --mode local --auth-choice deepseek-api-key --deepseek-api-key "$DEEPSEEK_API_KEY" --skip-health --accept-risk`.

The default model config looks like this:

```json
{
  "agents": { "defaults": { "model": { "primary": "deepseek/deepseek-v4-pro" } } },
  "env": { "vars": { "DEEPSEEK_API_KEY": "your-deepseek-api-key" } }
}
```

## How to self host OpenClaw DeepSeek on other VPS Services (OpenClaw self hosting guide)

Running OpenClaw on a plain VPS works the same way as on Railway, with the DeepSeek provider wired in by hand.

### Clone the Repository

Pull the OpenClaw source onto your server and move into the folder.

```bash
git clone https://github.com/openclaw/openclaw.git
cd openclaw
```

### Install Dependencies

Install OpenClaw globally, then add the official DeepSeek provider plugin. Node 24.16 or newer is required.

```bash
npm install -g openclaw@latest
openclaw plugins install @openclaw/deepseek-provider
```

### Configure Environment Variables

Get a key from the API keys page at platform.deepseek.com, then export it so the Gateway can read it.

```bash
export DEEPSEEK_API_KEY="your-deepseek-api-key"
openclaw onboard --auth-choice deepseek-api-key
openclaw models list --provider deepseek
```

### Start the OpenClaw DeepSeek Application

Start the Gateway and confirm `deepseek/deepseek-v4-pro` is the default model.

```bash
openclaw gateway --port 18789
```

Railway handles the container, the public domain, and the persistent volume for you, while on a VPS you manage those yourself.

## Official Pricing of OpenClaw DeepSeek (OpenClaw pricing)

OpenClaw is free and open source under the MIT license, so there is no OpenClaw paid plan to buy.

## OpenClaw DeepSeek cloud vs self hosted comparison (Pricing, features, costs, and more)

Running OpenClaw on DeepSeek splits the bill in two.

### Monthly cost of self hosting OpenClaw DeepSeek on Railway

Plan roughly $10-25/mo for the Chromium browser variant, which needs 1-2 GB of RAM.

### System Requirements for Hosting OpenClaw DeepSeek on a VPS

Give the gateway 1-2 GB of RAM if you run the browser variant, and keep `/data/.openclaw` on persistent disk so state survives restarts.

## Frequently Asked Questions (FAQs)

### Which DeepSeek models are available in OpenClaw?

OpenClaw ships four built-in refs: `deepseek/deepseek-flash`, `deepseek/deepseek-v4-flash`, `deepseek/deepseek-v4-pro` (the onboarding default), and `deepseek/deepseek-v4-flash-vision-exp` (experimental).

### Which model should I pick for image input?

Pick `deepseek/deepseek-flash` for images. Switch with `openclaw models set deepseek/deepseek-flash`.

### Why did my old deepseek-chat model stop working?

DeepSeek retired `deepseek-chat` and `deepseek-reasoner` on July 24, 2026 at 15:59 UTC.

### Do I need to set DEEPSEEK_API_KEY where the Gateway daemon can read it?

Yes, if the Gateway runs as a daemon under launchd or systemd, the key has to be visible to that process.

### How do I turn thinking up or off for V4 models?

Send `/think xhigh` or `/think max` to request maximum `reasoning_effort`.

### Is DeepSeek API usage included in the Railway price?

No.


## 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 v0.1 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/deploy-openclaw-with-deepseek
