Prerequisites
Before setting up Teldrive, ensure you have the following requirements in place:
Required Components
- A Telegram Account: You'll need an active Telegram account
- A Private Telegram Channel: For storing your files securely
- A PostgreSQL Database: Either Supabase (cloud-hosted) or a local instance
- Docker and Docker Compose: For containerized deployment (required for Linux and macOS)
Docker Installation
Install Docker and Docker Compose using the official Docker script:
sh
curl https://get.docker.com | sh
Verify your installation:
sh
docker --version
docker compose --version
Database Options
You can use either Supabase (cloud-hosted) or set up a local PostgreSQL instance.
Option 1: Using Supabase (Recommended for Beginners)
- Go to Supabase and create an account
- Click "New Project" and fill in the details:
- Project Name: Give your project a name
- Database Password: Set a secure password
- Region: Choose the closest region to your location
- Click "Create New Project"
- Once created, go to the project dashboard
- Find and copy the "Connection String (Transaction)" from the settings
- Important: Enable the pgroonga extension in your Supabase project
Option 2: Setting Up a Local PostgreSQL Database
Create a docker-compose.yml
file with the following content:
yml
services:
postgres:
image: groonga/pgroonga:latest-alpine-17
container_name: postgres_db
restart: always
networks:
- postgres
environment:
- POSTGRES_USER=teldrive
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=postgres
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
postgres:
external: true
volumes:
postgres_data:
external: true
Important: Customize the username and password for security.
Launch your local database:
sh
docker network create postgres
docker volume create postgres_data
docker compose up -d
Your local database connection string will be postgres://teldrive:secret@postgres/postgres
(adjust username and password if changed).
Next Steps
Once you have all prerequisites in place, proceed to the Installation or Usage guides.