A lightweight self hosted telegram files download application with interactive web ui.
5.4K
services:
telefetchr:
image: safiyu/telefetchr:latest
container_name: telefetchr
ports:
- "8000:8000"
volumes:
- /path/to/sessions:/app/sessions
- /path/to/downloads:/app/downloads
environment:
- PYTHONUNBUFFERED=1
- CHANNELS=@copyrighten_bot,@CinemaPranthan_Bot
- API_ID=29093411
- API_HASH=eeafc638a054078a8e6247c3bc307721
- PHONE_NUMBER=33661120838
- MAX_CONCURRENT_DOWNLOADS=3
restart: always
environment:
- PYTHONUNBUFFERED=1
- CHANNELS=@cop_bot,@Cin_Bot # comma separated list of channels
- API_ID=12345 # your api_id from my.telegram.org
- API_HASH=saasdasdf12324 # your api_hash from my.telegram.org
- PHONE_NUMBER=12345 # without + sign
- MAX_CONCURRENT_DOWNLOADS=3 # optional, default is 3
Once the container is running, open your browser and navigate to:
http://localhost:8000
sessions/ directoryIf you want to download files to a network location:
# Mount network share first
sudo mount -t cifs //server/share /mnt/network -o username=user,password=pass
# Update docker-compose.yml to add volume:
volumes:
- /mnt/network:/app/downloads
# Map network drive first (e.g., Z:)
net use Z: \\server\share /user:username password
# Update docker-compose.yml:
volumes:
- Z:/:/app/downloads
Examples for different systems:
Linux/macOS (NFS/SMB mount):
- /mnt/nas/downloads:/app/downloads
Windows (mapped network drive):
- Z:/downloads:/app/downloads
Windows (UNC path):
- //server/share/downloads:/app/downloads
Build and start the container:
docker-compose up -d
The -d flag runs the container in detached mode (background).
Check if the container is running:
docker-compose ps
Access the application: Open your browser and navigate to:
http://localhost:8000
# Build the image
docker build -t telefetchr .
# Run the container
docker run -d \
--name telefetchr \
-p 8000:8000 \
-v $(pwd)/downloads:/app/downloads \
-v $(pwd)/sessions:/app/sessions \
-e API_ID=123456 \
-e API_HASH=abcdef123456 \
-e CHANNELS=@news,@music,@movies \
-e PHONE_NUMBER=1234567890 \
-e MAX_CONCURRENT_DOWNLOADS=3 \
telefetchr
# Run the container (windows)
docker run -d `
--name telefetchr `
-p 8000:8000 `
-v ${PWD}/downloads:/app/downloads `
-v ${PWD}/sessions:/app/sessions `
-v ${PWD}/config.yaml:/app/config.yaml:ro `
-e API_ID=123456 `
-e API_HASH=abcdef123456 `
-e CHANNELS=@news,@music,@movies `
-e PHONE_NUMBER=1234567890 `
-e MAX_CONCURRENT_DOWNLOADS=3 `
telefetchr
# View logs
docker logs -f telefetchr
# Stop the container
docker stop telefetchr
docker rm telefetchr
Follow logs in real-time:
docker-compose logs -f
View logs for specific service:
docker-compose logs -f telefetchr
View last 100 lines:
docker-compose logs --tail=100
Stop containers (keeps data):
docker-compose stop
Stop and remove containers:
docker-compose down
docker-compose restart
If you modify launch.py or other application files:
docker-compose up -d --build
To access the container's shell for debugging:
docker-compose exec telefetchr /bin/bash
The following directories are mounted as volumes and will persist data:
Files are downloaded directly to your network drive location, so they're immediately available to other systems on your network.
Check logs:
docker-compose logs
Common issues:
If port 8000 is already occupied, edit docker-compose.yml:
ports:
- "8080:8000" # Change 8080 to any available port
Then access the app at http://localhost:8080
If you encounter permission issues with network drive access:
For Linux/macOS NFS mounts:
# Ensure the mount has correct permissions
sudo chmod 755 /mnt/your-network-drive
For Docker on Linux with network storage:
# Run container with specific user ID
docker-compose down
Then edit docker-compose.yml to add:
user: "1000:1000" # Replace with your user:group ID
Check your user ID:
id -u # Gets your user ID
id -g # Gets your group ID
To completely reset (warning: deletes all data):
docker-compose down -v
rm -rf downloads/* sessions/*
docker-compose up -d --build
First, mount your NFS share on the host:
# Install NFS client
sudo apt-get install nfs-common
# Create mount point
sudo mkdir -p /mnt/nas
# Mount NFS share
sudo mount -t nfs server.local:/share /mnt/nas
# Or add to /etc/fstab for automatic mounting:
echo "server.local:/share /mnt/nas nfs defaults 0 0" | sudo tee -a /etc/fstab
Then update docker-compose.yml:
volumes:
- /mnt/nas:/app/downloads
# Install CIFS utilities
sudo apt-get install cifs-utils
# Create credentials file
sudo nano /etc/.smbcredentials
# Add:
# username=your_username
# password=your_password
# Set permissions
sudo chmod 600 /etc/.smbcredentials
# Mount SMB share
sudo mount -t cifs //server/share /mnt/nas -o credentials=/etc/.smbcredentials
# Or add to /etc/fstab:
echo "//server/share /mnt/nas cifs credentials=/etc/.smbcredentials 0 0" | sudo tee -a /etc/fstab
On Windows with Docker Desktop, use the full path:
volumes:
- Z:/TelegramDownloads:/app/downloads # If Z: is your mapped drive
Or use UNC path directly:
volumes:
- //192.168.1.100/share/downloads:/app/downloads
Mount your network drive first, then:
volumes:
- /Volumes/NetworkDrive/downloads:/app/downloads
To limit container resources, add to docker-compose.yml:
services:
telefetchr:
# ... existing config ...
deploy:
resources:
limits:
cpus: '2'
memory: 2G
reservations:
cpus: '1'
memory: 512M
docker-compose down
docker-compose up -d --build
sessions/ directory contains sensitive authentication dataThis project is licensed under the MIT License.
Content type
Image
Digest
sha256:208b59298…
Size
65.3 MB
Last updated
4 months ago
docker pull safiyu/telefetchr