---
title: "Deploy nonibot"
description: "Deploy and host nonibot on Railway"
category: "Bots"
url: https://railway.com/deploy/nonibot
---

# Deploy nonibot

Deploy and host nonibot on Railway

**[Deploy nonibot on Railway](https://railway.com/template/nonibot)**

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

- **Creator:** NoNICK's Projects
- **Category:** Bots
- **Total deploys:** 1

## Template content

### web https://devicons.railway.app/next.js

- **Source:** nonick-mc/nonibot
- **Start command:** `pnpm web start`

### bot https://devicons.railway.app/nodejs

- **Source:** nonick-mc/nonibot
- **Start command:** `pnpm bot start --register`

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

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

## Documentation

# Deploy and Host nonibot on Railway

nonibot is an open-source, multi-purpose Discord bot paired with a web dashboard. Server admins configure features such as event logs and other per-server settings from the browser, and the bot applies them in Discord. It is built with discord.js, Next.js, Hono, and PostgreSQL in a pnpm monorepo.

## About Hosting nonibot

Hosting nonibot means running three connected pieces: the Discord bot (a long-running Node.js process), the Next.js web dashboard, and a PostgreSQL database. The bot connects to the Discord gateway and exposes a small internal API (Hono). The dashboard calls this API with a Bearer secret to fetch guild roles, channels, emojis, and members from the bot's cache. Both services read and write settings through the same database, using Drizzle ORM migrations. You need a Discord application (bot token, OAuth2 client ID and secret) and a shared internal API secret. On Railway, the template provisions the services and Postgres, wires `DATABASE_URL` between them, and lets you set the remaining environment variables.

## Common Use Cases

- Run a self-hosted Discord bot for your community with per-server settings managed from a web dashboard
- Log server events (such as joins, leaves, and message changes) to channels of your choice
- Offer a branded or private moderation and utility bot without maintaining your own servers

## Dependencies for nonibot Hosting

- PostgreSQL: stores settings, audit logs, and webhook data (provisioned by the template)
- nonibot Bot service: Node.js 22+ / discord.js process with the internal API
- nonibot Web service: Next.js dashboard (Node.js 22+, pnpm 10)
- A Discord application: bot token and OAuth2 client ID/secret for bot login and dashboard sign-in

### Implementation Details

Required environment variables (see `apps/bot/.env.sample` and `apps/web/.env.local` for the full list):

```
DISCORD_TOKEN=
DISCORD_CLIENT_ID=
DISCORD_CLIENT_SECRET=
INTERNAL_API_SECRET=
```

## Why Deploy nonibot 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 nonibot 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

- [Telegram JavaScript Bot](https://railway.com/deploy/5lRkWa) — A template for Telegram bot in JavaScript using grammY
- [Cobalt Tools [Updated Oct ’26]](https://railway.com/deploy/cobalt) — Cobalt Tools [Oct ’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/nonibot
