How To Host Your Bot Online 24/7 For FREE With Python (Telegram, Discord, Etc)

  Рет қаралды 155,466

Indently

Indently

Күн бұрын

In this video I will be showing you how you an host your bot online for free with Python and PythonAnywhere (www.pythonanywhere.com). You can choose to host whatever bot you want, but I will only be showing you how I used it with the Telegram Bot in this example. The same concept goes for any other bot you build, whether that's a Chat Bot, or a WhatsApp Bot. You can host it here for free!
▶ Become job-ready with Python:
www.indently.io
▶ Follow me on Instagram:
/ indentlyreels
00:00 Hosting your bot online for free
01:03 PythonAnywhere
02:01 New file
02:52 Installing packages
03:39 Starting the server
04:08 Chatting with my bot
04:34 Hosted 24/7
04:46 Conclusion

Пікірлер: 182
@user-ip3en1it5l
@user-ip3en1it5l 7 ай бұрын
Thank you, this is great! I say it's quite uneasy to get such info about telegram bot. Looking forward for any updating )))
@FanaK-uh1hj
@FanaK-uh1hj Жыл бұрын
Youre a legend. i just created my first Bot On Telegram successfullly so.
@pauldrums4081
@pauldrums4081 Жыл бұрын
You've really done well bro. I love this
@hamdikurdi
@hamdikurdi 11 ай бұрын
wow, fast , clean , understandable , and works!, TYSM
@denis.chernenko
@denis.chernenko Жыл бұрын
Thank you very much for posting that video, I really needed it at the moment for a test run in real life conditions. Really appreciate your work. However, it can be only a very temporary solution ...
@LokeshWankhede
@LokeshWankhede Жыл бұрын
This is exactly what I'm looking for! Love you bro..
@dolevbenhous5265
@dolevbenhous5265 Жыл бұрын
Easy to implement and works great with the bot that I made according to your tutorial. Very recommend.
@bebaAgua_computadorNaoHidrata
@bebaAgua_computadorNaoHidrata 5 ай бұрын
This is exactly what I'm looking for! Thanks
@kirkjoserey
@kirkjoserey Жыл бұрын
thnks!!! Its what I needed for my project
@mcbbcn
@mcbbcn 3 ай бұрын
Love your content! Thank you so much!
@mugudev
@mugudev Жыл бұрын
One of the Most underrated channel for python tutorials ❤❤
@percysimpson1777
@percysimpson1777 Жыл бұрын
It is not 24x7. The bot stops after 24 hours (sometimes a bit longer maybe 2 days but it it eventually stops). Then we need to rerun the script in terminal again to restart the bot. This loop goes on. I had a bot deployed there. The bot does not stop the same time everyday, so I do not know when it will stop. I got complains from users that my bot is not running, then I would restart the bot. After few days, I moved on to other platform.
@Noir-Road
@Noir-Road Жыл бұрын
Which platform you ended up using ? I had the same problem and just keep restarting my bot after 2-3 days
@percysimpson1777
@percysimpson1777 Жыл бұрын
@@Noir-Road I then moved to mogenius. It's the best platform I found after Heroku had ended their free tier. But they are also ending their free tier on March 31 of this year. So, I am searching for a new platform now.
@Skumo
@Skumo Жыл бұрын
For the telegram bot where can l find the location of the url to post on the script???
@neon_Nomad
@neon_Nomad Жыл бұрын
Github?
@harshgoel06
@harshgoel06 Жыл бұрын
can others view your code ? , If yes how do u hide some information like tokens, passwords etc..
@PascalGuimier
@PascalGuimier Жыл бұрын
Hey, thanks for the tip ! And remember to change your tg token ;)
@selim3291
@selim3291 Жыл бұрын
Thanks for the video!
@dadudle
@dadudle Жыл бұрын
super helpful thank you👍
@ExtremlyCold
@ExtremlyCold 3 ай бұрын
thank you so much for this video!!
@anton7357
@anton7357 5 ай бұрын
Great video. This really helped me a lot. But for some reason I have to restart the script every day to keep the bot running. Is there any way to restart it autmatically?
@lhodeniz
@lhodeniz Жыл бұрын
Thank you bro. I followed your guide and my bot is working for free now. before my bot's code was uploaded in hostinger but after few weeks it stop working and needed to setup again. I hope pythonanywhere is good and bot won't stop.
@UnnFold
@UnnFold Жыл бұрын
After a month it stopped?
@ChandanSah-un2xg
@ChandanSah-un2xg Жыл бұрын
Right now, the bot goes offline automatically after few hours of closed tab
@aminkt1742
@aminkt1742 4 ай бұрын
Tnx for simple explenation
@user-qy3hi9uu3i
@user-qy3hi9uu3i 6 ай бұрын
I've been looking for this for so long. Your video helped me to make my telegram bot work, finally! Thank you!
@prakhardoneria
@prakhardoneria 6 ай бұрын
Hey I also made a bot for telegram but that stops after I closed by tab
@srinivaschada1575
@srinivaschada1575 6 ай бұрын
​@@prakhardoneria which type of bot
@ter243
@ter243 11 күн бұрын
​@@prakhardoneriayes same issue do you find any other way ?
@wangyong2485
@wangyong2485 28 күн бұрын
Works fine for beginner. Thx a lot.
@drinkyourglassofwater
@drinkyourglassofwater 3 ай бұрын
Not working anymore. They patched it. Please upvote comment to prevent others from wasting time :(
@ExtremlyCold
@ExtremlyCold 3 ай бұрын
it works
@YwyeyegwgewEyeyey366ee
@YwyeyegwgewEyeyey366ee 2 ай бұрын
Seriously does it work
@domisnakedominik3749
@domisnakedominik3749 2 ай бұрын
Works for me
@flatuitous
@flatuitous 2 ай бұрын
@@domisnakedominik3749 it doesn't work
@dzgamerwinner9806
@dzgamerwinner9806 2 ай бұрын
@@domisnakedominik3749 cant a copy a python script from github ?
@mbegangsylvain1076
@mbegangsylvain1076 Жыл бұрын
You're the best 👍🏾
@Nabilh17
@Nabilh17 Жыл бұрын
excellent, thanks
@gamericeking
@gamericeking Жыл бұрын
Thanks man,!
@JoseLuis-rw1hg
@JoseLuis-rw1hg 8 ай бұрын
Good video, thanks...
@fedhasayelmachew7510
@fedhasayelmachew7510 6 күн бұрын
Wow thank you!
@1smmngsupport
@1smmngsupport 23 күн бұрын
❤❤❤, love this , Any class for WhatsApp bot?
@vxllvxn
@vxllvxn Жыл бұрын
wow thank you my bro
@arulselvans8608
@arulselvans8608 5 ай бұрын
Can you tell me how you send the user message to pythonanywhere script? For example: I have a python script which will reverse the string, whatever given as an input, now this script is hosted in pythonanywhere so I know how to call the function from my own android application through api call but I don't know how to pass the string?
@ilova_uz
@ilova_uz 3 ай бұрын
Ohhh thanks for much ✊✊✊
@Tanjiro__Kamado
@Tanjiro__Kamado 8 ай бұрын
my code is work locally but when i edit in pyhtonanywhere its give me error while local ones works perfectly
@WaterboxAnalytics
@WaterboxAnalytics Ай бұрын
if I have secret API keys ? is it safe ? how can I hide those?
@blago7daren
@blago7daren 2 ай бұрын
How to change visability on pythonanywhere? Are my files private by default? Can I use it as git repo and push by ssh?
@hellohiavi
@hellohiavi Жыл бұрын
Really great brother ☺️
@DealazonDaily
@DealazonDaily Жыл бұрын
I just started to run this bot now i hope this will work
@tsedayasrat2381
@tsedayasrat2381 Жыл бұрын
What is the installation for discord bot
@Mohammed-Alsahli
@Mohammed-Alsahli Жыл бұрын
How to host django app? Or how to run python script in html page
@FINDROBLOX
@FINDROBLOX Жыл бұрын
mine is not working im trying to do a discord bot but its not working at all it says it cant connect but idk why
@nsxg
@nsxg 4 ай бұрын
same
@balino6734
@balino6734 12 күн бұрын
there is a issue when iclick on run then only my bot runs unless it dont runs if new message send in the group
@UnnFold
@UnnFold Жыл бұрын
how much the storage? can my bot host at least 200 user and can i add video in my bot?
@DealazonDaily
@DealazonDaily Жыл бұрын
How can we host this in raspberry pi 4 .. can you please tell us that.
@galacticdinosauronline
@galacticdinosauronline 4 ай бұрын
I have to install json and requests, and when doing just like you've done it does not work :(
@TheSingleSurvivor
@TheSingleSurvivor Жыл бұрын
how can I get this server to play a sound for discord bot?
@UnnFold
@UnnFold Жыл бұрын
hey i have 3 py file and in my main py file i import some functions from them . how can i add them too?
@obsidianeagle7555
@obsidianeagle7555 6 ай бұрын
it's easy, first you need to create a directory in dashboard(left side), after that enter the directory you made, then upload your files (right side). then run your main file
@AskarAlmazovich
@AskarAlmazovich Жыл бұрын
no, its not works this way bro. I have tried pythonanywhere for several times unless you switch for always task it will not be working
@user-dw4pu7mw4z
@user-dw4pu7mw4z 10 ай бұрын
Anyone knows how to add to one program more txt files? Like if i would like to do database or sth
@PranathNaik
@PranathNaik 3 ай бұрын
How do i deploy telegram bot which is made using webhook
@epicone8953
@epicone8953 Жыл бұрын
What about databases? For example bot is using SQL and I need to connect it, but how in this new hoster ?
@systemkey1
@systemkey1 9 ай бұрын
never even seen that but good luck. I’m pretty sure it’s possible.
@Piyush-ts3vi
@Piyush-ts3vi Жыл бұрын
Can we use to file share bot Use link to get files
@TheJackimaru
@TheJackimaru 11 ай бұрын
How would you hide the Bot Token? I assume using .env files, but you would still have to upload the env file to this website
@oleksandrpypenko1052
@oleksandrpypenko1052 9 ай бұрын
Hi, i just uploaded a separate .env file. It says in pythonanywhere policies that only you have an access to the files you uploaded and only admins could access the files with your written permission
@NothingSpecial-7
@NothingSpecial-7 7 ай бұрын
Just regenerate it after showing it
@thelurker7
@thelurker7 Жыл бұрын
Thank you
@mustafahamza4812
@mustafahamza4812 21 күн бұрын
after i open the console i cant open the bash console
@beastrule
@beastrule 8 ай бұрын
which program did you use to program the bot?
@PathFindingProgrammers
@PathFindingProgrammers 8 ай бұрын
Python
@Pawlo370
@Pawlo370 Жыл бұрын
Can you show discord? Telegram isn't popular in Poland
@jonny9597
@jonny9597 9 ай бұрын
How come my bot says it can't connect to discord?
@julioserrano3302
@julioserrano3302 2 ай бұрын
Hello, good morning, can you please share the code of that bot?
@skyisthelimpet
@skyisthelimpet Жыл бұрын
Thanks for the quality content. Is there a whatsapp API that I can use in the same way?
@gental.
@gental. Жыл бұрын
Im sure that typing "Whatsapp python" will get you response 100x faster
@skyisthelimpet
@skyisthelimpet Жыл бұрын
@@gental. Yeah i tried it. Just read my question again. I asked if there is an API for Whatsapp so i can run code on a server
@gental.
@gental. Жыл бұрын
@@skyisthelimpet Absolutly first result after typing "python whatsapp": pywhatkit. Why can't You use it?
@Sinke_100
@Sinke_100 Жыл бұрын
I use render for my flask apps and APIs
@joshitoshi9835
@joshitoshi9835 Жыл бұрын
but how about telegram bot created with webhook method? where to find webhook url and set it up?
@minoprod
@minoprod Жыл бұрын
what if we host it from multiple accounts the same telegram file
@Indently
@Indently Жыл бұрын
Then you will have 2 files running instead of 1
@RobertLK-qm6jm
@RobertLK-qm6jm 8 ай бұрын
Cool!
@Cricket_addicted7
@Cricket_addicted7 5 ай бұрын
I need that script which you are using
@tulasisanjay
@tulasisanjay 8 ай бұрын
i facing connection issue how to solve
@bij_ay
@bij_ay 4 ай бұрын
Don’t know why but it is giving me errors more errors
@Nanditavelasquez
@Nanditavelasquez 11 ай бұрын
hello, do you know of any hosting for a bot made with Node.js?
@Q_Coder
@Q_Coder 7 ай бұрын
so this one is only working for Python only?
@lesserfield_
@lesserfield_ Жыл бұрын
i got network uncreachable?
@wuduh
@wuduh Ай бұрын
thank you
@bhai431
@bhai431 5 ай бұрын
*Please Give the same code* here
@afmxvirus1890
@afmxvirus1890 6 ай бұрын
thxx fr
@exbyte-dev
@exbyte-dev 7 ай бұрын
this doesn't work with discord bots
@Shavaiz001
@Shavaiz001 Жыл бұрын
I've got a discord bot but i have 2 files instead of one. One has the code and one has just: ``` import bot if __name__ = "main": bot.run_discord_bot ``` And the other has the actual code. I don't know how to run those two. And i can't run them like i do on my pc cuz it just gives me errors
@Trizzi2931
@Trizzi2931 Жыл бұрын
You should write like from ‘file_name’ import bot Just replace file name with the file you have without quotes
@Blockitjames
@Blockitjames 9 ай бұрын
pythonanywhere doesnt let you connect to discord appaerntly
@justecho5760
@justecho5760 Жыл бұрын
But what if my bot contains at least five files? How to run this?
@denis.chernenko
@denis.chernenko Жыл бұрын
Just simply upload them to the same /home/user/ folder, nothing complicated :)
@Jamux69
@Jamux69 Жыл бұрын
Hello, how can I make discord bot work in pythoneverywhere? Im a newbie
@SangramBiswal
@SangramBiswal Жыл бұрын
Yes you can
@prakhardoneria
@prakhardoneria 6 ай бұрын
My bot stopped after closing tab
@rishiraj2548
@rishiraj2548 Жыл бұрын
Thanks
@Roshan_Kumar_P.
@Roshan_Kumar_P. Ай бұрын
It works only 8-10 hours only 😢😢 Any one solve this issue
@ter243
@ter243 11 күн бұрын
How mine is working only once i have to press run button again n again
@tulasisanjay
@tulasisanjay 8 ай бұрын
2nd problem is database locked
@MirecSVK
@MirecSVK Жыл бұрын
discord bot won´t start
@lunar1787
@lunar1787 4 ай бұрын
this is patched
@user-zs6vv6ek9c
@user-zs6vv6ek9c Жыл бұрын
Thaaaaaaaaaaaaaaaaaaaaaaank you 🌹🌹🌹
@Prod_Skai
@Prod_Skai 3 ай бұрын
it keeps saying that "install" in the bash console is incorrect syntax!! Please Help
@ecobuildmanagement
@ecobuildmanagement 2 ай бұрын
what do you write in the console?
@nykkzz
@nykkzz Ай бұрын
@Prod_Skai Ikyk that writing wrong code gives a syntax error;indeed, the online hosting and the batch console is going to work perfectly fine.However, if the issue continues, look that the code you had wrote is correct or not bec it is the only possible solution for it.😅 You just encountered the issue bec of writing the wrong code. But I hope you might had solved the error by this time and created an amazing 'Telegram' or any other platform bot...
@jeancarlos8200
@jeancarlos8200 Жыл бұрын
Greetings. I was creating a telegram bot that uses the module however when running from pythonAnywhere, the execution gives me an error. Specifically with the use of . When running the code locally it works correctly. >Do you have any idea how to fix this
@ammarkhaled7586
@ammarkhaled7586 Жыл бұрын
maybe you didn't install the package or you .env variables that must be configured
@jeancarlos8200
@jeancarlos8200 Жыл бұрын
@@ammarkhaled7586 👍
@adhivp5594
@adhivp5594 Жыл бұрын
@@jeancarlos8200 hey same issue here, did you got the solution
@PathFindingProgrammers
@PathFindingProgrammers 8 ай бұрын
Did you install the request module first on pythonanywhere bash console?? Run this to install the module $ pip install requests
@itsmalay
@itsmalay Жыл бұрын
it says refused to connect Telegram server using Telethon
@lovandog9201
@lovandog9201 Жыл бұрын
same
@kodiq3429
@kodiq3429 Жыл бұрын
doesnt work
@carlitomaj2955
@carlitomaj2955 10 ай бұрын
Hi, would you mind sharing the script?
@BluescreenSharp
@BluescreenSharp 9 ай бұрын
Bro its like 90 Lines lmao
@applyalone
@applyalone 6 ай бұрын
perfect
@tmusic1001
@tmusic1001 Жыл бұрын
How can I solve telegram dispatcher error?
@10fersen
@10fersen Жыл бұрын
While loop, with try and exception
@tmusic1001
@tmusic1001 Жыл бұрын
@@10fersen What is the dispatcher for in general
@uzbtrust
@uzbtrust 10 ай бұрын
bot work 1 or 2 days :(
@Piyush-ts3vi
@Piyush-ts3vi Жыл бұрын
How to create file sharing bot through link plz made the video For free
@BluescreenSharp
@BluescreenSharp Жыл бұрын
Wtf
@Piyush-ts3vi
@Piyush-ts3vi Жыл бұрын
@@BluescreenSharp fliesharing bot I'm tolking about
@guanciottaman
@guanciottaman Жыл бұрын
Do you think this is better than replit?
@foreverunsure
@foreverunsure Жыл бұрын
I don't know about his opinion, but for certain projects it is better to use this than replit Otherwise replit is very good
@guanciottaman
@guanciottaman Жыл бұрын
@@foreverunsure yeah because there are also templates, a better code editor, you can share your code,...
@jorgezavala6984
@jorgezavala6984 Жыл бұрын
Replit and UptimeRobot works well, when it works. But I've found that it sometimes randomly stops. Just my personal experience
@jeancarlos8200
@jeancarlos8200 Жыл бұрын
Greetings. Do you know how to deploy an app in 24/7? Thanks in advance
@Shavaiz001
@Shavaiz001 Жыл бұрын
@@jeancarlos8200 i need an answer as well if you found out
@wolker604
@wolker604 8 ай бұрын
Change telegram token
@Pawlo370
@Pawlo370 2 ай бұрын
discord don't work
@CryptoEventyr
@CryptoEventyr Ай бұрын
same
@dusrasarthakaglawe-lg6ex
@dusrasarthakaglawe-lg6ex Ай бұрын
will ddos script work in this
@kuruchin9
@kuruchin9 10 ай бұрын
24/7???? It is literally showing in your dashboard 100(!!!) seconds CPU per DAY(!!!). Absolutelly trash.
@Indently
@Indently 10 ай бұрын
You will rarely use more than 100 seconds of CPU per day, and after you use that it continues to work at a reduced speed. Thank you for your comment and have a wonderful day!
@carlitomaj2955
@carlitomaj2955 10 ай бұрын
Hey mate, reply? Mind sending the script?
@mydevelop
@mydevelop Жыл бұрын
❤❤❤❤❤
@sanjarproductions
@sanjarproductions Жыл бұрын
I use aiogram ,can you help this website is not working for me
@NeuronsDelve
@NeuronsDelve Жыл бұрын
You mean people are using aiogram, but not working for you?
@harshgoel06
@harshgoel06 Жыл бұрын
can other users view our file and folder ?
@denis.chernenko
@denis.chernenko Жыл бұрын
Try accessing /user/your_user_name/files/home/your_user_name and you will know.
Function Overloading For Python Developers (Singledispatch)
10:25
ОБЯЗАТЕЛЬНО СОВЕРШАЙТЕ ДОБРО!❤❤❤
00:45
Summer shower by Secret Vlog
00:17
Secret Vlog
Рет қаралды 13 МЛН
ВОДА В СОЛО
00:20
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 33 МЛН
路飞太过分了,自己游泳。#海贼王#路飞
00:28
路飞与唐舞桐
Рет қаралды 37 МЛН
Deploying a Flask App on Render  FOR FREE | Easy steps 🚀
10:50
Dynamic Technologies
Рет қаралды 3,6 М.
Python Everyday 1: How Indentation Works
3:57
πthon_AI
Рет қаралды 15
Деплой Telegram бота на Python | PythonAnywhere
9:44
PyLounge - программирование на Python и всё о IT
Рет қаралды 41 М.
5 Useful F-String Tricks In Python
10:02
Indently
Рет қаралды 287 М.
I DIDN'T KNOW You Could Do THIS With "Yield" In Python
5:51
Indently
Рет қаралды 25 М.
3 PYTHON AUTOMATION PROJECTS FOR BEGINNERS
17:00
Internet Made Coder
Рет қаралды 1,6 МЛН
EASY! - How to HOST your DISCORD BOT 24/7 for FREE!
6:22
Neutroware.
Рет қаралды 8 М.
ОБЯЗАТЕЛЬНО СОВЕРШАЙТЕ ДОБРО!❤❤❤
00:45