Deploy magistery-bot
Railway

Deploy magistery-bot

Deploy your own Telegram prediction market bot. Earn on every trade.

Deploy magistery-bot

/var/lib/postgresql/data

0xmagistery/bot-source:latest

0xmagistery/bot-source:latest

Just deployed

Deploy and Host Magistery Bot on Railway

Magistery Bot is a self-hosted Telegram trading bot built on the Magistery prediction market protocol. Operators deploy their own instance, set a fee on bets, and earn on every order placed. Users trade active Polymarket markets copied onto Magistery on demand, with USDT deposits on TON, background settlement, and copy trading.

About Hosting Magistery Bot

Deploying Magistery Bot on Railway requires a Telegram bot token, an operator seed phrase, a Polygon RPC endpoint, a LayerSwap API key for TON USDT bridging, and your Telegram user ID for operator commands. The template includes a PostgreSQL database. On startup, the bot migrates the database, derives its service wallet from the operator seed, and if no OperatorResolver is configured, creates one on Polygon via the factory (requires a small amount of POL for gas). After deploy, message your bot and run /setup to configure fees, categories, and branding. Once running, the bot syncs Polymarket markets, derives custodial per-user wallets from the operator seed, places and matches orders on Magistery, and runs background jobs for matching, bridging, resolution, and settlement.

Common Use Cases

  • Sports betting communities running their own prediction market bot in Telegram
  • Crypto groups trading event outcomes with on-chain settlement
  • Operators earning fees by hosting a prediction market venue for any community

Dependencies for Magistery Bot Hosting

  • PostgreSQL (included in template)
  • Polygon RPC provider (Alchemy, Infura, or QuickNode)

Deployment Dependencies

  • Telegram BotFather - Create your bot and get the token
  • Alchemy - Free Polygon RPC endpoint
  • LayerSwap - API key for TON USDT deposit/withdrawal bridging
  • Operator BIP-39 seed phrase - generate with a trusted wallet or offline tool

Why Deploy Magistery 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 Magistery 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.


Template Content

0xmagistery/bot-source:latest

ghcr.io/0xmagistery/bot-source:latest

More templates in this category

View Template
calm-fair
GitHub PR lifecycle tracker for Slack: reviews, reactions, cleanup

Yogen P
View Template
Telegram JavaScript Bot
A template for Telegram bot in JavaScript using grammY

Agampreet Singh
View Template
Cobalt Tools [Updated Apr ’26]
Cobalt Tools [Apr ’26] (Media Downloader, Converter & Automation) Self Host

shinyduo