Apps on GalaxyWebapps
Python Reference
Environment variables, advanced configuration, and deployment reference for Python apps on Galaxy.
Environment Variables
Set these in the Galaxy deployment form or your app's Settings page.
Core Variables
| Variable | Required | Default | Description |
|---|---|---|---|
PORT | Yes | 5000 | Port your app listens on. Galaxy assigns this automatically. |
PYTHONUNBUFFERED | Yes | (none) | Set to 1 to ensure immediate output flushing |
PYTHON_VERSION | No | (none) | Specify Python version if needed |
Common Application Variables
| Variable | Default | Description |
|---|---|---|
DEBUG | false | Enable debug mode (set to 0 for production) |
LOG_LEVEL | info | Logging verbosity |
TZ | UTC | Timezone for your app |
Advanced Configuration
Custom Build Commands
Most Python apps don't need a build step. If yours does, set it in Galaxy:
- Build Command: Custom command (e.g.,
python manage.py collectstatic --noinput) - Start Command:
gunicorn app:apporpython main.py
Galaxy runs install, then build (if set), then start.
Health Check Endpoint
Create a simple health check endpoint for Galaxy to monitor:
@app.route('/health')
def health():
return {
'status': 'ok',
'timestamp': datetime.now().isoformat()
}, 200In the Galaxy deployment form, set Health Check Path to /health.
Supported Versions
Galaxy supports Python 3.10, 3.11, 3.12, 3.13, and Python 2.7 (legacy). For best compatibility, use Python 3.12 or 3.13.
Select your Python version via the Docker Preset option during deployment or in your app's Settings page.
Need Help?
Quick Help
Live chat is fastest for urgent issues. Available directly from your Galaxy dashboard.

