Python on ISPmanager hosting
In the examples example.com is your domain. Use your own values.
A Python site runs as a separate application. The panel creates a virtual environment and starts the server.
1. Create the site
- "Sites" → "Create a site" → manual setup.
- Enter the domain in "Name", for example
py.example.com. - Untick "PHP" and tick "Python".

- Choose the "Python version".
- "Application mode": "Python web server" — your script runs as the server.
- "Path to server" is the file to run,
server.pyby default. - Click "Create".


2. Site files
The panel creates server.py (a sample), an empty requirements.txt and the .venv virtual environment.

The app must listen on the socket in SOCKET, or on the port in PORT if "Use port" is enabled. Flask example with Waitress:
import os
from flask import Flask
from waitress import serve
app = Flask(__name__)
@app.get("/")
def index():
return "Hello from Python!"
if __name__ == "__main__":
sock = os.environ.get("SOCKET")
if sock:
if os.path.exists(sock):
os.unlink(sock)
serve(app, unix_socket=sock, unix_socket_perms="660")
else:
serve(app, host=os.environ.get("INSTANCE_HOST"), port=int(os.environ["PORT"]))3. Packages
- Site menu → configuration files. List packages in
requirements.txt, one per line.


- Site menu → "Pip install" → "Install". Packages go to the site
.venv.


4. Restart
After changes: site menu → "Restart (Python)" → "Restart".


The site settings ("Edit" → the Python handler block) show the interpreter and pip paths. The Python version and server arguments are changed there too.

Python in the terminal
In the Shell client activate the site environment and use pip and manage.py as usual:
cd ~/www/py.example.com
source .venv/bin/activate
pip install -r requirements.txt
python manage.py migrateFor Django set "Path to server" to your own start file that runs a WSGI server (Waitress or Gunicorn) on the socket from SOCKET.