w wokku
Get Started
~/docs
/
frameworks

# Deploy Flask

Updated · Edit on GitHub ↗

Deploy a Flask app to Wokku with Gunicorn and Postgres.

Prerequisites

1. Create the app

Apps → New App → server, name my-flask-app, box size, Create.

2. Prepare your Flask app

Include gunicorn in requirements.txt:

text
flask
gunicorn
psycopg[binary]

Add a Procfile (assuming your app object is app in app.py):

procfile
web: gunicorn app:app

If you use Flask-Migrate, add a release step:

procfile
release: flask db upgrade

3. Set environment variables

App → Config → add SECRET_KEY and any config your app reads from the env.

4. Add a database (optional)

bash
wokku addons:create postgres my-flask-app

Read os.environ["DATABASE_URL"] in your SQLAlchemy config. See
Create & Link a Database.

5. Deploy

bash
git remote add wokku git@git.wokku.cloud:my-flask-app
git push wokku main

Live at https://my-flask-app.wokku.app.

Custom domain

Custom Domains — SSL is automatic.

Troubleshooting

  • ModuleNotFoundError — make sure the dependency is in requirements.txt.
  • App object not found — match gunicorn app:app to your module and variable names.
  • DB connection refused — confirm the Postgres add-on is linked and DATABASE_URL is set.

Next steps

Was this page helpful?