Deploy Magistery Bot
One-click deploy of the Magistery Telegram prediction market bot.
magistery-bot
Just deployed
Just deployed
/var/lib/postgresql/data
Deploy and Host Magistery Bot on Railway
Magistery Bot is an open-source Telegram trading bot for prediction markets built on the Magistery protocol (Polygon). Operators deploy their own instance to run prediction markets in any Telegram group with USDC settlement.
About Hosting Magistery Bot
Magistery Bot requires a PostgreSQL database (included in this template), a Polygon RPC endpoint, and API keys for Telegram and LayerSwap bridging. Once deployed, the bot runs a background keeper loop that handles order matching, market resolution, settlement, and TON bridging automatically. No manual intervention needed after setup.
Common Use Cases
- Run a prediction market community in Telegram
- Mirror Polymarket markets for your group
- Create custom markets with operator resolution
- Earn fees on every matched trade
Dependencies for Magistery Bot Hosting
- PostgreSQL (included in this template, auto-configured)
- Polygon RPC endpoint (free from Alchemy or QuickNode)
Deployment Dependencies
- Telegram BotFather — create a bot and get your token
- LayerSwap — sign up and create an API key for TON bridging
- Alchemy — create a free Polygon mainnet RPC endpoint
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
magistery-bot
0xMagistery/magistery-botRPC_URL
Polygon RPC endpoint. Get one free at alchemy.com — create an app on Polygon mainnet and copy the HTTPS URL.
OPERATOR_SEED
BIP-39 mnemonic phrase (12 or 24 words). This derives all user wallets. Keep it secret.
LAYERSWAP_API_KEY
API key from layerswap.io. Sign up, go to Developer tab, create an API key. Required for TON bridging.
TELEGRAM_BOT_TOKEN
Token from Telegram BotFather. Open Telegram, message @BotFather, send /newbot, copy the token.
OPERATOR_TELEGRAM_ID
Your numeric Telegram user ID. Message @userinfobot on Telegram to get it.

