How to Host a Python App Print

  • python, python app
  • 1

Register Domain SA offers fast, reliable Python hosting in South Africa. This step-by-step guide shows you exactly how to deploy and run your first Python web application (Flask, Django, FastAPI) - even if you’ve never hosted Python before.

Quick Summary:

  1. Create the Python application in cPanel

  2. Upload your project files (including requirements.txt)

  3. Run Pip Install (before starting your app)

  4. Start (or Restart) the app

 

What you need before you start

  • Access to your hosting account’s cPanel
  • A Python web application (Flask, Django, FastAPI)
  • Your app’s startup file (commonly app.py or wsgi.py)
  • A valid requirements.txt file for dependencies
 

Step 1: Log in to cPanel and open the Python tool

  1. Log in to your cPanel.
  2. Scroll to the Software section.
  3. Click Setup Python App.

Tip: If you don’t see “Setup Python App”, please make sure that you signed up for Python App Hosting

 
Find Setup Python App in cPanel Screenshot: In cPanel, go to SoftwareSetup Python App.
 

Step 2: Create your Python application

  1. Click Create Application.
  2. Choose the correct settings (explained below).
  3. Click Create.
 

Recommended settings (most common)

  • Python Version: Select the version your app requires (for example 3.12 or 3.13)
  • Application Root: Example: pythonapp
  • Application URL: Choose your domain/subdomain (example: https://example.co.za)
  • Startup File: Example: app.py / wsgi.py
  • Entry Point: Example: app (the variable name of your Flask/Django WSGI app)
Create Python application settings in cPanel Screenshot: Configure the Python version, root folder, URL, startup file, and entry point.
 

Step 3: Upload your Python app files to the Application Root

After creating the app, upload your project files into the folder you selected as Application Root (example: /home/username/pythonapp).

 

Option A: Upload with File Manager (recommended)

  1. Open File Manager in cPanel.
  2. Navigate to your app folder (example: pythonapp).
  3. Upload your project files, including:
    • app.py or wsgi.py
    • requirements.txt
    • Any folders needed (for example templates, static, src)
Upload Python files using File Manager Screenshot: Upload your Python files into the Application Root folder using File Manager.
 

Step 4: Install dependencies (Run Pip Install)

  1. Go back to Setup Python App.
  2. Find your application in the list.
  3. Click Run Pip Install to install dependencies from requirements.txt.

Note: You do not need SSH access. The install process runs inside your application environment.

 

Step 5: Start the Python application

  1. In Setup Python App, click Start App.
  2. Open your domain/subdomain in a browser to confirm the site loads.
 
Start Python app in cPanel Screenshot: Use Start / Restart to apply changes and bring your Python app online.
 

Important notes for Python apps

  • Do not use app.run() in production - Passenger handles startup.
  • Restart the app after code changes to apply updates.
  • If you change dependencies, run Pip Install again.
 

Example: Simple Flask test app

from flask import Flask

app = Flask(__name__)

@app.route("/")
def home():
    return "Python app is running on Register Domain SA!"
 

Troubleshooting (common Python cPanel issues)

1) My app won’t start

  • Confirm the Startup File and Entry Point are correct (case-sensitive).
  • Make sure requirements.txt exists in the Application Root folder.
  • Run Pip Install again.
  • Check the application logs inside Setup Python App.
 

2) I get a 500 / Application Error

  • Click Restart App.
  • Review the logs in Setup Python App for errors.
  • Confirm all dependencies installed successfully.
  • Ensure your app exports the correct entry point (for Flask, the app object).
 

3) My changes aren’t showing

  • Restart the app after uploading changes.
  • Clear your browser cache or test in a private/incognito window.
 

Was this answer helpful?

« Back