Python Development

How to Deploy Python App on Shared Hosting

By the Domain India teamPublished 7 min read
Knowledge base article
Contents (9 sections)

You can run a small Flask or Django app on Domain India shared hosting: the cPanel and DirectAdmin servers have a Python application tool that creates a virtual environment for your app and serves it on your domain. This guide shows how to set it up, what to watch for, and when the App Platform or a VPS is the better choice.

Key takeaways

On our cPanel and DirectAdmin servers you create a Python app from the control panel, pick a Python version, upload your code, install your requirements and restart; SSH is optional. Your app is served through a passenger_wsgi.py file. Webuzo has no such tool that we could confirm, so ask support. For a production app with background tasks, heavy dependencies or steady traffic, use the App Platform or a VPS.

1. What we measured on our servers

We checked the shared servers on 23 September 2026:

ServerPython app toolPython versions offered
cPanelSetup Python App, enabled on the standard plans3.9, 3.11 and 3.12
DirectAdminPython selector plugin installed2.7, 3.8, 3.9, 3.10, 3.11, 3.12 and 3.13
WebuzoNot foundAsk support
Windows (Plesk)Not covered hereAsk support

Choose the newest version your app supports. Python 2.7, 3.8 and 3.9 no longer receive security fixes, so do not start a new project on them. Your app runs behind the Apache web server through Phusion Passenger, which loads it as a WSGI application.

2. Is shared hosting right for your app?

Good for
  • Small Flask, Django or other WSGI websites and APIs
  • Apps next to an existing website on the same account
  • Learning and low-traffic projects
Watch out for
  • Your app shares the account's CPU and memory limits
  • WSGI only: async servers such as Uvicorn are not how the tool runs apps
  • No root access, so no system packages or services of your own
  • No SSH unless support enables it for you

If your app hits the account's limits, visitors see errors such as 503 or 508. See Understanding hosting resource limits.

3. Create the app in cPanel

  1. Open the tool.
    Log in to cPanel, open Setup Python App in the Software section and click Create Application.
  2. Fill in the form.
    Choose the Python version, set Application root to a folder such as myapp (outside public_html), choose the domain and path in Application URL, and set the Application startup file (usually passenger_wsgi.py) and Application Entry point (usually application).
  3. Upload your code.
    Put your project and requirements.txt into the application root with File Manager or FTP. Leave out any local venv folder.
  4. Install requirements.
    On the app's page, add requirements.txt under the configuration files and click Run Pip Install.
  5. Restart.
    Click Restart and open your application URL.
cPanel Python application page with the Web Applications tab, a Create Application button and no applications yet
The Python app page in cPanel, before any app exists.

Environment variables such as SECRET_KEY or DJANGO_SETTINGS_MODULE go in the Environment variables section of the same page. Save, then restart.

4. The passenger_wsgi.py file

Passenger looks for a variable called application in your startup file.

Flask, with your app object in app.py:

python
import os
import sys

sys.path.insert(0, os.path.dirname(__file__))

from app import app as application

Django, with your project package called mysite:

python
import os
import sys

sys.path.insert(0, os.path.dirname(__file__))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

For Django, also set ALLOWED_HOSTS to your domain, set DEBUG = False, and run collectstatic so that your static files are served from a folder inside your website's document root.

5. Databases

Your hosting account includes MySQL-compatible databases that you create in the control panel. Connect to them from your app on localhost; install a driver such as PyMySQL or mysqlclient in the app's environment. Port 3306 is closed from outside, so use an SSH tunnel if you need to reach the database from your own computer. See How to connect to the MySQL database.

6. DirectAdmin

DirectAdmin has the same CloudLinux Python selector, installed as a plugin, with the same fields: version, application root, URL, startup file and entry point. Menu names can differ between DirectAdmin skins; if you cannot find the Python option, ask support.

DirectAdmin Python page with the Web Applications tab, a Create Application button and no applications yet
Setup Python App in DirectAdmin, before any app exists.

7. Using SSH (optional)

Jailed SSH access is available on every shared hosting plan (cPanel, DirectAdmin, Webuzo). It is off by default; ask support to enable it for your account. See Enabling and accessing jailed SSH.

With SSH on, the app page shows the command that enters your app's virtual environment, for example:

bash
source /home/USERNAME/virtualenv/myapp/3.12/bin/activate && cd /home/USERNAME/myapp
pip install -r requirements.txt
python manage.py migrate

Tools available inside the jailed shell vary by server, so check with support before you rely on one. Restart the app from the panel after each change.

8. Troubleshooting

  • The page shows an error or "Web application could not be started": check passenger_wsgi.py for typos and confirm the entry point is application. Restart after every fix.
  • ModuleNotFoundError: the package was installed outside the app's environment. Run Run Pip Install again, or activate the environment first when using SSH.
  • A package fails to build: some packages need system libraries that shared hosting does not provide. Choose a version with a prebuilt wheel, or use the App Platform or a VPS.
  • Changes do not show: restart the app. cPanel can serve a cached copy of a page for up to 120 minutes, so add ?t=1 to the URL to check.
  • Background tasks (Celery, schedulers) stop: shared hosting runs your app to answer web requests. Use a VPS for workers.

9. Where Python apps run best at Domain India

For a production Python app, the App Platform is the dependable route. You run Python there from your own Dockerfile, deploy from GitHub or with a deploy token, and get a PostgreSQL database and SSL with each plan. It has no SSH or root access. See Getting started with the App Platform.

App Starter
₹100/mo + GST
  • 512 MB RAM per app
  • 1 vCPU
  • 5 GB NVMe SSD
  • PostgreSQL Database
See plan details
App Developer
₹250/mo + GST
  • 512 MB RAM per app
  • 1.5 GB RAM total
  • 2 vCPU
  • 10 GB NVMe SSD
See plan details

For root access, Celery workers, Uvicorn or any system package, choose a VPS.

Can I host a Python app on Domain India shared hosting?

Yes, on our cPanel and DirectAdmin servers, which have a Python application tool in the control panel. On Webuzo we could not confirm one, so ask support.

Which Python versions are available?

When we checked on 23 September 2026, cPanel offered Python 3.9, 3.11 and 3.12, and DirectAdmin offered 2.7 and 3.8 to 3.13. The panel shows the current list when you create an app.

Can I run Django or Flask?

Yes. Both run as WSGI apps through a passenger_wsgi.py file that exposes a variable called application.

Do I need SSH?

No. You can create the app, upload files and install requirements from the control panel. Jailed SSH is available on request; it is off by default.

Can I run FastAPI with Uvicorn on shared hosting?

The shared hosting tool runs WSGI apps. For an ASGI server such as Uvicorn, use the App Platform with a Dockerfile, or a VPS.

Can my Python app use a database?

Yes. Create a MySQL-compatible database in the control panel and connect on localhost from your app. The App Platform includes PostgreSQL instead.

What is the best Domain India product for a production Python app?

The App Platform, which runs your app from a Dockerfile and deploys from GitHub or a deploy token. For root access and background workers, choose a VPS.

Ready to deploy? Start on cPanel hosting, move your app to the App Platform, or ask us in a support ticket which option fits your project.

Run your Python app on the App Platform

Deploy from GitHub or with a deploy token, with PostgreSQL and SSL included in every plan.

See App Platform plans

Was this article helpful?

Your answer helps us decide what to improve next.

Still need help? Open a support ticket and our team will reply.

Prefer an app? Add this site to your home screen.Get the app