---
title: "Deploy Chat-GPT Discord bot"
description: "GPT-4 chatbot with context"
category: "Bots"
url: https://railway.com/deploy/1cSU5t
---

# Deploy Chat-GPT Discord bot

GPT-4 chatbot with context

**[Deploy Chat-GPT Discord bot on Railway](https://railway.com/template/1cSU5t)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/1cSU5t/manifest.json

- **Creator:** jon's Projects
- **Category:** Bots
- **Total deploys:** 101

## Template content

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

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

### Discord-gpt4-bot-template

- **Source:** https://github.com/jonbeau/Discord-gpt4-bot-template

## Documentation

## Chat-GPT Discord bot starter

This is a stater Discord bot that keeps user context in a Postgres database and interacts with OpenAI API.

[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/1cSU5t?referralCode=WpeP6D)

## ✨ Features

- Python
- Py-cord
- OpenAI
- PostgreSQL

## 🤷 How to use

- Install Python requirements `pip install -r requirements.txt`
- Set your [DISCORD_TOKEN](https://discord.com/developers/applications) and [OPENAI_API_KEY](https://platform.openai.com/account/api-keys) variables









## Similar templates

- [Telegram JavaScript Bot](https://railway.com/deploy/5lRkWa) — A template for Telegram bot in JavaScript using grammY
- [Cobalt Tools [Updated Nov ’26]](https://railway.com/deploy/cobalt) — Cobalt Tools [Nov ’26] (Media Downloader, Converter & Automation) Self Host
- [Telegram Gateway](https://railway.com/deploy/railway-telegram-gateway) — Multi-bot Telegram webhook gateway with WebSocket event streaming

Open this page in a browser: https://railway.com/deploy/1cSU5t
