Deploy Teldrive — Telegram Drive Manager
A self-hosted Telegram-powered cloud storage and file manager.
Teldrive
Just deployed
Just deployed
/var/lib/postgresql/data
Deploy and Host Teldrive on Railway
Teldrive is a self-hosted cloud storage and file management platform powered by Telegram. It allows you to store, organize, upload, download, and manage files using Telegram as the underlying storage layer while providing a dedicated web interface and API.
About Hosting Teldrive
This template deploys Teldrive on Railway using the official Teldrive container image together with Railway PostgreSQL.
Teldrive runs as a public HTTP service while PostgreSQL remains accessible only through Railway's private networking. PostgreSQL stores application data and metadata required by Teldrive.
To connect Teldrive to Telegram, you must provide your own Telegram API credentials generated from my.telegram.org.
The template intentionally keeps the deployment lightweight and does not include Redis or additional storage services unless they are required for a specific workload.
Common Use Cases
- Build a self-hosted cloud file storage platform using Telegram
- Store and manage large files without maintaining a traditional object storage server
- Access Telegram-backed files through a dedicated web interface
- Organize personal or team file collections
- Build applications that interact with Telegram-backed storage
- Create a private alternative to traditional cloud file managers
Dependencies for Teldrive Hosting
-
Teldrive
- Runs the web interface and application API
- Publicly accessible through Railway HTTP networking
- Uses port
8080
-
PostgreSQL
- Stores Teldrive application data and metadata
- Uses Railway private networking
- Provisioned using Railway's managed PostgreSQL service
-
Telegram API
- Requires a Telegram API ID and API Hash
- Credentials can be created at
my.telegram.org
Deployment Architecture
Internet
│
│ HTTPS
▼
Teldrive
│
│ Private Network
▼
PostgreSQL
│
▼
Telegram API
Only Teldrive needs a public Railway domain.
PostgreSQL should remain private and should not require public TCP exposure.
Important Configuration
After deploying the template, configure your Telegram credentials:
- Telegram API ID
- Telegram API Hash
You can obtain these credentials from:
https://my.telegram.org
Then open:
API development tools
and create a Telegram application.
The template also automatically configures:
- PostgreSQL database connection
- Authentication secret
- Teldrive HTTP port
- Railway service references
Networking
| Service | Access | Protocol | Port |
|---|---|---|---|
| Teldrive | Public | HTTP/HTTPS | 8080 |
| PostgreSQL | Private | PostgreSQL | 5432 |
Teldrive should be assigned a Railway public domain.
PostgreSQL should communicate with Teldrive using Railway private networking and Railway service variables.
Persistent Storage
Teldrive application metadata is stored in PostgreSQL.
A dedicated Railway volume is not required for the default template configuration.
PostgreSQL persistence is automatically handled by the Railway PostgreSQL service.
If a future Teldrive version introduces local persistent state that cannot be stored in PostgreSQL, a Railway volume can be added separately.
Railway Runtime Configuration
| Configuration | Required |
|---|---|
| Public Domain | ✅ |
| PostgreSQL | ✅ |
| Redis | ❌ |
| Railway Bucket | ❌ |
| Teldrive Volume | ❌ |
RAILWAY_RUN_UID=0 | ❌ |
| Custom Start Command | ❌ |
| TCP Proxy | ❌ |
The official Teldrive image already contains the required startup configuration, so a custom Railway start command is not normally required.
Teldrive vs Alternatives
| Feature | Teldrive | Nextcloud | MinIO | Google Drive |
|---|---|---|---|---|
| Self-hosted | ✅ | ✅ | ✅ | ❌ |
| Web file manager | ✅ | ✅ | ⚠️ | ✅ |
| Telegram-backed storage | ✅ | ❌ | ❌ | ❌ |
| S3-compatible API | ❌ | ❌ | ✅ | ❌ |
| PostgreSQL support | ✅ | ✅ | ❌ | N/A |
| Lightweight deployment | ✅ | ⚠️ | ✅ | N/A |
| Traditional object storage | ❌ | ❌ | ✅ | ❌ |
| Managed infrastructure required | Minimal | Moderate | Moderate | Managed by Google |
Teldrive is particularly useful when you want a lightweight self-hosted file manager that uses Telegram as its storage backend rather than running a conventional object-storage infrastructure.
Why Deploy Teldrive 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 Teldrive 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
Teldrive
ghcr.io/tgdrive/teldrive:1.8.3TELDRIVE_TG_APP_ID
Telegram API application ID from my.telegram.org
TELDRIVE_TG_APP_HASH
Telegram API application hash from my.telegram.org