CloudLinux Python Selector lets a cPanel account run a supported Python web application in its own environment. This guide applies to Setup Python App, when your provider has enabled that feature.

Prepare the application

Check that the application supports the selector’s WSGI hosting model. Obtain its startup file, callable entry point and dependency requirements. An ASGI application needs a suitable supported deployment method rather than an unchanged WSGI configuration.

Create the application

  1. Open Software > Setup Python App in cPanel.
  2. Click Create Application and select a supported Python version.
  3. Enter the Application Root and select the domain and path for Application URL.
  4. Set Application startup file to the application’s WSGI file, for example passenger_wsgi.py.
  5. Set Application Entry point to its callable, commonly application. Match the actual code rather than assuming a blank value is correct.
  6. Configure a private log-file path if required, then click Create.

Install and test

Upload the application code and its requirements file into the application root. Add the requirements file in the selector’s configuration files section where required, then use Run Pip Install.

For terminal commands, activate the environment using the exact command shown by the selector. Add required environment variables, save and restart the application.

Open its URL and check the application log. Do not expose passwords or other secrets in public files or troubleshooting output.