/go/telegram uses a Telegram channel as remote storage. You can send a file, or a whole folder, from the server to the channel and fetch a file back later by its name. It is handy for off-server copies of backups. It relies on tdl, a Telegram command-line tool. If tdl isn't installed, the command downloads and installs it the first time you run it. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# 1. Log in and choose the channel (only needed once)
/go/telegram login
# 2. Upload a file
/go/telegram /home/example.com/backup.zip
Options
| Argument | Required | Notes |
|---|---|---|
login |
No | Asks for your phone number and the login code, then asks which channel to use. |
<file> |
No | Path of a file on the server. It is uploaded under its own file name. |
<directory> |
No | Path of a folder on the server. Every file inside is uploaded. |
<file-name> |
No | The name of a file in the channel, for example backup.zip. It is saved in the current directory. |
If you haven’t run login yet, any other command runs login first and then stops. Run your command again afterwards.
Examples
# Log in and pick the channel
/go/telegram login
# Upload one file
/go/telegram /home/example.com/backup.zip
# Upload every file in a folder
/go/telegram /root/backups
# Download backup.zip into /root/restore
mkdir -p /root/restore
cd /root/restore
/go/telegram backup.zip
[!TIP]
Run downloads from a folder that doesn’t already contain a file with that name. If the file exists in the current folder, the command uploads it instead.
Output
The output comes from tdl: upload and download progress, and any error it reports.
During login, the command prints the channels it found, one per line with the channel ID and the first word of its name, and then asks you to confirm:
ChannelID: <the first channel's ID, ready to edit>
Press Enter to accept the suggested ID, or type another one.
The command has no message of its own for success. Every run is logged to /var/log/go/telegram.log with a timestamp and the arguments used.
| Outcome | Exit status |
|---|---|
login finished |
1 |
| Anything else | The status of the last tdl command |
See the full reference at /go/telegram and the GoAdmio command index.
GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.
