Got the latest release and just installed and got Gemini to compile the steps into a shell script:
#!/bin/bash
set -e
echo "============================================================"
echo " ERPNext v16 Interactive Installer"
echo "============================================================"
echo ""
# 1. Collect critical data upfront
read -p "Enter your desired site name (e.g., dev.local): " SITE_NAME
read -s -p "Enter your MariaDB root password: " DB_ROOT_PASS
echo ""
read -s -p "Enter your desired ERPNext Administrator password: " ADMIN_PASS
echo ""
echo ""
echo "============================================================"
echo " Starting installation for $SITE_NAME..."
echo "============================================================"
# 2. System updates and core dependencies
echo ">>> Installing core tools, compilers, and dependencies..."
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl git libffi-dev libssl-dev redis-server xvfb libfontconfig1 \
mariadb-server mariadb-client pkg-config build-essential libmariadb-dev libmariadb-dev-compat
# 3. Install wkhtmltopdf safely in /tmp to avoid permission errors
echo ">>> Installing wkhtmltopdf..."
cd /tmp
sudo wget -q https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
sudo apt install -y ./wkhtmltox_0.12.6.1-2.jammy_amd64.deb
cd $HOME
# 4. Configure MariaDB encoding
echo ">>> Configuring MariaDB encoding..."
sudo bash -c 'cat <<EOF > /etc/mysql/mariadb.conf.d/50-frappe.cnf
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
EOF'
sudo systemctl restart mariadb
# 5. Secure MariaDB (Fails safely if already secured)
echo ">>> Securing MariaDB..."
sudo mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED BY '$DB_ROOT_PASS'; GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION; FLUSH PRIVILEGES;" || echo ">>> MariaDB is already secured. Moving on..."
# 6. Install Node 24 and Yarn
echo ">>> Installing Node 24 and Yarn..."
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt install -y nodejs
sudo npm install -g yarn
# 7. Install Python 3.14, pipx, and uv
echo ">>> Installing Python 3.14, pipx, and uv..."
sudo apt install -y python3.14 python3.14-venv python3.14-dev pipx
pipx ensurepath
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"
# 8. Install Frappe Bench
echo ">>> Installing Frappe Bench..."
pipx install frappe-bench --python python3.14
# 9. Initialize the Bench
echo ">>> Initializing the Frappe Bench..."
if [ ! -d "$HOME/frappe-bench" ]; then
bench init $HOME/frappe-bench --frappe-branch version-16 --python python3.14
fi
cd $HOME/frappe-bench
# 10. Create Site and Download App
echo ">>> Creating site $SITE_NAME..."
bench new-site $SITE_NAME --db-root-password "$DB_ROOT_PASS" --admin-password "$ADMIN_PASS"
if [ ! -d "$HOME/frappe-bench/apps/erpnext" ]; then
echo ">>> Downloading ERPNext v16..."
bench get-app --branch version-16 erpnext
fi
# 11. Start temporary Redis to prevent "Connection refused" during install
echo ">>> Starting background Redis queues for installation..."
redis-server config/redis_cache.conf &
CACHE_PID=$!
redis-server config/redis_queue.conf &
QUEUE_PID=$!
sleep 3 # Give Redis a moment to boot
# 12. Install ERPNext App
echo ">>> Installing ERPNext onto $SITE_NAME..."
bench --site $SITE_NAME install-app erpnext
bench --site $SITE_NAME enable-scheduler
# 13. Stop temporary Redis
echo ">>> Shutting down temporary queues..."
kill $CACHE_PID $QUEUE_PID
# 14. Map domain
echo ">>> Mapping $SITE_NAME to hosts file..."
sudo sed -i "1s/^/127.0.0.1\t$SITE_NAME\n/" /etc/hosts
echo "============================================================"
echo " SUCCESS! Your ERPNext v16 environment is ready."
echo "============================================================"
echo " To start developing:"
echo " 1. cd ~/frappe-bench"
echo " 2. bench start"
echo " 3. Open http://$SITE_NAME:8000 in your browser"