Mastering Frappe Framework – Part 8: Deploying Frappe Apps to Production

Why Deployment Matters

Local development is great for testing, but if you want real users, your Frappe app must run on a secure, stable, production-ready server.

In this part, we’ll set up:

  • Ubuntu Server
  • Nginx (reverse proxy)
  • Supervisor (process manager)
  • SSL (HTTPS)
  • Backup & restore

1. Server Requirements

For a smooth production setup, use:

  • OS: Ubuntu 22.04 LTS (recommended)
  • RAM: 4 GB minimum (8 GB for ERPNext)
  • CPU: 2+ cores
  • Disk: SSD preferred (50 GB+)
  • Access: Root or sudo user

2. Install Basic Packages

sudo apt update && sudo apt upgrade -y
sudo apt install git python3-dev python3-pip python3-venv \
redis-server mariadb-server xvfb libfontconfig wkhtmltopdf \
nginx curl supervisor -y



3. Configure MariaDB for Frappe

sudo mysql_secure_installation

sudo mysql -u root -p


Inside MySQL:

SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_file_format=Barracuda;
SET GLOBAL innodb_large_prefix=1;



4. Install Bench (Production Mode)

sudo pip3 install frappe-bench
bench init --frappe-branch version-15 mysite
cd mysite
bench new-site yoursite.com



5. Deploy Your App

bench get-app myapp https://github.com/yourrepo/myapp.git
bench --site yoursite.com install-app myapp

Best Practices

  • Security: Disable root login, enable UFW firewall.
  • Performance: Use Redis caching & enable gzip compression in Nginx.
  • Monitoring: Use tools like htop, pm2, or server dashboards.
  • Automation: Schedule backups via cron.

Key Learnings from Part 8

  • Preparing Ubuntu for Frappe
  • Setting up MariaDB, Nginx, and Supervisor
  • Installing your Frappe app in production
  • Enabling SSL for secure access
  • Creating and restoring backups

Next in Part 9

We’ll cover Building a SaaS Product with Frappe:

Scaling strategies

Multi-tenancy

Subscription & payment integration

Version updates

Leave a Reply