Hosting Python applications in Plesk is quite manageable once you know which components belong together: the right Python version, a virtual environment, the right dependencies, and a correctly configured entry point (WSGI). Plesk has a built-in Python extension for this that handles most of the work. Below you’ll find a step-by-step guide on how to set up, configure, and launch a Flask or Django application.
Preparation and requirements
Before you begin, you need a hosting package or VPS with Plesk and the Python extension installed. Check this in Plesk under Extensions, search for “Python” and make sure it is activated. You’ll also need:
- SSH access to your server (helpful, not always required)
- A supported Python version (check the overview in Plesk itself, this differs per server)
- A domain or subdomain on which the application should run
- Your project files including a requirements.txt
Don’t have a domain linked to your hosting account yet? You can easily arrange this via domain names. Coming from another provider? You can bring your Python projects along when switching to Tandata.
Configuring Python in Plesk
Plesk links Python applications to the web server via its own application server. Here’s how to set this up:
Open your domain in Plesk
Go to Websites & Domains and click on the domain where the Python application should run.
Activate Python
Click the Python icon (or go to Applications) and enable Python for this domain.
Choose the Python version
Select the desired version from the list of available interpreters on your server.
Set the document root and application directory
Indicate where your project files are located and which file serves as the starting point (for example app.py or wsgi.py).
Plesk automatically creates a virtual environment in the application directory as soon as you activate Python for the domain. This can be viewed and managed from the same screen.
Deploying your application
Once Python is activated, you can actually roll out your application. This applies to both Flask and Django.
Upload your files
Use SFTP, Git, or the file manager in Plesk to place your project folder in the application directory.
Install dependencies
Click “Upload and install requirements.txt” in Plesk, or activate the virtual environment via SSH and run pip install -r requirements.txt.
Set the entry point
Specify the correct WSGI file (for example wsgi.py for Django, or the app instance for Flask) so Plesk knows how to start the application.
Restart the application
Click “Restart App” in Plesk after every change to code or dependencies, so the changes take effect.
If you also use email on the same domain, for example for notifications from your application, set up a business mailbox via business email.
Management and maintenance
Maintenance remains important after going live. Regularly check the log files of both your application and the web server; you can find these in Plesk under Logs and in the application directory itself. Keep dependencies up to date and test changes first on a subdomain or staging environment before rolling them out to production.
If you run into a configuration issue, check the knowledge base or contact support, which is also available at night via WhatsApp, ticket, or email.
Frequently Asked Questions
Which Python versions can I use in Plesk?
This depends on which interpreters are installed on the server. Check the overview in the Python settings of your domain in Plesk.
Can I run multiple Python applications on one server?
Yes. Each application runs in its own virtual environment and is linked to its own domain or subdomain.
How do I restart my application after a change?
Use the “Restart App” button in the Python panel of your domain. This reloads the code and any new dependencies.
Does this also work for Django with a database?
Yes, you can link a database via Plesk and set the connection details in your Django settings as usual.
What if my application doesn’t start?
First check the error logs in Plesk and make sure the correct entry point and dependencies are set. The cause is often a missing package or an incorrect path.
Conclusion
With the Python extension in Plesk, you can launch a Flask or Django application step by step: activate Python for your domain, set up a virtual environment, install your dependencies, and point to the correct entry point. By continuing to check logs and keeping dependencies up to date, your application will keep running stably.