XAXA Server control panel

Guides

Python App

This example deploys a FastAPI app with uvicorn. Django and Flask work the same way with gunicorn.

1. Create the site

Add site → Python, pick the Python version, start command:

.venv/bin/uvicorn main:app --host 127.0.0.1 --port $PORT

2. Deploy

ssh example@your-server
cd ~/htdocs/example.com
git clone https://github.com/you/api.git .
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt

main.py:

from fastapi import FastAPI

app = FastAPI()

@app.get("/")
def home():
    return {"hello": "XAXA"}

3. Restart

Click Start on the Overview the first time; afterwards use Restart app (Git deploys restart automatically). Logs are in Logs → App.

Django / Flask

.venv/bin/gunicorn project.wsgi --bind 127.0.0.1:$PORT --workers 3
.venv/bin/gunicorn app:app --bind 127.0.0.1:$PORT

Serve Django static files by adding a location /static/ block with an alias in the vhost.

Environment, application directory and health

Settings → Environment edits the same .env files as Files. .env is shared, .env.build overrides builds, and .env.runtime overrides the app. Service overrides take precedence at runtime only. Values are literal and are never sourced as shell code; see environment syntax. Saving with restart enabled restarts running instances and leaves stopped instances stopped.

For a monorepo set Settings → General → Application directory. The start command, virtual environment, deploy script and environment files are relative to that directory. Creating a Python site does not create .venv; the default Git deploy script does. Each project's .venv is separate even when the Python interpreter is shared. Changing Python versions may require recreating the virtual environment and reinstalling dependencies.

With an HTTP health check path, starts and deployments wait for every instance to answer it with a status below 500; leave it empty for workers. Atomic deployments can briefly interrupt requests during restart; failed startup health attempts to restore the previous file release, without undoing database changes.

Found a mistake or need help? support@xaxa.com.tr