How to Deploy a Telegram File Store Bot on Oracle Cloud Free VPS (2026 Guide)


 Telegram file store bots are becoming increasingly popular for media sharing, file indexing, and content automation. One of the best ways to host these bots for free is by using Oracle Cloud Free Tier VPS.

In this guide, I will show you how I deployed a Telegram File Store Bot using Oracle VPS, Python, and MongoDB.

This tutorial is beginner-friendly and works in 2026.


Why Use Oracle Cloud Free Tier?

Oracle Cloud offers one of the most powerful free VPS plans available today.

Benefits include:

  • Free forever VPS
  • 24GB RAM available in ARM instances
  • Stable uptime
  • Good performance for Telegram bots
  • Suitable for file store bots and streaming bots

Compared to other free hosting services, Oracle VPS provides much better long-term reliability.


Requirements

Before starting, you need:

  • A Telegram bot token from BotFather
  • Oracle Cloud account
  • MongoDB database
  • Basic Linux knowledge

Step 1 — Create Oracle VPS

Log in to:
Oracle Cloud

Then:

  1. Open Compute
  2. Create Instance
  3. Select Ubuntu 22.04
  4. Choose ARM shape if available
  5. Add SSH public key
  6. Create instance



Step 2 — Connect Using SSH

Use PowerShell or Terminal.

Example:

ssh ubuntu@YOUR_VPS_IP

If successful, you will see Ubuntu terminal access.

Screenshot Needed

Take screenshot of successful SSH login.


Step 3 — Update VPS

Run:

sudo apt update && sudo apt upgrade -y

Then install Python and Git:

sudo apt install python3 python3-pip git screen -y

Step 4 — Clone Your Bot Repository

Example:

git clone YOUR_GITHUB_REPO_LINK
cd YOUR_BOT_FOLDER

If your repository is private:

git clone https://USERNAME:TOKEN@github.com/username/repo.git

Step 5 — Install Requirements

Run:

pip3 install -r requirements.txt

If errors appear, install missing modules manually.

Common example:

pip install pytz

This fixes the common:
“ModuleNotFoundError: No module named pytz”


Step 6 — Configure Environment Variables

Create .env file:

API_ID=
API_HASH=
BOT_TOKEN=
MONGO_URI=
LOG_CHANNEL=
ADMINS=

Never expose these publicly.


Step 7 — Run the Bot

Start using:

python3 bot.py

If successful, your bot should come online in Telegram.




Step 8 — Keep Bot Running 24/7

Install PM2:

sudo npm install pm2 -g

Run bot:

pm2 start bot.py --interpreter python3

Save process:

pm2 save

Enable auto startup:

pm2 startup

Common Errors and Fixes

BOT_TOKEN variable missing

Cause:

  • Incorrect .env configuration

Fix:

  • Double-check BOT_TOKEN line

FloodWait Errors

Cause:

  • Too many Telegram requests

Fix:

  • Add sleep delays
  • Use proper flood wait handling

MongoDB Connection Failed

Cause:

  • Wrong URI
  • IP blocked

Fix:

  • Verify MongoDB Atlas network access

Final Thoughts

Oracle Cloud Free Tier is one of the best free hosting solutions for Telegram bots in 2026.

If configured properly, your bot can run continuously with excellent performance and zero hosting cost.

For beginners entering Telegram bot development, this setup provides a strong foundation for learning automation, file management, and cloud hosting.





Post a Comment

Previous Post Next Post