ERPNext 13 Docker - Ubuntu 22.04 - Jan 2023

Hello, which tutorial for ERPNext 13 Docker on Ubuntu 22.04 works in Jan 2023?


Hello Jannis,

at GitHub: frappe_docker/ at main · frappe/frappe_docker · GitHub

I moved the gist to setup erpnext on docker swarm here custom_frappe_docker/ at main · castlecraft/custom_frappe_docker · GitHub

Hello, why now docker swarm?

I have never read about docker swarm.

Self host your cluster, no vendor lock-in.

No docker? k3s uses containerd. It has vast search results to get you running.

Any idea about best way to move an ERPNEXT v13 stack from one production Docker Swarm to another server in another swarm?

I used your latest documentation for Docker Swarm till the CRON step.

Now I have 3 production sites that I want to move them to a new VPS (higher specs) and don’t want to loose the data.

I have very limited HDD space on the old server so taking local backup of the DB is almost impossible.


Attach and mount a volume to backup data. You can then unmount and attach the same volume on new server to restore.

Shall I do this after performing the final step in custom_containers/ at main · castlecraft/custom_containers · GitHub i.e. I create the erpnext stack, configure-erpnext, create-site , and erpnext-backup ?

Is it fine to drop the “mariadb-slave” database to free space ? this will free almost half the hard disk.

I can’t create a volume on the old server (no free space to store the MariaDB database) , is it possible to run scp and pull the data from the volumes below to overwrite its corresponding volumes on the new server?


I also noticed in your gist that you used only one environment variable “VERSION” while we used to have two variables; “ERPNEXT_VERSION” and “FRAPPE_VERSION”

Hello tareks,

When did you last try to set it up using these instructions.

Because I’ve been trying for a week now, and I get an error after running the new-site command. The same error as in this issue

Any ideas?



I’m search a instruction such as this Fast steps to install Frappe/ERPNext v13/v14 on Clean Ubuntu 22.04 Production/Develop

Tested and working in Jan 2023.

Very good quality, @PyJumper ++ .


mariadb slave can be removed if it’s not used.
you can try whatever works for you

there was a refactor to images, now we use only 1 ERPNext image, so only one VERSION.

1 Like

I got the same error when going step by step (without changing anything) into custom_containers/ at main · castlecraft/custom_containers · GitHub by @revant_one

Here is the error:
2023-01-29 13:38:49 24 [Warning] Access denied for user ‘root’@‘localhost’ (using password: YES)

I have tried all the possible solutions as in : Database Error on Creating First Site during Docker Compose Installation · Issue #1056 · frappe/frappe_docker · GitHub

Any ideas?

I can’t figure it out. I’m still facing the same issue, but I followed the single server instructions and not the swarm one.
I tried it with 14.13 and 14.14.

Edit: Does your password contain any special week l character. Check this reply from @revant_one on GitHub:

It Works!

I rebuilt the server from scratch, followed step by step the instructions as per custom_containers/ at main · castlecraft/custom_containers · GitHub by @revant_one

The only change I’ve made is to disable the Access control (made the stack “public”) for the stacks:
mariadb, erpnext, configure-erpnext and the add-site-example-com stacks.

Also, it is important to comment the --install-app=payments in the create-site.yml before deploying the stack (if you are not installing Version 14).

I used:
VERSION = v13.43.1 which caused in the installed apps (Help/About):
ERPNext: v13.43.1 (HEAD)
Frappe Framework: v13.47.0 (HEAD)

OS: ubuntu 22.04 (64)
Docker Compose version v2.15.1
Portainer CE version 2.16.2
traefik version 2.9.6

I was able to solve it as well.

I had to delete the following directory on my server:


which is used by the mariadb compose file used in the single server instructions.

For more info check the issue I closed on GitHub

I migrated three sites by making S3 Backup then downloading the database, private files, public files and site-config to the sites folder then run the bench restore command.

I’ve also copied the encryption key from the old site-config file(s) to the new site(s).

I have now these problems/inquiries:

1- Lets Encrypt certificate of the three sites are all “not verified by 3rd party” in this setup it should be “Let’s Encrypt” , they were not added to Traefik acme.json . Any idea on how to regenerate the certificates? Are there any files that has to be copied but were not included in the S3 backup files ?
acme.json has only certificates for Traefik and Portainer.

2- Why there is no “assets” volume in the erpnext stack ? I see they are created under random names.

3- All PDFs (like quotations, POs, etc…) print in one “left” column despite checking the “Print Style” to 2 columns. Also the logo is not showing.

4- in @revant_one script we used only one “VERSION” environment variable due to the refactor.
I also noticed that this variable “VERSION” is used in “erpnext” stack, “site-config” stack, and create-site stack. What is I want to upgrade the ERPNEXT Version say from v13.41.1 to v13.44.0; shall I change the version in the three stacks and redeploy ? or it is enough to re-deploy the “erpnext” stack?
If we’ll do so, then after re-deploy, the old images will always reside on the system as they are still connected to the “run once” containers like “site-config” and “create-site”.


  1. no clue, works for me on all sites, check dns
  2. no need for assets. every image will have its own assets copy mounted in temp volumes. No need for asset population container
  3. No idea, I’ve not faced it yet for custom images.
  4. next time you run site config or create site change the version. It is not required to run those containers on every update?

I’ve made a reset to the server (OS reinstalled) and followed @revant_one script on:

  1. Let’s Encrypt fixed.
    I changed the DNS of the sites that will be migrated from the IP of the old server to the IP of the new server.
    Created the sites and went through the setup wizard for each site.
    Made a Copy/Paste of the old encryption keys from the old to the corresponding new sit-config
    Made a bench restore command.

2- Comment of asset is noted.

3- I still have a problem that all PDFs non-table sections are printed in one column to the right. I’m digging to find a solution for this.

4- In case I want to upgrade the “erpnext” stack, I will just edit the stack, change the “VERSION” then redeploy the stack ?

Hi Revant

Regarding No. 3 , I’m facing the same problem as described in CSS not working on Generate PDF although I’m using VERSION 13.41.1 (the problem appeared in v11)

Any idea why this errors occurred ? Is the a custom image?

Printing through the PC “save to PDF” option is looking fine, only the “PDF” button is missing the css.


Solved using:

On the Backend Container:
bench --site set-config hostname “

as per Pdf's not looking nice as html documents (assume CSS missing) - #4 by vrms

The question is why I had to add this if it is supposed to be fixed after v11?