You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Updated dependency: migrated from Motor to PyMongo
- Replaced centralized flood-wait handling with per-instance custom logic
- Added public Docker support for easier deployment
• One-click deploy button for Koyeb
• Deployment guides for Render and Railway
- Expanded FAQ section
Thunder provides enterprise-grade domain configuration through the `FQDN` setting, enabling professional file sharing with custom domains and comprehensive SSL support.
296
+
# 2. Configure
297
+
cp config_sample.env config.env
298
+
nano config.env # Edit your settings
332
299
333
-
-**Custom Domain Support**: Set your primary domain for file sharing.
334
-
-**Protocol Selection**: Dynamically serves over HTTP/HTTPS based on your `HAS_SSL` configuration.
335
-
-**Cloudflare Compatible**: Full support for Cloudflare Origin Certificates and reverse proxies.
336
-
-**Security Headers**: Adds proper security headers for production deployments.
> **Tip:** Start with the essential configuration to get Thunder running, then add optional features as needed.
329
+
330
+
</details>
331
+
332
+
## Quick Deploy
333
+
334
+
### Deploy to Koyeb
335
+
336
+
[](https://app.koyeb.com/deploy?type=docker&image=docker.io/fyaz05/thunder:latest&name=thunder&ports=8080;http;/&env[API_ID]=&env[API_HASH]=&env[BOT_TOKEN]=&env[BIN_CHANNEL]=&env[OWNER_ID]=&env[DATABASE_URL]=&env[FQDN]=)
337
+
338
+
339
+
After deployment, to add any additional environment variables, use the Koyeb dashboard under **Settings** → **Environment Variables**.
340
+
341
+
### Deploy to Render
342
+
343
+
1. Open [Render Dashboard](https://dashboard.render.com) → **New** → **Web Service**
> **Note:** See the [Configuration](#configuration) section for required environment variables.
356
+
357
+
## Reverse Proxy Setup
358
+
359
+
<details>
360
+
<summary>Reverse Proxy Guide</summary>
340
361
341
362
This guide will help you set up a secure reverse proxy using **NGINX** for your file streaming bot with **Cloudflare SSL protection**.
342
363
@@ -433,23 +454,54 @@ Your reverse proxy is now securely streaming files behind Cloudflare!
433
454
434
455
### Troubleshooting & FAQ
435
456
436
-
**Bot not responding?**
457
+
#### **Initial Setup**
458
+
459
+
**Q: Why isn't my bot responding after setup?**
460
+
A: This is usually a configuration issue. Please check the following:
461
+
1.**Verify `config.env`**: Make sure all essential variables (`API_ID`, `API_HASH`, `BOT_TOKEN`, `BIN_CHANNEL`, `DATABASE_URL`) are filled in correctly.
462
+
2.**Use `config.env` Only**: Do not edit `vars.py` or `config_sample.env`. The bot is designed to only read your settings from `config.env`.
463
+
3.**Check Logs**: Review the console logs on your server or hosting platform (Koyeb, Render, Heroku) for any startup errors.
464
+
465
+
**Q: What do I use for the `FQDN` variable?**
466
+
A: It's the public URL or IP address of your bot.
467
+
-**With a Domain**: Use your subdomain (e.g., `f2l.thunder.com`).
468
+
-**On Koyeb/Render/Heroku**: Use the public URL provided by the platform.
469
+
-**On a VPS**: Use your server's public IP address.
470
+
471
+
**Q: Why are my links not working on a VPS?**
472
+
A: For links to work on a VPS, the URL must include the port number (e.g., `http://YOUR_VPS_IP:8080`). Ensure that `NO_PORT` is set to `False` in `config.env` and that your server is configured to allow traffic through that port.
473
+
474
+
#### **Common Errors**
475
+
476
+
**Q: Why are my links showing a "Resource Not Found" error or not working?**
477
+
A: This error means the bot can't access the file. Check these three things:
478
+
1.**Invalid Token**: Your `BOT_TOKEN` or one of the `MULTI_TOKEN`s might be wrong. Double-check them with @BotFather.
479
+
2.**Missing Admin Rights**: The bot and **all** your client accounts must be **administrators** in the `BIN_CHANNEL`.
480
+
3.**File Deleted**: The link will break if the file was deleted from your `BIN_CHANNEL`.
481
+
482
+
**Q: Why isn't video or audio playing correctly in my browser?**
483
+
A: Your browser likely doesn't support the file's audio or video format (codec). This is a browser limitation, not a bot issue.
484
+
-**Solution**: For perfect playback, copy the link and play it in a dedicated media player. Recommended players include **VLC Media Player**, **MX Player**, **PotPlayer**, **IINA**, and **MPV**.
485
+
486
+
**Q: Why does the bot sometimes become unresponsive?**
487
+
A: This is likely a **Telegram Flood Wait**. To prevent spam, Telegram temporarily limits accounts that make too many requests. The bot is designed to handle this automatically by pausing and will resume on its own once the limit is lifted.
437
488
438
-
- Check if the `BOT_TOKEN` is correct in your `config.env`.
439
-
- Ensure your server's firewall is not blocking the bot's port.
440
-
- View bot logs for any error messages.
489
+
#### **Performance**
441
490
442
-
**Links not working?**
491
+
**Q: How can I fix slow download and streaming speeds?**
492
+
A: If your speeds are slow, here’s how to fix it:
493
+
-**Add More Clients**: This is the best solution. Add `MULTI_TOKEN`s to your `config.env` to distribute the workload and increase throughput.
494
+
-**Use DC4 Accounts**: For top performance, use Telegram accounts from **Data Center 4 (DC4)**, as they often have the fastest connection. Use `/dc` to check an account's data center.
495
+
-**Upgrade Your Server**: A server with a slow network will bottleneck your speeds. Consider upgrading your VPS plan.
443
496
444
-
- Verify your `FQDN` and `PORT` settings are correct.
445
-
- If using SSL (`HAS_SSL=True`), ensure your reverse proxy and certificates are set up correctly.
446
-
- Check that the bot has admin rights in the `BIN_CHANNEL` and can forward messages there.
497
+
#### **Bot Usage**
447
498
448
-
**Q: How do I get my API credentials?**
449
-
A: Visit [my.telegram.org/apps](https://my.telegram.org/apps) to get your `API_ID` and `API_HASH`.
499
+
**Q: How do I generate links for multiple files at once?**
500
+
A: The `/link` command can process multiple files sent in sequence. To use it, **reply to the first file** of the series with the command and the total count.
501
+
-**Example**: For a series of 5 files, reply to the very first file with `/link 5`.
450
502
451
-
**Q: Where can I create a bot token?**
452
-
A: Use [@BotFather](https://t.me/BotFather) on Telegram to create and manage your bot.
503
+
**Q: Can I mix tokens from different accounts and data centers?**
504
+
A: Yes. Mixing clients from different accounts and data centers (like DC1, DC4, and DC5) is a great way to improve bot performance and reliability.
453
505
454
506
### Contributing
455
507
@@ -469,7 +521,7 @@ Licensed under the [Apache License 2.0](LICENSE). See the `LICENSE` file for det
469
521
470
522
-[Pyrofork](https://github.com/Mayuri-Chan/pyrofork) - Telegram MTProto API Framework
0 commit comments