Looking for current product documentation?
Important operational guides are being maintained in the new documentation library.
Browse Docs

Guide: How to Deploy a Python (Django/Flask) App

Guide: How to Deploy a Python (Django/Flask) App

Our Python Selector allows you to run modern frameworks like Django, Flask, or FastAPI with full control over your virtual environment.

1. Create the Environment

  1. Log in to cPanel and click Setup Python App.

  2. Click Create Application.

  3. Choose your Python Version (e.g., 3.11 or 3.12).

  4. Application root: Enter your project folder (e.g., my_flask_app).

  5. Application URL: Select your domain and leave the path blank for the root.

  6. Application startup file: For Flask, this is usually app.py. For Django, it is passenger_wsgi.py.

  7. Click Create.

2. Install Dependencies

  1. Open your cPanel File Manager and upload your requirements.txt into the application root folder.

  2. Go back to Setup Python App and click Edit on your application.

  3. In the Configuration files section, type requirements.txt and click Add.

  4. Click the Run Pip Install button.

3. Special Note for Django

If you are running Django, you must run your migrations. Copy the Command for entering to virtual environment at the top of the page, paste it into the cPanel Terminal, and run: python manage.py migrate

Was this answer helpful?

Related Articles

Guide: How to Deploy a Ruby on Rails App

Guide: How to Deploy a Ruby on Rails App Deploying Ruby on SVR4U is simple. We use the Phusion...

Guide: How to Deploy Your First Node.js App on SVR4U

Guide: How to Deploy Your First Node.js App on SVR4U Welcome to SERVEFORU HOST INTEGRATED! Our...

Domain and DNS Basics for Hosting Customers

This article explains a common domain or DNS task and what to verify before and after making...

How to Point a Domain to Your Hosting Service

A domain can be connected to your hosting account either by changing nameservers or by updating...

How to Change Nameservers at Your Registrar

This article explains a common domain or DNS task and what to verify before and after making...