Deploying on PythonAnywhere
PythonAnywhere
PythonAnywhere is the simplest way to deploy web2py applications.
PythonAnywhere is a Python development and hosting environment that displays in your web browser and runs on cloud servers. They are already set up with everything you need to run Python and they support web2py specifically. In our experience PythonAnywhere is easy to use, fast, and powerful. They also provide MySQL databases, python shells and Dropbox integration. Professional hosting is available if the free basic one is not enough for you.
In order to use PythonAnywhere you need to create an account, login, then use the provided web Dashboard to add a new Web App of type web2py.
The interface also ask you for an administrative password.
The web2py folder will be created in your user folder.
Alternatively, you can also use the web based BASH shell to install web2py as you normally do:
wget http://www.web2py.com/examples/static/web2py_src.zip
unzip web2py_src.zip
Always from the shell you should create an admin password for later use:
python -c "from gluon.main import save_password; save_password(raw_input('admin password: '), 443)"
Then visit the “Web” panel using the web interface and edit the “/var/www/
Edit the “/var/www/
import sys
path = '/home/<username>/web2py'
if path not in sys.path: sys.path.append(path)
from wsgihandler import application # the web2py handler
Here “
After you’ve installed web2py, notice that you do not need to start or configure a web server. PythonAnywhere provides one and it is reloaded when you edit the above config file. or press the “Reload web app” button on the Dashboard. Everyone can immediately access it at the url:
http://yourusername.pythonanywhere.com/
They also provide a secure version of the site, and you’re forced to use it for using the web2py Administrative interface at:
https://yourusername.pythonanywhere.com/admin/default/index
We thank the PythonAnywhere team for their help and support.