
ERPNext is a full-featured business management solution that helps SMEs record all their business transactions in a single system. With ERPNext, SMEs can make informed, fact-based, timely decisions to remain ahead of the competition. It serves as the backbone of a business, adding strength, transparency, and control to your growing enterprise. ERPNext will help you: track all invoices and payments, know what quantity of which product is available in stock, identify and track your key performance indicators (KPIs), identify open customer queries, manage employee payrolls, assign tasks and follow up on them, maintain a database of all your customers, suppliers, and contacts, prepare quotations, track your budgets and spending, determine effective selling price based on the actual raw material, machinery, and effort cost, get reminders on maintenance schedules and publish your website. In this step by step guide I will show you how to install ERPNext on your Synology NAS using Docker & Portainer. Note: Before installing this container, ensure you are using SSDs for better performance, as the container may struggle to start on older HDDs.
STEP 1
Please Support My work by Making a Donation.
STEP 2
InstallĀ Portainer using my step by step guide. If you already have Portainer installed on your Synology NAS, skip this STEP. Attention: Make sure you have installed the latest Portainer version.
STEP 3
Make sure you have a synology.me Wildcard Certificate. Follow my guide to get a Wildcard Certificate. If you already have a synology.me Wildcard certificate, skip this STEP.
STEP 4
Go toĀ Control PanelĀ /Ā Login PortalĀ /Ā AdvancedĀ Tab / clickĀ Reverse Proxy. Follow the instructions in the image below.

STEP 5
Now click the āCreateā button. Follow the instructions in the image below.

STEP 6
After you click the Create button, the window below will open. Follow the instructions in the image below.
On the General area, set the Reverse Proxy Name description: type in ERPNext. After that, add the following instructions:
Source:
Protocol:Ā HTTPS
Hostname: erpnext.yourname.synology.me
Port:Ā 443
Check Enable HSTS
Destination:
Protocol:Ā HTTP
Hostname:Ā localhost
Port:Ā 8345

STEP 7
On the Reverse Proxy Rules click the Custom HeaderĀ tab. ClickĀ CreateĀ and then, from the drop-down menu, clickĀ WebSocket. After you click on WebSocket, two Header Names and two Values will be automatically added. ClickĀ Save. Follow the instructions in the image below.

STEP 8
Go to Control Panel / Network / Connectivity tab/ Check Enable HTTP/2 then click Apply. Follow the instructions in the image below.

STEP 9
Go to Control Panel / Security / Advanced tab/ Check Enable HTTP CompressionĀ then click Apply. Follow the instructions in the image below.

STEP 10
Go toĀ File StationĀ and open the docker folder. Inside the docker folder, create one new folder and name itĀ erpnext. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

STEP 11
Now create six new folders inside the erpnext folder that you have previously created at STEP 10Ā and name them db, logs, redis-cache, redis-queue, redis-socketio, sites. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

STEP 12
Download (click on the blue link below) then upload the common_site_config.jsonĀ file below in the site folder that you have previously created at STEP 10. Follow the instructions in the image below. šNote: Support my work to unlock the password. You can use this password to download any file on mariushosting forever!

STEP 13
Right click on the erpnextĀ folder that you have previously created at STEP 12 then click Properties. Follow the instructions in the image below.

STEP 14
Go to the Permission tab, then click Advanced options. From the drop-down menu, choose “Make inherited permissions explicit“. Follow the instructions in the image below.

STEP 15
Select Everyone then click the Edit tab. Follow the instructions in the image below.

STEP 16
Check all Read and Write Permissions. Click Done. Follow the instructions in the image below.

STEP 17
After you click Done on STEP 16, check “Apply to this folder, sub-folders and files“. Click Save. Follow the instructions in the image below.

STEP 18
Log into Portainer using your username and password. On the left sidebar in Portainer, click onĀ HomeĀ thenĀ Live connect. Follow the instructions in the image below.

On the left sidebar in Portainer, click on StacksĀ thenĀ + Add stack. Follow the instructions in the image below.

