Following this tutorial in December of 2023 - The command at 8:30 did not work for me on Windowsx86 64bit. This command worked instead "sudo apt-get install libapache2-mod-wsgi-py3 python-dev-is-python3"
I've followed the series in this and learned quite a bit about flask. Just a quick note that if you are "root" you don't need to type sudo. A security tutorial would be great because there are many things that can be improved on this section. Otherwise, great work, great explanations!
Tim, you're doing a great job! There is a lot of valuable/helpful content on this channel. Keep it up. Hint: -y when using apt-get install. But this is for experienced users who know they want to say YES to the prompt.
This series is great. One comment, at around 16:00, you mention that for nano the exit command for Macs can be Ctrl+X or Cmd+X, which isn't correct. You have to use Ctrl+X. Same with all nano commands, need to use Ctrl. I've learned a lot from your series! Keep it up.
Hi Tim, I'm so glad I came across with your channel I was looking for this for a couple of days with barely any success. Thank you very much you have my like!
Thanks @Tim. very helpful guide! however cmd: sudo apt-get install libapache2-mod-wsgi python-dev didnt work for me because of python3 I guess. so did cmd: sudo apt-get install libapache2-mod-wsgi-py3 instead and it did work. Thanks. you are the best
thanks Tim, I have a secure apache home server and I've been struggling to get my django and flask apps running online. I will give it a shot with your configs!
I'm not sure what you're talking about but if you mean the contents of "/var/www/webApp/webApp" folder that's the flask app. this video was about running a flask app on Apache remember? so you need to have an app to run. that's the one.
@@mohammadfallah.rasoulnejad5379 In his past tutorials he didn't go over the __init__.py or setup.py files, just his main flask file so I was wondering about that part of the setup. This video is a part of a series he did as he mentions at the beginning of the video :)
In case you are facing the issue that the "Apache2 Debian Default Page" displays do: sudo a2dissite 000-default.conf to disable the default configuration for apache
A few tips from a Linux Engineer... - You're logged in as root, no need to use sudo (sudo = run as root). - Use tab completion when entering paths to avoid typos. - Ubuntu is pronounced "oo-boon-too". - Apache is pronounced "uh-patch-ee". - Set up public key authentication if you want to secure your Linux VM. Once it's working, disable root login with password.
Wow great series for a noob in the Python. Currently working with Akamai(formerly Linode) as you have referenced in this final great video. Why didn't you select the LAMP setup? Any particular reason? I set my stuff up using your recommendations, but a service ticket reply from Akamai asked if I knew they had it. Again, appreciate your help!
In the previous tutorials we had a file named 'main.py' in the root folder with __init__.py blank in the admin folder to make it a package. Where has this init file come from?
Hi Tim , I was following your flask tutorial , the last video where you host the side , is it valid for Django apps as well or is it limited for only flask apps?
I like what you are doing but id like to know the cli way all the way through. Copy Pasta in gui to get files on ur server is not as useful as knowing how to pull from git for instance. Anyways thanks for the vids, they are helpful. I have been digging youtube for weeks for good ubuntu server vids. Good ones are rare. Most I find are one off vids on how to install ubuntu server or terminal basics. I really hope you fill the niche. Ive only found two other playlists that get beyond basics helpful. But this is the only one ive seen touch flask. I managed to deploy a flask app to my server with gunicorn but dont know the diff between what I did n using apache. Or how to set up postgres locally on the server and connect to it. I guess I will just read what I need to know when the time comes but would much rather learn about it by watching a dope youtube lecture!!!
Actually I did not get why you may need all these Apache sfuff. Flask can work as without. Just need to change the default port from 5000 to 80 and take care of all static files in your application (which Apache take care about usually).
Because "Do not use the development server when deploying to production. It is intended for use only during local development. It is not designed to be particularly secure, stable, or efficient."
Hi Tim. I have followed your video. However, I only see "Index of/ Name Last Modified Size Description" when I visit my IP Address in the browser. It is as though I do not have an html file, yet I know I have one. Please assist. Thanks for the awesome video.
Hi Tim! Thanks for that video, that was very helpful, but I have one question. Must I create a folder called 'static' or not? If yes, what should I put inside of it? I have my Flask app, but I have only a 'template' folder and this is enough for me. Is it correct or should I reconfigure it somehow? Thanks for your help!
I have been getting an Internal Server Error... the page instructs me to find more information about the error in the server error log, but I'm not sure how to access it so that I can see what needs to be fixed. Anybody have any tips?
Hi, thanks for your video. It really helped me set it up in my 1st generation iPad air. However, I would like to set up openssh's SFTP. How can I do this?
Hi Tech, my script give me problem with Flask Session. The server response with a PermissionError: Permission Denied "/flask_session". I've tried all but nothing
I keep getting this error: "No supporting authentication methods available (server sent: publickey)" . Any ideas on why I'm getting this and how to fix it?
Great tutorial - I ran into an issue on the winSCP part of moving files to the directory. Reason : lack of privileges and needing root. winSCP can inject a shell command at the point of connection under the Advanced setting within the session configuration. click Advanced then under the Environment > SCP/Shell option add the command to the shell: field in this case 'sudo su -' (this elevates the user id to root privileges at point of connection.)
@@muhie You have to go into WinSCP on the files u need to write in, click on them individual once, then look for the properties option near the top right(not all the way top right). After you hit that in the permissions section, make sure all the W boxes are check marked. This files leading to that file have to have the permission to write as well(webApp file if that’s what u called it).
So, if we use Flask (Python), we will always need to have APACHE (which is manly to run PHP) to run Flask? Does not exist a server for Python, like Apache for PHP or Node for JavaScript??
The more common approach would be to use gunicorn as a webserver and nginx as a reverse proxy. Miguel Grinberg has a good guide on this in his Flask Mega Tutorial (Chapter 17).
Hey Tim, generally i enjoy your content but this is very dangerous since it seems you have not a lot of experience using Linux. Especially since this is targeted towards people setting up their first web server with most likely bad/insecure websites. -You are not showing how to properly set up the firewall (e.g. disallow all incoming connections besides ssh/http/https) -You are doing everything as the root user. This is a HUGE nono on Linux. I understand you want to help people get their stuff up and running but when we put resources out in the WWW we should at least have a minimum in terms of security.
Thanks for pointing that out! You are correct I do not use Linux frequently. The security is definitely an issue and the objective of this is to show people how to get very basic Hobby websites up that they can mess with themselves. I did not mean to imply that this would be ok to do for proper websites. I appreciate the feedback and will be more careful in the future!!
Tim, Do you have any videos on how to configure a linode server? I added the certificate from letsencrypt and browser works great, but mobile is being blocked. It has something to do with the IPV4 vs IPV6 connection. IPV6 is being blocked. Letsencrypt only has forums, and no one is giving an answer. Please help! Thank you,
When typing the command: sudo apt-get install libapache2-mod-wsgi python-dev I get the following message: "Note, selecting 'python-dev-is-python2' instead of 'python-dev' Package libapache2-mod-wsgi is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source" Does it need to be: apt-get install libapache2-mod-wsgi-py3 ?
so is anyone else not able to get the page to show html files from the template folder? it is running from the thml folder in the first webApp folder, even though i did everything exaclty the same as tim.
this is such an underrated channel
definetely..
more important than other people think
it is! fo sure.
It same with use hosting :)), so bad!
@Rizwan Mustafa Why?
Madman typing sudo while root. True sigma grindset.
Following this tutorial in December of 2023 - The command at 8:30 did not work for me on Windowsx86 64bit. This command worked instead "sudo apt-get install libapache2-mod-wsgi-py3 python-dev-is-python3"
THIS was SO helpful. Thanks you! I have come back and referenced it, like, a hundred times!
I've followed the series in this and learned quite a bit about flask. Just a quick note that if you are "root" you don't need to type sudo. A security tutorial would be great because there are many things that can be improved on this section. Otherwise, great work, great explanations!
The best simple and powerful tutorial I found yet for deploying flask in ubuntu. Thank you very much for sharing this.
Tim, you're doing a great job! There is a lot of valuable/helpful content on this channel. Keep it up.
Hint: -y when using apt-get install. But this is for experienced users who know they want to say YES to the prompt.
also he was already logged in as root
I can't wait to see what you've got for us next!
Nice username
Thanks!
Thnx Tim, these videos really helped me understand the setup of a Ubuntu server!
This series is great. One comment, at around 16:00, you mention that for nano the exit command for Macs can be Ctrl+X or Cmd+X, which isn't correct. You have to use Ctrl+X. Same with all nano commands, need to use Ctrl. I've learned a lot from your series! Keep it up.
This is the best Flask tutorial available on youtube.
Thanks Tim!!
Thank you, man! After going through sh**tton of articles, I made it to work with your video!
Great stuff 👍, you just saved me bro for office project deployment
That was very pleasurable, thank you.
Thanks tim for your video series . It is very helpful
Hi Tim,
I'm so glad I came across with your channel I was looking for this for a couple of days with barely any success.
Thank you very much you have my like!
thanks for the tuto men !
you're better than most of my teatchers haha
Thanks @Tim. very helpful guide! however cmd: sudo apt-get install libapache2-mod-wsgi python-dev didnt work for me because of python3 I guess. so did cmd: sudo apt-get install libapache2-mod-wsgi-py3 instead and it did work. Thanks. you are the best
Needed this, thank you
thanks
needed this as well
Ty
very detailed explain by example! specially the details about the mistakes that we might get ourselves into.
thanks Tim, I have a secure apache home server and I've been struggling to get my django and flask apps running online. I will give it a shot with your configs!
Thank's Sheldon Cooper.
I have been thinking about it over a years :D Now I got ) Thanks
Amazing playlist, thank you Tim. I hope to see the update version - Or comments about what has changed. Thank you very much.
Linode is one of America’s greatest companies IMO
Thank you! Your tutorial is great!
I want to kiss you computer server man, you have helped me greatly, keep up the helpful videos!
I’ll take likes instead ;)
00:00
Hello people. (lol)
I don't know what Linux is, but I'll watch this video!
Thank you!
I'm confused, where did the __init__.py files come from, where did the views folder come from, and is there a setup.py that's needed?
I'm not sure what you're talking about but if you mean the contents of "/var/www/webApp/webApp" folder that's the flask app. this video was about running a flask app on Apache remember? so you need to have an app to run. that's the one.
@@mohammadfallah.rasoulnejad5379 In his past tutorials he didn't go over the __init__.py or setup.py files, just his main flask file so I was wondering about that part of the setup. This video is a part of a series he did as he mentions at the beginning of the video :)
Did you manage to figure that up? I have the same problem
In case you are facing the issue that the "Apache2 Debian Default Page" displays do:
sudo a2dissite 000-default.conf
to disable the default configuration for apache
A few tips from a Linux Engineer...
- You're logged in as root, no need to use sudo (sudo = run as root).
- Use tab completion when entering paths to avoid typos.
- Ubuntu is pronounced "oo-boon-too".
- Apache is pronounced "uh-patch-ee".
- Set up public key authentication if you want to secure your Linux VM. Once it's working, disable root login with password.
Wow great series for a noob in the Python. Currently working with Akamai(formerly Linode) as you have referenced in this final great video.
Why didn't you select the LAMP setup? Any particular reason? I set my stuff up using your recommendations, but a service ticket reply from Akamai asked if I knew they had it.
Again, appreciate your help!
ty tim great content as always
> cannot import name app
Doesn't work, any tips?
In the previous tutorials we had a file named 'main.py' in the root folder with __init__.py blank in the admin folder to make it a package. Where has this init file come from?
THANK YOU SO MUCH!!!! 🐐
Could you recommend any tutorial for setting up the custom domain?
video description:
step 5:
err:
sudo systemctl status apache 2 -> sudo systemctl status apache2
this case python base on run 2.7.5
pls how to run python 3.6 base on
in your webapp.wsgi file, change the top line from #!/usr/bin/python to #!/usr/bin/python3 (given that you have python3 installed on your server.
Really helpfull man, thanks!
Can you create a short video or a blog post about how to deploy with a virtualenv on apache with concreate examples?
Tim, Can you also tell us how to deploy using docker containers - Flask app + DB and deploy on Cloud if possible
Thank you so much!
fantastic tutorial!!
Awesome! Thanks.
Great tuto !! Thanks
Hi Tim , I was following your flask tutorial , the last video where you host the side , is it valid for Django apps as well or is it limited for only flask apps?
Please a crud tutorial in Django ✌️
I like what you are doing but id like to know the cli way all the way through. Copy Pasta in gui to get files on ur server is not as useful as knowing how to pull from git for instance. Anyways thanks for the vids, they are helpful.
I have been digging youtube for weeks for good ubuntu server vids. Good ones are rare. Most I find are one off vids on how to install ubuntu server or terminal basics. I really hope you fill the niche. Ive only found two other playlists that get beyond basics helpful. But this is the only one ive seen touch flask.
I managed to deploy a flask app to my server with gunicorn but dont know the diff between what I did n using apache. Or how to set up postgres locally on the server and connect to it. I guess I will just read what I need to know when the time comes but would much rather learn about it by watching a dope youtube lecture!!!
Please make a video on flask-sijax. I actually understand your tutorial and I am having a problem with understanding sijax.
Great video... If I have a flask rest api, Can I use the same deploy process?
i think linode changed. apache error says "no module named flask" which is a python2 error
Actually I did not get why you may need all these Apache sfuff.
Flask can work as without. Just need to change the default port from 5000 to 80 and take care of all static files in your application (which Apache take care about usually).
Because "Do not use the development server when deploying to production. It is intended for use only during local development. It is not designed to be particularly secure, stable, or efficient."
@@jhahn716 yep, the flask web server is for development only.
PLEASE HELP ME!!!
I follow all the steps but at the end I see the apache2 page and not my flask application
sudo a2dissite 000-default.conf
to disable the default configuration for apache
big thanks for you..
how do you change ip address to domain name?
+
TIM UR A REAL G 4 LIFGE
What if we need to run more than one app on a server and/or on different ports? Thanks!
That's very very nice since I am a Linux user...
Thank you.
Hi, great video. Thank you very much! Does this also work for Dash (Plotly Dash) Apps? Dash is based on Flask.
Hi Tim. I have followed your video. However, I only see "Index of/ Name Last Modified Size Description" when I visit my IP Address in the browser. It is as though I do not have an html file, yet I know I have one. Please assist. Thanks for the awesome video.
did you figure this out? I have the same issue.
It's a lot better and easier to do it with Heroku but anyway a very good video like always
i did the exact same steps until the end i got a 500 error
Why do you use Putty instead of just sshing in through command prompt?
Thank you!!!
Hi Tim!
Thanks for that video, that was very helpful, but I have one question. Must I create a folder called 'static' or not? If yes, what should I put inside of it? I have my Flask app, but I have only a 'template' folder and this is enough for me. Is it correct or should I reconfigure it somehow?
Thanks for your help!
static is for stuff like css and images
sudo is not necessary if you work under superuser, isn't?
Now how can I see that website you made?
Is this get all dependencies of your app?
I have been getting an Internal Server Error... the page instructs me to find more information about the error in the server error log, but I'm not sure how to access it so that I can see what needs to be fixed. Anybody have any tips?
u found any fix ?
I had hosted my site using this Apache but I am getting Hello World program instead of my actual web site ... Could you help me ?
Hi, thanks for your video. It really helped me set it up in my 1st generation iPad air. However, I would like to set up openssh's SFTP. How can I do this?
please do a flask-socketio app deployment using gunicorn, nginx, eventlet
Were you able to use this for deploying a web socket Flask application?
I'm unfortunately getting an Internal Server Error when deploying to an Ubuntu server on AWS (EC2).
Great tutorial either way, keep it up!
I also got this error on an RaspberryPi 3 b...
Hi Tech, my script give me problem with Flask Session. The server response with a PermissionError: Permission Denied "/flask_session". I've tried all but nothing
I have an homeserver but just have the local IP, how can i get the right Ip ? because it wont work with the local ip
I keep getting this error: "No supporting authentication methods available (server sent: publickey)" . Any ideas on why I'm getting this and how to fix it?
on advanced add ur private key
anyone else getting a 500 Internal Service Error?
error
Not Found
The requested URL was not found on this server.
why when I try to write my sqlite3 database it says "attempt to write a readonly database"?
Hello sir, can you teach us
how to build API using neo4j...
is this will work in machine learning to deploy it like this?
Great tutorial - I ran into an issue on the winSCP part of moving files to the directory.
Reason : lack of privileges and needing root.
winSCP can inject a shell command at the point of connection under the Advanced setting within the session configuration.
click Advanced then under the Environment > SCP/Shell option add the command to the shell: field in this case 'sudo su -'
(this elevates the user id to root privileges at point of connection.)
i cant get the sql data base to work when its deployed it works on host but not on the server
@@braydenuber3603 yes i can read the database but not write to it, do you have the same issue/do you have a fix
@@muhie You have to go into WinSCP on the files u need to write in, click on them individual once, then look for the properties option near the top right(not all the way top right). After you hit that in the permissions section, make sure all the W boxes are check marked. This files leading to that file have to have the permission to write as well(webApp file if that’s what u called it).
@@WireNut88 do you have to modify any of the wsgi file
@@WireNut88it works now thank you!!!!!
So, if we use Flask (Python), we will always need to have APACHE (which is manly to run PHP) to run Flask? Does not exist a server for Python, like Apache for PHP or Node for JavaScript??
The more common approach would be to use gunicorn as a webserver and nginx as a reverse proxy. Miguel Grinberg has a good guide on this in his Flask Mega Tutorial (Chapter 17).
Hey Tim, generally i enjoy your content but this is very dangerous since it seems you have not a lot of experience using Linux. Especially since this is targeted towards people setting up their first web server with most likely bad/insecure websites.
-You are not showing how to properly set up the firewall (e.g. disallow all incoming connections besides ssh/http/https)
-You are doing everything as the root user. This is a HUGE nono on Linux.
I understand you want to help people get their stuff up and running but when we put resources out in the WWW we should at least have a minimum in terms of security.
Thanks for pointing that out! You are correct I do not use Linux frequently. The security is definitely an issue and the objective of this is to show people how to get very basic Hobby websites up that they can mess with themselves. I did not mean to imply that this would be ok to do for proper websites. I appreciate the feedback and will be more careful in the future!!
can you tell me where I can find tutorials to do that?
Tim,
Do you have any videos on how to configure a linode server? I added the certificate from letsencrypt and browser works great, but mobile is being blocked. It has something to do with the IPV4 vs IPV6 connection. IPV6 is being blocked. Letsencrypt only has forums, and no one is giving an answer. Please help!
Thank you,
Very cool man!!
ya lo tengo desplegado pero no me muestra la pagina cuando me redirecciona\
Can I do this with windows?
How to handle multithreading in flask app on production server?
Anyone else getting an internal server error when they finish the guide and go to the site?
When typing the command:
sudo apt-get install libapache2-mod-wsgi python-dev
I get the following message:
"Note, selecting 'python-dev-is-python2' instead of 'python-dev'
Package libapache2-mod-wsgi is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source"
Does it need to be:
apt-get install libapache2-mod-wsgi-py3
?
did you find out the answer to this because i have this problem to ?
@@thomaseardley2900 i think I eventually put in the command i wrote below and it worked
Can I do everything same on own Ubuntu when I've static IP?
For anyone else getting the error:
E: Unable to locate package python-pip
-
try doing:
sudo apt-get install python3-pip
hello...can you give me a video to how i can change the ip to my domain name !!
SSL?
so how to make changes in the python code once u put that on the server ?
edit the __init__.py file and restart apache. changes will bee uplyed
so is anyone else not able to get the page to show html files from the template folder? it is running from the thml folder in the first webApp folder, even though i did everything exaclty the same as tim.
How to automate this through jenkins .