-
Notifications
You must be signed in to change notification settings - Fork 351
Running Without Docker
Alexander Bersenev edited this page Nov 30, 2019
·
3 revisions
The proxy can be started without Docker (for advanced users)
git clone -b stable https://github.com/alexbers/mtprotoproxy.git; cd mtprotoproxy
- (optional, recommended) edit config.py, set PORT, USERS and AD_TAG
python3 mtprotoproxy.py
The proxy will run until the ssh-session or terminal-session is closed.
This instruction is valid on Linux with systemd (most modern OSes including Ubuntu, Debian, CentOS, RHEL, Gentoo, etc). You should have Python3 and git installed
git clone -b stable https://github.com/alexbers/mtprotoproxy.git /opt/mtprotoproxy; cd /opt/mtprotoproxy
- (optional, recommended) edit config.py, set PORT, USERS and AD_TAG
- Create tgproxy user:
useradd --no-create-home -s /usr/sbin/nologin tgproxy
- (optional, recommended) install cryptography Python module
- (optional) install uvloop Python module
- Create file /etc/systemd/system/mtprotoproxy.service with the following content:
[Unit]
Description=Async MTProto proxy for Telegram
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/opt/mtprotoproxy/mtprotoproxy.py
AmbientCapabilities=CAP_NET_BIND_SERVICE
LimitNOFILE=infinity
User=tgproxy
Group=tgproxy
Restart=on-failure
[Install]
WantedBy=multi-user.target
- Enable autostarting on boot:
systemctl enable mtprotoproxy
- (optional, start the proxy)
systemctl start mtprotoproxy
- (optional, get a link to share the proxy)
journalctl -u mtprotoproxy | cat