https://github.com/internet-helper/mtproto-mtproxy-telegram
One-click script to install MTProto Proxy server on Debian and Ubuntu for Telegram. Скрипт для установки прокси-сервера MTProto в один клик на Debian и Ubuntu для Telegram.
https://github.com/internet-helper/mtproto-mtproxy-telegram
debian mtproto mtproto-install mtproto-proxy mtprotoproxy mtproxy mtproxy-install telegram ubuntu
Last synced: 4 months ago
JSON representation
One-click script to install MTProto Proxy server on Debian and Ubuntu for Telegram. Скрипт для установки прокси-сервера MTProto в один клик на Debian и Ubuntu для Telegram.
- Host: GitHub
- URL: https://github.com/internet-helper/mtproto-mtproxy-telegram
- Owner: Internet-Helper
- Created: 2025-06-04T15:15:36.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-06-16T22:38:07.000Z (8 months ago)
- Last Synced: 2025-06-24T17:06:22.999Z (8 months ago)
- Topics: debian, mtproto, mtproto-install, mtproto-proxy, mtprotoproxy, mtproxy, mtproxy-install, telegram, ubuntu
- Language: Shell
- Homepage:
- Size: 91.8 KB
- Stars: 5
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.en.md
Awesome Lists containing this project
README
# Installation for Debian 10-12 or Ubuntu 20.04-24.04
> [!IMPORTANT]
> This material is prepared for scientific and technical purposes. Using the provided materials for purposes other than familiarization may be a violation of applicable law.
> The author is not responsible for any improper use of this material!
***
Like the project? Support the author via [CloudTips](https://pay.cloudtips.ru/p/8ec8a87c) or [Yoomoney](https://yoomoney.ru/to/41001945296522) for a cup of coffee ☕
***
## About MTProxy
**MTProxy** is the official proxy server from Telegram, based on MTProto.
The official repository [TelegramMessenger/MTProxy](https://github.com/TelegramMessenger/MTProxy) is outdated as it has compilation issues.
This script is designed to automate installation and resolve compatibility issues for modern systems, offering a number of improvements.
## Main Script Features
- Installs, reinstalls, or completely removes MTProxy.
- Allows selection of external and internal ports during installation/reinstallation.
- Sets up automatic daily configuration updates via `cron` for stable proxy operation.
- Updates MTProxy secret with a single command.
- Generates connection links after installation.
## System Requirements
- **OS**: Debian 10, 11, 12 or Ubuntu 20.04, 22.04, 22.10, 23.04, 24.04
- **RAM**: 512 MB or more
- **CPU**: 1 core or more
- **Disk**: 1 GB
- **Network**: Static public IP
## Installation Instructions
Run the following commands in the terminal:
```
# Download the script
wget -O install_mtproxy_english.sh https://raw.githubusercontent.com/Internet-Helper/MTProto-MTProxy-Telegram/refs/heads/main/install_mtproxy_english.sh
# Install dos2unix (if not already installed)
sudo apt update && sudo apt install -y dos2unix
# Fix line endings
dos2unix install_mtproxy_english.sh
# Grant execution permissions
chmod +x install_mtproxy_english.sh
# Run the script
sudo /bin/bash ./install_mtproxy_english.sh
```
After updating and installing required packages, the script will prompt you to select external and internal ports:

## Setup and Usage
After launching **MTProxy**, you will receive the following details:

## Proxy Setup Instructions:
**For `https://t.me/proxy?server=...`**:
1. Click the link or share it in any chat
2. Telegram will prompt for connection confirmation
3. Click «Connect»
**For `tg://proxy?server=...`**:
1. Copy the link and send it to «Saved Messages» or any chat
2. Click the link
3. Telegram will prompt for connection confirmation
4. Click «Connect»
**For for manual input in Telegram (Mobile)**:
1. Go to `Settings` → `Data and Storage` → `Proxy Settings` at the bottom
2. Select `Add Proxy` → Choose `MTProto Proxy`
3. Enter your server IP, external port, and secret
4. Save and connect
**For for manual input in Telegram (Desktop)**:
1. Go to `Settings` → `Advanced` → `Connection Type` → `Use Custom Proxy`
2. Select `Add Proxy` → Choose `MTProto Proxy`
3. Enter your server IP, external port, and secret
4. Save and connect
## Management Commands
- Start:
```
sudo systemctl start mtproxy
```
- Stop:
```
sudo systemctl stop mtproxy
```
- Restart:
```
sudo systemctl restart mtproxy
```
- Status:
```
sudo systemctl status mtproxy
```
- Logs:
```
sudo journalctl -u mtproxy -f
```
- Update config:
```
sudo mtproxy-update
```
- Check external port:
```
sudo ss -tulnp | grep mtproto-proxy
```
- Change port:
```
sudo install_mtproxy_english.sh reinstall
```
- Update secret:
```
sudo install_mtproxy_english.sh update-secret
```
- Complete removal:
```
sudo install_mtproxy_english.sh delete
```
***
Like the project? Support the author via [CloudTips](https://pay.cloudtips.ru/p/8ec8a87c) or [Yoomoney](https://yoomoney.ru/to/41001945296522) for a cup of coffee ☕