Skip to content

Deploy a Flask app on OrbixPanel

Flask deploys as a Python server app, served with gunicorn behind a reverse proxy.

The convention that matters: app in your entry file

OrbixPanel detects your entry file (commonly app.py or main.py) and starts:

Terminal window
gunicorn <entry>:app --bind 0.0.0.0:$PORT

So your WSGI application object must be named app in that file:

app.py
from flask import Flask
app = Flask(__name__) # ← must be called `app`
@app.route("/")
def home():
return "Hello from OrbixPanel"

If you use the application-factory pattern, expose a module-level app:

app = create_app()

Prepare your repo

  • requirements.txt with flask (and gunicorn — auto-added if missing).
  • Read config from the environment (os.environ), not hard-coded.
  • Don’t rely on Flask’s dev server (flask run) in production — gunicorn handles it.

Deploy

Apps → Deploy from Git → repo + branch → Deploy → add domain + SSL. See how deploys work.

Database & secrets

Create a database in the panel, connect on localhost, and keep credentials in environment variables.

Troubleshooting

  • Failed to find application object 'app' → your Flask instance isn’t named app, or isn’t at module level in the detected entry file.
  • Won’t go live → something other than gunicorn is binding the wrong port; let gunicorn use $PORT as shown.

Running OrbixPanel? Flask deploys from Git with gunicorn configured for you. OrbixPanel.com → — the free, self-hosted, AI-powered hosting control panel.