PythonAnywhere’s free tier is a good fit for Quill: you get a persistent server, HTTPS out of the box, and a simple WSGI-based deployment model. The one constraint is that the free tier has no Node.js, so you can’t build the React frontend on the server. This guide handles that by building locally and committing the build to the repo.
quill repo cloned and working on your machineVite is configured to write the build output directly into backend/dist/, where Flask expects to find it.
cd frontend
npm install
npm run build
Add the build to your commit:
git add backend/dist
git commit -m "Build frontend"
git push
Do this every time you change frontend code before deploying.
Log in to PythonAnywhere and open a Bash console from the Dashboard.
Clone your repo:
git clone https://github.com/yourusername/quill.git
Create a virtual environment and install dependencies:
cd quill/backend
python3 -m venv venv
source venv/bin/activate
pip install flask flask-cors werkzeug python-dotenv
In the backend/ directory, create a .env file. This file is gitignored — it never leaves the server.
nano .env
Add:
SECRET_KEY=pick-a-long-random-string-here
ALLOWED_ORIGINS=https://yourusername.pythonanywhere.com
Replace yourusername with your actual PythonAnywhere username. The SECRET_KEY can be anything long and random — it signs your session cookies, so keep it private.
In the PythonAnywhere Dashboard, go to Web and click Add a new web app. Choose:
Once created, click the link to edit the WSGI configuration file. Replace everything in it with:
import sys
import os
project_home = '/home/yourusername/quill/backend'
if project_home not in sys.path:
sys.path.insert(0, project_home)
# Load .env
from dotenv import load_dotenv
load_dotenv(os.path.join(project_home, '.env'))
from app import app as application
Replace yourusername with your PythonAnywhere username.
Still in the Web tab, find the Virtualenv section and enter the path to your virtual environment:
/home/yourusername/quill/backend/venv
Click Reload at the top of the Web tab. Visit https://yourusername.pythonanywhere.com — you should see Quill’s splash screen.
If something is broken, click on the Error log link in the Web tab. The most common issues:
quill/backend is correctbackend/dist/ folder is missing; run the build step and push againWhen you make backend changes:
# On PythonAnywhere, in a Bash console:
cd ~/quill
git pull
# Then hit Reload in the Web tab
When you make frontend changes:
# Locally:
cd frontend
npm run build
git add backend/dist
git commit -m "Build frontend"
git push
# On PythonAnywhere:
git pull
# Hit Reload in the Web tab
.pythonanywhere.com subdomain. No certificate setup required.quill.db lives in backend/ on the server and is not committed to git. Back it up occasionally if your data matters — you can download it from the PythonAnywhere Files tab.