On this page
- What does ERPNext need before installation?
- How do you prepare the frappe_docker configuration?
- How do you start the stack and create the site?
- How do you add HTTPS with Nginx?
- How do outgoing emails work in ERPNext?
- How do you back up ERPNext?
- How do you upgrade to a newer ERPNext release?
- What are common ERPNext errors and their fixes?
- Questions
What does ERPNext need before installation?
Plan on 2 vCPU, 4 GB of memory and 40 GB of disk for a small company; the stack runs MariaDB, two Redis instances, a Python backend, a Node.js socket server, background workers and a scheduler. On a 4 GB server also add a 2 GB swap file (how to add swap).
- Docker Engine and the Compose plugin from the official Docker repository. Follow Docker Engine, or start from the Docker app image where it is already installed.
- A DNS name such as
erp.example.netwith records for198.51.100.24and2001:db8:4f2a::24. - Git:
sudo apt install -y git.
Check the tools before you continue:
docker --version
docker compose version
git --versionHow do you prepare the frappe_docker configuration?
The repository ships a base compose file plus overrides; you combine them into one resolved file kept outside the repository. Start by cloning and writing an environment file:
git clone https://github.com/frappe/frappe_docker ~/frappe_docker
cd ~/frappe_docker
mkdir -p ~/gitops
cp example.env ~/gitops/erpnext.env
nano ~/gitops/erpnext.envIn erpnext.env set these values (keep the ERPNEXT_VERSION the example file already pins, or raise it to the newest stable tag on the ERPNext releases page):
DB_PASSWORD=a-long-random-database-password
HTTP_PUBLISH_PORT=127.0.0.1:8080
FRAPPE_SITE_NAME_HEADER=erp.example.netBinding to 127.0.0.1 keeps the stack invisible from outside; Nginx is the only public entrance. Now resolve the full compose file:
docker compose --env-file ~/gitops/erpnext.env \
-f compose.yaml \
-f overrides/compose.mariadb.yaml \
-f overrides/compose.redis.yaml \
-f overrides/compose.noproxy.yaml \
config > ~/gitops/erpnext.yamlHow do you start the stack and create the site?
Start the containers under one project name, wait for MariaDB, then create the site and install ERPNext into it in one bench command.
docker compose --project-name erpnext -f ~/gitops/erpnext.yaml up -d
docker compose --project-name erpnext ps
docker compose --project-name erpnext exec backend \
bench new-site erp.example.net \
--mariadb-user-host-login-scope=% \
--db-root-password a-long-random-database-password \
--admin-password another-strong-password \
--install-app erpnext
docker compose --project-name erpnext exec backend bench --site erp.example.net list-appsThe list-apps output shows the installed Frappe and ERPNext versions. Site creation takes several minutes on a small server; let it finish. A quick local test proves the frontend answers:
curl -sI -H "Host: erp.example.net" http://127.0.0.1:8080/login | head -n 1How do you add HTTPS with Nginx?
Put Nginx on the host in front of port 8080, pass the Host header (the site is selected by name) and allow WebSocket upgrades for realtime updates.
sudo apt install -y nginx certbot python3-certbot-nginxserver {
listen 80;
listen [::]:80;
server_name erp.example.net;
client_max_body_size 50M;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 120s;
}
}Save it as /etc/nginx/sites-available/erpnext, enable it and request a certificate:
sudo ln -s /etc/nginx/sites-available/erpnext /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
sudo certbot --nginx -d erp.example.net
sudo ufw allow OpenSSH && sudo ufw allow 'Nginx Full' && sudo ufw enableSign in at https://erp.example.net as Administrator with the admin password, and the setup wizard asks for company, currency, fiscal year and chart of accounts. If you would rather avoid Nginx, Caddy needs only reverse_proxy 127.0.0.1:8080 in a site block (see Caddy HTTPS).
How do outgoing emails work in ERPNext?
Create an Email Account with "Enable Outgoing" ticked and the SMTP details of an authenticated relay: server, port 587, STARTTLS, username and password. Mark it as the default outgoing account so quotations, invoices and password resets use it. Direct delivery on port 25 may be blocked on new servers; ask support with a ticket before you build around it. The relay route is described in SMTP relay for apps, together with SPF and DKIM. The email queue (search "Email Queue") shows each message and any error.
How do you back up ERPNext?
Bench creates a consistent dump of the database plus public and private files; copy the result off the server.
docker compose --project-name erpnext exec backend \
bench --site erp.example.net backup --with-files
docker compose --project-name erpnext exec backend \
ls -lh sites/erp.example.net/private/backupsThe backups live inside the sites volume; docker compose cp or a mounted host path moves them out. A scheduled job with restic, as shown in daily backups, keeps an offsite history. The scheduler container also runs ERPNext's own scheduled backups if you enable them in System Settings.
How do you upgrade to a newer ERPNext release?
Change ERPNEXT_VERSION in ~/gitops/erpnext.env, regenerate the resolved compose file, pull, recreate and migrate.
cd ~/frappe_docker && git pull
docker compose --env-file ~/gitops/erpnext.env -f compose.yaml -f overrides/compose.mariadb.yaml -f overrides/compose.redis.yaml -f overrides/compose.noproxy.yaml config > ~/gitops/erpnext.yaml
docker compose --project-name erpnext -f ~/gitops/erpnext.yaml pull
docker compose --project-name erpnext -f ~/gitops/erpnext.yaml up -d
docker compose --project-name erpnext exec backend bench --site erp.example.net migrateTake a backup first. Minor versions inside one major line are usually smooth; a major jump (for example v15 to v16) deserves a trial on a copy of the site.
What are common ERPNext errors and their fixes?
- 404 or "site does not exist": the Host header does not match the site name. Keep
proxy_set_header Host $host;and checkFRAPPE_SITE_NAME_HEADER. - Realtime updates missing: the WebSocket upgrade headers are not passed; compare with the Nginx block above.
- Background jobs stuck: inspect the workers with
docker compose --project-name erpnext logs queue-long --tail 50. - Containers restarting from memory pressure: check
docker statsand the usage graphs, then move to a larger plan.
Plans that fit this guide
Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.
Questions about ERPNext with frappe_docker
Is there a quicker way to try ERPNext?
Yes. The repository includes pwd.yml, a single-file demo you start with docker compose -f pwd.yml up -d. It uses fixed default passwords, so keep it to short local tests.
Can I install more Frappe apps such as HRMS?
Yes, but apps must be part of the image. frappe_docker documents building a custom image with an apps.json list; you then point the compose file at that image.
Does ERPNext need a separate database server?
No. The MariaDB override runs MariaDB as a container in the same stack, with its data in a named volume.
Which login is created first?
The user Administrator with the password you passed to --admin-password. Create named users for staff after the setup wizard.
Can several companies share one site?
Yes. ERPNext supports multiple companies inside one site, each with its own chart of accounts. Separate sites are only needed for fully separate data.
More in Self-hosted apps
- Nextcloud on Nginx
- ownCloud Infinite Scale
- Seafile file sync
- Vaultwarden password vault
- Passbolt team password manager
- Gitea Git hosting
- Forgejo Git server
- GitLab Community Edition
- Gogs Git service
- Wiki.js
- BookStack documentation
- Outline knowledge base
- Paperless-ngx documents
- n8n workflow automation
- Activepieces automation
- Plausible Analytics (Community Edition)
- Umami analytics
- Mattermost team chat
- Matrix Synapse with Element
- Jitsi Meet video calls
- ONLYOFFICE Docs with Nextcloud
- HashiCorp Vault secrets server
- OpenBao secrets management
- Infisical secrets manager
- Authelia SSO and forward auth
- Zitadel identity platform
- VS Code in the browser (code-server)
- Joplin Server for notes sync
- Firefly III personal finance
- Snipe-IT asset tracking
- Odoo ERP on Ubuntu or Debian
- Dolibarr ERP and CRM with Nginx
- Penpot design tool with Docker
- Planka kanban boards
- Leantime project management
- Wekan boards with Docker
- Cal.com scheduling
- Chatwoot support inbox
- Mautic marketing automation
- DocuSeal document signing
- Metabase dashboards
- Appwrite backend server
- Self-hosted Supabase
- PocketBase backend
- RustDesk relay server
- Traccar GPS tracking
- Redmine project tracker
- The Lounge IRC client
- CyberChef data toolbox
- Typebot chat forms
- AFFiNE workspace
- Overleaf Community Edition
- Neko shared virtual browser
- imgproxy image resizing
- NetBox network inventory
- UVdesk help desk
- YetiForce CRM