STEP 19
In the Name field type in erpnext. Follow the instructions in the image below.
services:
redis-queue:
image: redis
container_name: ERPNext-REDIS-QUEUE
hostname: redis-queue
mem_limit: 256m
mem_reservation: 50m
cpu_shares: 768
security_opt:
- no-new-privileges:true
read_only: true
user: 1026:100
healthcheck:
test: ["CMD-SHELL", "redis-cli ping || exit 1"]
volumes:
- /volume1/docker/erpnext/redis-queue:/data:rw
- /etc/localtime:/etc/localtime:ro
restart: on-failure:5
redis-cache:
image: redis
container_name: ERPNext-REDIS-CACHE
hostname: redis-cache
mem_limit: 256m
mem_reservation: 50m
cpu_shares: 768
security_opt:
- no-new-privileges:true
read_only: true
user: 1026:100
healthcheck:
test: ["CMD-SHELL", "redis-cli ping || exit 1"]
volumes:
- /volume1/docker/erpnext/redis-cache:/data:rw
- /etc/localtime:/etc/localtime:ro
restart: on-failure:5
redis-socketio:
image: redis
container_name: ERPNext-REDIS-SOCKETIO
hostname: redis-socketio
mem_limit: 256m
mem_reservation: 50m
cpu_shares: 768
security_opt:
- no-new-privileges:true
read_only: true
user: 1026:100
healthcheck:
test: ["CMD-SHELL", "redis-cli ping || exit 1"]
volumes:
- /volume1/docker/erpnext/redis-socketio:/data:rw
- /etc/localtime:/etc/localtime:ro
restart: on-failure:5
db:
image: mariadb:10.8-jammy
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --skip-character-set-client-handshake
container_name: ERPNext-DB
hostname: erpnext-db
mem_limit: 1g
cpu_shares: 768
security_opt:
- no-new-privileges:true
user: 1026:100
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -u root -prootpass | grep 'mysqld is alive' || exit 1"]
volumes:
- /volume1/docker/erpnext/db:/var/lib/mysql:rw
- /etc/localtime:/etc/localtime:ro
environment:
MYSQL_ROOT_PASSWORD: rootpass
restart: on-failure:5
configurator:
image: frappe/erpnext:latest
entrypoint:
- bash
- -c
command:
- >
ls -1 apps > sites/apps.txt;
bench set-config -g db_host erpnext-db;
bench set-config -gp db_port 3306;
bench set-config -g redis_cache "redis://redis-cache";
bench set-config -g redis_queue "redis://redis-queue";
bench set-config -g redis_socketio "redis://redis-socketio";
bench set-config -gp socketio_port 9000;
container_name: ERPNext-CONFIGURATOR
hostname: configurator
cpu_shares: 768
security_opt:
- no-new-privileges:true
volumes:
- /volume1/docker/erpnext/sites:/home/frappe/frappe-bench/sites:rw
- /volume1/docker/erpnext/logs:/home/frappe/frappe-bench/logs:rw
- /etc/localtime:/etc/localtime:ro
environment:
DB_HOST: erpnext-db
DB_PORT: 3306
REDIS_CACHE: redis-cache
REDIS_QUEUE: redis-queue
REDIS_SOCKETIO: redis-socketio
SOCKETIO_PORT: 9000
restart: "no"
depends_on:
redis-queue:
condition: service_healthy
redis-cache:
condition: service_healthy
redis-socketio:
condition: service_healthy
db:
condition: service_healthy
backend:
image: frappe/erpnext:latest
container_name: ERPNext-BACKEND
hostname: backend
mem_limit: 1g
cpu_shares: 768
security_opt:
- no-new-privileges:true
volumes:
- /volume1/docker/erpnext/sites:/home/frappe/frappe-bench/sites:rw
- /volume1/docker/erpnext/logs:/home/frappe/frappe-bench/logs:rw
- /etc/localtime:/etc/localtime:ro
restart: on-failure:5
depends_on:
configurator:
condition: service_completed_successfully
websocket:
image: frappe/erpnext:latest
command:
- node
- /home/frappe/frappe-bench/apps/frappe/socketio.js
container_name: ERPNext-WEBOSCKET
hostname: websocket
mem_limit: 1g
cpu_shares: 768
security_opt:
- no-new-privileges:true
volumes:
- /volume1/docker/erpnext/sites:/home/frappe/frappe-bench/sites:rw
- /volume1/docker/erpnext/logs:/home/frappe/frappe-bench/logs:rw
- /etc/localtime:/etc/localtime:ro
restart: on-failure:5
depends_on:
configurator:
condition: service_completed_successfully
create-site:
image: frappe/erpnext:latest
entrypoint:
- bash
- -c
command:
- >
wait-for-it -t 480 erpnext-db:3306;
wait-for-it -t 480 redis-cache:6379;
wait-for-it -t 480 redis-queue:6379;
wait-for-it -t 480 redis-socketio:6379;
export start=`date +%s`;
until [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".db_host // empty"` ]] && \
[[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".redis_cache // empty"` ]] && \
[[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".redis_queue // empty"` ]];
do
echo "Waiting for sites/common_site_config.json to be created";
sleep 5;
if (( `date +%s`-start > 120 )); then
echo "could not find sites/common_site_config.json with required keys";
exit 1
fi
done;
echo "sites/common_site_config.json found";
bench new-site Frappe --no-mariadb-socket --mariadb-root-password=rootpass --admin-password=admin --install-app=erpnext --set-default;
container_name: ERPNext-CREATE-SITE
hostname: create-site
security_opt:
- no-new-privileges:true
volumes:
- /volume1/docker/erpnext/sites:/home/frappe/frappe-bench/sites:rw
- /volume1/docker/erpnext/logs:/home/frappe/frappe-bench/logs:rw
- /etc/localtime:/etc/localtime:ro
restart: "no"
depends_on:
configurator:
condition: service_completed_successfully
queue-default:
image: frappe/erpnext:latest
command: bench worker --queue default
container_name: ERPNext-QUEUE-DEFAULT
hostname: queue-default
mem_limit: 1g
cpu_shares: 768
security_opt:
- no-new-privileges:true
volumes:
- /volume1/docker/erpnext/sites:/home/frappe/frappe-bench/sites:rw
- /volume1/docker/erpnext/logs:/home/frappe/frappe-bench/logs:rw
- /etc/localtime:/etc/localtime:ro
restart: on-failure:5
depends_on:
configurator:
condition: service_completed_successfully
queue-long:
image: frappe/erpnext:latest
command: bench worker --queue long
container_name: ERPNext-QUEUE-LONG
hostname: queue-long
mem_limit: 1g
cpu_shares: 768
security_opt:
- no-new-privileges:true
volumes:
- /volume1/docker/erpnext/sites:/home/frappe/frappe-bench/sites:rw
- /volume1/docker/erpnext/logs:/home/frappe/frappe-bench/logs:rw
- /etc/localtime:/etc/localtime:ro
restart: on-failure:5
depends_on:
configurator:
condition: service_completed_successfully
queue-short:
image: frappe/erpnext:latest
command: bench worker --queue short
container_name: ERPNext-QUEUE-SHORT
hostname: queue-short
mem_limit: 1g
cpu_shares: 768
security_opt:
- no-new-privileges:true
volumes:
- /volume1/docker/erpnext/sites:/home/frappe/frappe-bench/sites:rw
- /volume1/docker/erpnext/logs:/home/frappe/frappe-bench/logs:rw
- /etc/localtime:/etc/localtime:ro
restart: on-failure:5
depends_on:
configurator:
condition: service_completed_successfully
scheduler:
image: frappe/erpnext:latest
command: bench schedule
container_name: ERPNext-SCHEDULER
hostname: scheduler
mem_limit: 1g
cpu_shares: 768
security_opt:
- no-new-privileges:true
volumes:
- /volume1/docker/erpnext/sites:/home/frappe/frappe-bench/sites:rw
- /volume1/docker/erpnext/logs:/home/frappe/frappe-bench/logs:rw
- /etc/localtime:/etc/localtime:ro
restart: on-failure:5
depends_on:
configurator:
condition: service_completed_successfully
frontend:
image: frappe/erpnext:latest
command:
- nginx-entrypoint.sh
container_name: ERPNext-FRONTEND
hostname: frontend
mem_limit: 1g
cpu_shares: 768
security_opt:
- no-new-privileges:true
ports:
- 8345:8080
volumes:
- /volume1/docker/erpnext/sites:/home/frappe/frappe-bench/sites:rw
- /volume1/docker/erpnext/logs:/home/frappe/frappe-bench/logs:rw
- /etc/localtime:/etc/localtime:ro
environment:
BACKEND: backend:8000
FRAPPE_SITE_NAME_HEADER: Frappe
SOCKETIO: websocket:9000
UPSTREAM_REAL_IP_ADDRESS: 127.0.0.1
UPSTREAM_REAL_IP_HEADER: X-Forwarded-For
UPSTREAM_REAL_IP_RECURSIVE: "off"
PROXY_READ_TIMOUT: 120
CLIENT_MAX_BODY_SIZE: 50m
restart: on-failure:5
depends_on:
backend:
condition: service_started
websocket:
condition: service_started
Note: Before you paste the code above in the Web editor area below, change the value numbers forĀ userĀ with your own UID and GID values. (Follow my step by step guide on how to do this.)Ā 1026Ā is my personal UID value andĀ 100 is my personal GID value. You have to type in your own values.

STEP 20
Scroll down on the page until you see a button namedĀ Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.

STEP 21
If everything goes right, you will see the following message at the top right of your screen: āSuccess Stack successfully deployedā.

STEP 22
Please waitĀ approximately 10-15 minutes for the installation to be completed. Once the installation is completed, you will see the ERPNext-CONFIGURATOR and ERPNext-CREATE-SITE containers with the status “exited” or “exited code0” . Note: At first, you will only see the ERPNext-CONFIGURATOR container with the status exited. You need to wait too see the ERPNext-CREATE-SITE container with the exited status as well. Follow the instructions in the screenshot below. Go to the next STEP.

STEP 23
Please Support My work by Making a Donation. Almost 99,9% of the people that install something using my guidesĀ forget to support my work, or justĀ ignoreĀ STEP 1. Iāve been very honest about this aspect of my work since the beginning: I donāt run any ADS, I donāt require subscriptions, paid or otherwise, I donāt collect IPs, emails, and I donāt have any referral links from Amazon or other merchants. I also donāt have any POP-UPs or COOKIES. I have repeatedly been told over the years how much I have contributed to the community. Itās something I love doing and have been honest about my passion since the beginning. But I also Need The Community to Support me Back to be able to continue doing this work.
STEP 24
Please waitĀ approximately 1 minuteĀ for the installation to be completed or you will get a blank page if you try to connect too soon. Now open your browser and type in your HTTPS/SSL certificate like this https://erpnext.yourname.synology.me In my case it’s https://erpnext.mariushosting.synology.me If everything goes right, you will see the ERPNext Login Page. Type in the default Username and Password then click Login.Ā Follow the instructions in the image below.

STEP 25
Choose your own Language, Country, Time Zone and Currency then click Next. Follow the instructions in the image below.

STEP 26
Type in your Full Name, Email and your own Password then click Next. Follow the instructions in the image below.

STEP 27
Type in your own Company name and select the Financial year begins then click Complete Setup. Follow the instructions in the image below.

STEP 28
Wait some minutes.

STEP 29
Once you see Setup Complete, click the refresh button on your browser. Follow the instructions in the image below.

STEP 30
Your ERPNext Dashboard at a glance! At the top right of the page you can click Toggle Theme to change your theme to Dark Mode. Follow the instructions in the image below.

Enjoy ERPNext!
Take a look at the ERPNext Full Documentation.
Note: Can I run Docker on my Synology NAS?Ā See the supported models.
Note: How to Back Up Docker Containers on your Synology NAS.
Note: Find outĀ how to update the ERPNext container with the latest image.
Note: How to Free Disk Space on Your NAS if You Run Docker.
Note: How to Schedule Start & Stop For Docker Containers.
Note: How to Activate Email Notifications.
Note: How to Add Access Control Profile on Your NAS.
Note: How to Change Docker Containers Restart Policy.
Note: How to Use Docker Containers With VPN.
Note: Convert Docker Run Into Docker Compose.
Note: How to Clean Docker.
Note: How to Clean Docker Automatically.
Note: Best Practices When Using Docker and DDNS.
Note: Some Docker Containers Need WebSocket.
Note: Find out the Best NAS Models For Docker.
Note: Activate Gmail SMTP For Docker Containers.