---
title: "Deploy Teldrive — Telegram Drive Manager"
description: "A self-hosted Telegram-powered cloud storage and file manager."
category: "Storage"
url: https://railway.com/deploy/teldrive
---

# Deploy Teldrive — Telegram Drive Manager

A self-hosted Telegram-powered cloud storage and file manager.

**[Deploy Teldrive — Telegram Drive Manager on Railway](https://railway.com/template/teldrive)**

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

- **Creator:** INF Labs
- **Category:** Storage

## Template content

### Teldrive https://devicons.railway.app/telegram

- **Image:** ghcr.io/tgdrive/teldrive:1.8.3
- **Public domain:** Yes

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

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

## Documentation

# 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

```text
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.


## Similar templates

- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.
- [Redis](https://railway.com/deploy/redis-1) — Self Host Latest Redis with Railway
- [EasyImg](https://railway.com/deploy/easyimg) — Simple self-hostable Nuxt.js personal image hosting system.

Open this page in a browser: https://railway.com/deploy/teldrive
