
Deploy nonibot
Deploy and host nonibot on Railway
Just deployed
Just deployed
Just deployed
/var/lib/postgresql/data
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.
Template Content
BETTER_AUTH_URL
このWebサイトのURL
DISCORD_CLIENT_ID
DiscordBotのユーザーID
TURNSTILE_SECRETKEY
Cloudflare Tunstileのシークレットキー
DISCORD_CLIENT_SECRET
DiscordのOAuth2シークレット
NEXT_PUBLIC_TURNSTILE_SITE_KEY
Cloudflare Turnstileのサイトキー
DISCORD_TOKEN
DiscordBotのトークン
