Deploying ERPNext on AWS gives you a reliable, scalable production environment. This guide walks you through launching an EC2 instance, installing ERPNext, and configuring it for production use.

STEP 1 Launch an EC2 Instance

Go to the AWS Console and launch a new EC2 instance with these specs:

AMI: Ubuntu 22.04 LTS
Instance Type: t3.medium (minimum 4GB RAM)
Storage: 30GB SSD (gp3)
Security Group: Allow ports 22, 80, 443, 8000

STEP 2 Connect to Your Instance

ssh -i your-key.pem ubuntu@your-ec2-public-ip

STEP 3 Install Dependencies

sudo apt update && sudo apt upgrade -y
sudo apt install -y python3-dev python3-pip python3-setuptools python3-venv
sudo apt install -y redis-server mariadb-server mariadb-client
sudo apt install -y nginx supervisor
sudo apt install -y libffi-dev libssl-dev libmysqlclient-dev
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs
sudo npm install -g yarn
sudo apt install -y wkhtmltopdf

STEP 4 Configure MariaDB

sudo mysql_secure_installation
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf

Add under [mysqld]:

[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4
sudo systemctl restart mariadb

STEP 5 Create a Bench User

sudo adduser erpnext
sudo usermod -aG sudo erpnext
su - erpnext

STEP 6 Install Bench and ERPNext

sudo pip3 install frappe-bench
bench init --frappe-branch version-15 frappe-bench
cd frappe-bench
bench new-site yourdomain.com --admin-password YourPassword123
bench get-app erpnext --branch version-15
bench --site yourdomain.com install-app erpnext

STEP 7 Setup for Production

sudo bench setup production erpnext
bench --site yourdomain.com enable-scheduler
bench --site yourdomain.com set-config developer_mode 0

STEP 8 Setup SSL with Let’s Encrypt

sudo apt install -y certbot python3-certbot-nginx
sudo certbot --nginx -d yourdomain.com

Your ERPNext production instance is now live at https://yourdomain.com with SSL encryption.

Share this article

Comments

Join the discussion. Got a question, found an issue, or want to share your experience?

Leave a Comment

Your email stays private. We just use it for replies.

Nothing to preview yet.

Use **bold**, *italic*, `code`, ```code blocks```, [link](url), > quote, - list