---
title: "Deploy T3rmx sours"
description: "Deploy your own Telegram UserBot with PostgreSQL"
category: "Other"
url: https://railway.com/deploy/t3rmx-sours
---

# Deploy T3rmx sours

Deploy your own Telegram UserBot with PostgreSQL

**[Deploy T3rmx sours on Railway](https://railway.com/template/t3rmx-sours)**

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

- **Creator:** Riyadh Radwan's Projects
- **Category:** Other

## Template content

### worker https://cdn.jsdelivr.net/npm/lucide-static@latest/icons/shield-check.svg

- **Source:** https://github.com/T3rmx/T3rmx-UserBot
- **Start command:** `python3 -m JoKeRUB`

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

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

## Documentation

# Deploy and Host T3rmx UserBot on Railway

Deploy your own independent Telegram UserBot using T3rmx UserBot. This template provisions an application service and a dedicated PostgreSQL database on Railway. Each deployment uses its own Telegram credentials, owner configuration, and database, allowing users to operate independent instances without sharing the original project owner's private credentials or data.

## About Hosting

T3rmx UserBot is a Telegram automation and userbot project built with Python and Telethon. This Railway template uses the repository's Dockerfile to build and run the application, alongside a dedicated PostgreSQL service for persistent data storage.

Each deployment is designed to have its own application instance and PostgreSQL database. Railway service reference variables connect the application to its database without requiring users to copy database credentials manually.

Users must provide their own Telegram API credentials, Telegram session, bot token, bot username, and owner ID during deployment. No personal Telegram credentials or production database are included in the template.

## Why Deploy

Deploying T3rmx UserBot on Railway simplifies the infrastructure setup:

- Automated application deployment using Docker.
- PostgreSQL provisioned as a separate service.
- Database connection configured through Railway reference variables.
- Independent configuration for every deployment.
- No need to manually install Python dependencies or configure a Linux server.
- Centralized deployment logs, environment variables, and service management.

## Common Use Cases

- Running a personal Telegram UserBot with your own Telegram account.
- Deploying an independent instance for a separate Telegram account.
- Building and testing Telegram automation workflows.
- Running a customized UserBot without managing your own VPS.
- Hosting a Telegram automation project with persistent PostgreSQL storage.

## Dependencies for T3rmx UserBot Hosting

- Python runtime and project dependencies installed through the Dockerfile.
- Telethon for Telegram API communication.
- PostgreSQL for persistent application data.
- Railway application service and PostgreSQL service.
- Telegram API credentials and an authorized Telegram session supplied by the deployer.

### Deployment Dependencies

Before deploying, prepare your own:

- Telegram API ID: https://my.telegram.org
- Telegram API Hash: https://my.telegram.org
- Telegram String Session generated from your own Telegram account.
- Telegram Bot Token obtained from @BotFather.
- Telegram Bot Username.
- Telegram Owner ID.

The template requires these application variables:

- `STRING_SESSION`
- `APP_ID`
- `API_HASH`
- `TG_BOT_TOKEN`
- `TG_BOT_USERNAME`
- `T3RMX_OWNER_ID`

`DATABASE_URL` should reference the PostgreSQL service provisioned for the same deployment.

Optional configuration:

- `ALIVE_NAME` — defaults to `T3rmx UserBot`.
- `TZ` — defaults to `UTC`.
- `ENV` — defaults to `production`.
- `COMMAND_HAND_LER` — command prefix configuration.
- `SUDO_COMMAND_HAND_LER` — sudo command prefix configuration.
- `VCMODE` — voice chat mode configuration.
- `VC_SESSION` — optional voice chat session configuration.

Never reuse another deployment's Telegram session, bot token, API credentials, or database connection.

### Security and Privacy

Every deployer must use their own Telegram credentials and session. Keep all credentials private and configure them through Railway environment variables. Never commit secrets to GitHub or include personal production data in a public template.

### Implementation Details

- Source repository: https://github.com/T3rmx/T3rmx-UserBot
- Build configuration: Dockerfile
- Application startup: `python3 -m JoKeRUB`
- Database: Railway PostgreSQL
- Database configuration: `DATABASE_URL`
- Health check configuration: `/health` (requires the application HTTP endpoint to be available).

Only deploy after reviewing the environment variables and confirming that the application and database are correctly connected.

## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/t3rmx-sours
