20 Aug 2026

Django, Flask, and FastAPI on Mac

Python proxy on the project domain — next to PHP and Next (Pro/Teams).

Python backends on Mac often run in a separate terminal on :8000 while PHP lives in MAMP. MacFullStack Pro/Teams puts Django/Flask/FastAPI on a project domain via Python proxy — same idea as Next.js.

Free tier: one PHP project only; JS/Python proxy requires Pro.

How it works

  1. Create a project in www/ or import a repo.
  2. On the project card: Python proxy → port (8000 for runserver, 5000 for Flask, 8000 for uvicorn).
  3. Dev server command with --host 127.0.0.1.
  4. Sync vhosts — nginx proxies https://api.shop.localhost:8443 to the worker.

Detection hints Django/Flask/FastAPI from layout; venv is respected in the command.

Django: common issues

Symptom Check
Admin without CSS Static: collectstatic / WhiteNoise; proxy does not serve static
400 Bad Request ALLOWED_HOSTS includes your *.localhost
CSRF on POST CSRF_TRUSTED_ORIGINS with https://…localhost:8443

FastAPI + frontend

  • API project — Python proxy, uvicorn.
  • React/Vite/NextNode proxy on a second card or alias.
  • One Mac, two domains, less CORS pain in dev.

Alongside PHP

Bitrix/Laravel storefront + FastAPI — normal: PHP in Native, Python via proxy. See /blog/nextjs-laravel-mac.

Help: /help/node-python-proxy. Herd comparison: /blog/macfullstack-vs-herd.

MacFullStack

Try it on your Mac

Free — one PHP project and core stack. Pro unlocks Next/Django, Postgres, Share, and unlimited projects.

Download Pro Teams