Telegram ยท Node.js ยท pm2

Drop a file.
Get the path.

A lightweight Telegram bot that receives any file from your phone and saves it directly to your VPS โ€” replying with the exact path ready to paste.

Get Started View on GitHub
uploader โ€” bot session
# Send a screenshot from your phone via Telegram
# Bot instantly replies:

๐Ÿ“‚ Saved โ†’ `/opt/uploader/inbox/2026-04-08T12-30-45_photo.jpg`

# Paste straight into Claude Code or your terminal
$ cat /opt/uploader/inbox/2026-04-08T12-30-45_photo.jpg | claude
Overview
How it works

Four steps from phone to path โ€” no cloud storage, no web UI, just your VPS.

01
๐Ÿ“ฑ
Send from phone
Drop any file into the bot chat on Telegram
02
โฌ‡๏ธ
Bot downloads it
File is pulled from Telegram's servers to your VPS
03
๐Ÿ’พ
Saved with timestamp
Stored in /opt/uploader/inbox/ with a timestamped name
04
๐Ÿ“‹
Path sent back
Bot replies with the full path โ€” tap to copy, paste into terminal
๐Ÿ“ท Photos ๐Ÿ“„ Documents ๐ŸŽฌ Videos ๐ŸŽ™ Voice / Audio ๐Ÿ—œ ZIP / Archives ๐Ÿ“ฆ Any format

โš  Telegram Bot API file size limit: 20 MB


Setup
Install in 5 steps

Requires Node.js 18+ and a VPS. Takes about 5 minutes.

1

Install prerequisites

Make sure Node.js 18+ is installed, then install pm2 globally.

# Check Node version
node -v

# Install pm2
npm install -g pm2
2

Create a Telegram bot

Open Telegram, message @BotFather, send /newbot, and follow the prompts. Copy the token it gives you.

Then message @userinfobot to get your numeric user ID.

3

Clone and configure

SSH into your VPS and run:

git clone https://github.com/CryptoPilot16/uploader /opt/uploader
cd /opt/uploader
npm install

Open the config and add your token and user ID:

nano ecosystem.config.js
// Set these two values:
TELEGRAM_BOT_TOKEN: 'your-token-here',
ALLOWED_USER_ID:    'your-user-id-here',
4

Start with pm2

Start the bot and configure it to survive reboots.

pm2 start ecosystem.config.js
pm2 save

# Enable auto-start on reboot:
pm2 startup
# Copy and run the command pm2 prints
pm2 save
5

Test it

Open Telegram, find your bot, and send it any photo or file. It should reply with a path like:

/opt/uploader/inbox/2026-04-08T12-30-45_photo.jpg

Nothing happened? Check the logs:

pm2 logs uploader

Reference
Bot commands

All commands are only accessible to your Telegram user ID.

Command Description
/help Show available commands
/list Show the last 10 files saved to inbox
/clear Delete all files in inbox
# View live logs
pm2 logs uploader

# Check status
pm2 status

# Restart after config change
pm2 delete uploader && pm2 start ecosystem.config.js && pm2 save