---
title: "Deploy Devin Discord Bot"
description: "Deploy and Host Devin Discord Bot with Railway"
category: "AI/ML"
url: https://railway.com/deploy/devin-discord-bot
---

# Deploy Devin Discord Bot

Deploy and Host Devin Discord Bot with Railway

**[Deploy Devin Discord Bot on Railway](https://railway.com/template/devin-discord-bot)**

- **Creator:** Waren Gonzaga
- **Category:** AI/ML
- **Total deploys:** 3

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### Devin Discord Bot https://devicons.railway.app/Discord

- **Image:** wgtechlabs/devin-discord-bot:latest

## Documentation

# Deploy and Host Devin Discord Bot on Railway

A self-hosted Discord bot that integrates with the Devin AI API. Start autonomous coding sessions, review PRs, write tests, and fix bugs directly from Discord using slash commands or @mentions.

## About Hosting Devin Discord Bot

Devin Discord Bot brings AI-powered autonomous coding to your Discord workspace. Deploy the bot as a persistent service on Railway, connect it to your Devin AI account, and let your team start coding sessions without leaving Discord. The bot manages real-time session polling, thread-based conversations, PostgreSQL-backed session persistence, and color-coded status updates—all self-hosted under your control.

## Common Use Cases

- Start autonomous coding sessions with slash commands or @mentions
- Review pull requests and generate feedback directly in Discord
- Write test suites for existing codebases
- Fix bugs with AI assistance and real-time progress updates

## Dependencies for Devin Discord Bot Hosting

- Node.js 22+ (26 recommended)
- PostgreSQL 14+ (session state storage)
- Discord bot token with Message Content intent and thread permissions

### Deployment Dependencies

- [Devin AI API Key](https://devin.ai) (starts with `apk_`)
- [Discord Developer Portal](https://discord.com/developers/applications) (to create and configure your bot)
- [PostgreSQL on Railway](https://railway.app/) (included in template)

### Implementation Details

**Environment variables** for Railway:

```env
DISCORD_BOT_TOKEN=your_bot_token
DISCORD_CLIENT_ID=your_client_id
DATABASE_URL=postgresql://...  # Provided by Railway PostgreSQL plugin
DEVIN_API_KEY=apk_your_api_key
BOT_NAME=Devin  # Optional: customize the bot's display name
```

**Tech stack**: TypeScript 5.8+, discord.js v14, Bun, PostgreSQL.

## Why Deploy Devin Discord Bot 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 Devin Discord Bot 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.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/devin-discord-bot
