Deploy OpenHands + DeepSeek AI Coding Agent

AI coding agent with DeepSeek, GitHub integration, and persistent workspace

Deploy OpenHands + DeepSeek AI Coding Agent

Just deployed

Just deployed

OpenHands + DeepSeek AI Coding Agent

A production-ready deployment of OpenHands on Railway, configured to use DeepSeek as your LLM provider. This brings autonomous AI engineering to your own infrastructure.

Deploy and Host

Depoy OpenHands with DeepSeek on Railway in minutes. Get a persistent workspace, GitHub integration, basic auth protection, and a public web URL. All conversations and code changes survive redeploys.

About Hosting

OpenHands runs in local-runtime mode on Railway—the agent executes in the container itself (fast, fine for single-user or trusted use). Your workspace is stored on a persistent 5GB volume. Railway provides automatic HTTPS, HTTP basic auth, and environment-variable-based configuration.

Why Deploy

  • Self-hosted: Your code and conversations stay private on your Railway instance
  • DeepSeek-powered: Uses the affordable deepseek-chat model for code generation
  • GitHub-native: Clone repos, create branches, write fixes, and open pull requests autonomously
  • Cost-effective: ~$5–15/month for compute + pay-as-you-go for DeepSeek API tokens
  • Always-on: Agents continue working even when your laptop is shut down

Common Use Cases

  • Autonomous issue resolution: Assign a GitHub issue, get a pull request
  • Full-stack feature development: Describe a feature, get scaffolded and tested code
  • Codebase refactoring: Automate legacy migrations, TypeScript conversions, dependency bumps
  • Code review assistance: Multi-conversation workspace for reviewing and iterating
  • Persistent workflows: Long-running tasks that outlive a session

Dependencies for

You'll need:

Features

  • Web UI: Access OpenHands from any browser via a public Railway URL
  • DeepSeek Integration: Uses deepseek-chat model for code generation and analysis
  • GitHub Integration: Connect your repos, read code, create branches, and open pull requests
  • Persistent Workspace: All conversations, files, and history survive redeploys
  • Basic Auth: Simple username/password protection for your deployment
  • Local Runtime: Executes in the Railway container (fast, fine for single-user/trusted use)

Getting Started

  1. Click "Deploy" and wait for the build (~3–5 minutes)
  2. Once healthy, open the public Railway URL
  3. Log in with your basic auth username and password
  4. In Settings, add your DeepSeek API key and GitHub token
  5. Start a conversation, attach repositories, and assign tasks

Configuration

VariableDescriptionExample
LLM_MODELDeepSeek model (pre-filled)deepseek-chat
LLM_API_KEYDeepSeek API keyYour API key from platform.deepseek.com
LLM_BASE_URLDeepSeek API endpoint (pre-filled)https://api.deepseek.com/v1
GITHUB_TOKENGitHub personal access token with repo scopeYour token from github.com/settings/tokens
BASIC_AUTH_USERWeb UI login usernameadmin
BASIC_AUTH_PASSWORDWeb UI login passwordYour secure password
RUNTIMEAgent runtime mode (pre-filled for Railway)local

Agent Capabilities

  • Read/write files in your workspace
  • Run shell commands (within the container)
  • Git operations: clone, branch, commit, push
  • Create pull requests via GitHub API
  • Web browsing for research and context
  • Multi-conversation workspace with persistent chat history

Cost

  • Railway: ~$5–15/month on the Hobby plan for compute
  • DeepSeek API: Pay per token used (very affordable)
  • No per-seat licensing — one deployment, unlimited conversations

Security & Privacy

  • Your code stays in your Railway instance (private)
  • API keys stored as encrypted Railway secrets
  • Basic auth protects HTTP and WebSocket endpoints
  • Agent sandbox is isolated to the mounted /workspace volume
  • Local-runtime mode: Agent executes in the container; keep the deployment access-controlled since it has shell access

Troubleshooting

Deployment won't start

  • Check the deployment logs for errors
  • Ensure LLM_API_KEY and GITHUB_TOKEN are set in Variables
  • Verify the image tag is valid (defaults to latest)

Web UI won't load

  • Confirm basic auth username and password
  • Check browser console for errors
  • Wait for deployment to become healthy (initial builds take 3–5 minutes)

Agent can't access repos

  • Verify your GitHub token has repo scope
  • Check that the token is still valid (not expired)
  • Confirm the repo URL is correct and public or accessible to your token

Upgrading

Bump the Docker image tag in Railway service settings and redeploy. Your workspace and conversation history survive on the persistent volume.

Resources


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
116
View Template
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
7
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

codestorm
81