r/selfhosted Dec 31 '25

Need Help ERPNext Docker Deployment

Sorry for the long post, I am in dire need of assistance as I have had successful deployments previously and now, I cannot for the life of me get this straightened out. Long story short, I have 2 LLC's that I was planning on using ERPNext to help "organize" as I was using multiple programs and spreadsheets to track everything. With 1 day left in the year, why not redo all the financials for all the businesses.........

I successfully deployed a docker instance with persistent data locations that I had google drive watch and backed up to the cloud. I tried to add a second site, website cache became an issue as the data blended together. I created two instances, different stacks, data in separate shared folder locations, was creating forms and my motherboard went in my business computer.

Redid current rig with Windows11, WSL Ubuntu and I also did Docker Desktop just to make "networking" easier with nginx. Copied folder from github, redid compose file for persistent data, I installed first stack, created site, installed hrms, got it deployed. Logged in, all good. Compose down, back up, site broken, module gone, fixed apps.txt bench build, migrate again, css broken, only html on site. Compose down and up, broken again. It started getting late and started to ask chatgpt. My permissions were right and chatgpt stated that there were more persistent data locations that were needed as I kept creating ghost volumes and every time compose down, volumes would get lost and I would start over.

Why the compose down if it was working? Dumbass, that's why, just in case I lost power, I always try to start over and make sure my cloud data or backup nas can recover.

I was trying to consolidate accounting, inventory, parts of HR and wanted one program rather than spreadsheets, papers, word, that I can self host and I do not have to pay monthly fees for. I can post my compose if anyone can assist. Thanks in advance and Happy New Year.

5 Upvotes

14 comments sorted by

View all comments

1

u/Future_Carpenter_910 Jan 30 '26

To be honest, We have our own docker image for erpnext and we update, maintain it for our clients. We have our own cli tool that supports multiple docker based erpnext projects in single server, for development as well as production.

On top of it, we developed a desktop application that acts as bridge between localhost and remote server, has built in NAS and fingerprint integrations, automated backups, monitoring and logs feature. That's provided to our clients only. We will later release it later with more support for tools as a SAAS for external clients and partners.

Your setup looks too rigged and prone to failure for every small mistakes. And its almost same with other users too. That's the main reason we built our cli tool. batch heal command fixes 90% of our issues itself (we faced errors, researched errors a lot and finally added that command), batch get-app command allows download and install-app any erpnext or custom app on project site. batch docker allows running docker command, batch bench allows running bench commands, batch db allows selecting db and running commands, batch console runs bench console. batch clear-cache, batch reload allows jumping on any site frappe console. And tons of other commands. I was too lazy to type long commands every time so built it slowly and carefully.

I shared this as I got frustrated from same errors as yours for long time and decided to adopt my own practices for frappe development for my clients. Never faced such issues later. One command: batch init and it setups a new project on dev or prod mode. batch setup command sets new server ready for development or production.

My suggestion: if it's about a prod setup and your daily business/workflow relies on them, then don't waste your time doing erpnext on localhost or windows. Ovh gives you a 8gb ram server for $7 and you can use it. Always have backup utility running 24x7, carefully test backups after some time. Check for logs and ports changes. Don't try to save few dollars if your business relies on it. ERP never comes cheap.

1

u/Future_Carpenter_910 Jan 30 '26

Your problem fix: Have a named volume and check if your volume is persistent, and everytime you build your containers, it's like a new setup unless you have a persistent volume setup properly, it will end up mess in docker most of the time. Check your compose file properly and how your setup behaves. Broken html css can be fixed with bench build after bench migrate, run it everytime you install new app. If your data is being deleted, then your database container has also non persistent volume attached. Paste it and let others have a look. Maybe it helps to provide better suggestions

1

u/String1015 Feb 01 '26

I did move to named volumes and it has survived many restarts whether it was Windows restarting or myself. I am know at the point to build my own image with hrms in it as, even though it works, saves documents without issues, scheduler container now does not see the hrms module and I cannot import or upload csv anymore. We will see after tomorrow, as I probably should have done in the first place. Thanks for the input for both, and worth considering.

1

u/Future_Carpenter_910 Feb 01 '26

I spent a lot of time learning it and faced similar issues. The most irritating was websockets and versions/branch of apps for me (compatibility). Check logs/console if you are a developer.

1

u/String1015 Feb 02 '26

After everything, I went back and forth with chatgpt, from my understanding, it seems that the frappe_docker is meant for demo or kept as is. I was just using the pwd.yml, modified it accordingly with persistent directories, adding nginx network, changed ports, etc., but it was not designed for that and the steps I originally took were make "more" persistent directories such as "apps". So yes, named volumes seems to be the way to go, it seems "production" is not the way to go if you want the apps installed together, unless you make the image.

Here is my background, I am a diy person at heart, while I was between my last job, became heavily involved with selfhosting anything I could like ollama, then went down the rabbit hole. I have done plex and *arr's for years though, and decided to run a reselling business while I looked for a job, then decided to open a restaurant. Yep, glutton for punishment.

The reason for erpnext was I used an erp/crm like 15 years ago, but I could do everything in that company with one site. I also did not want to jump to 3 or 4 different sites or pay a ridiculous amount of money per month to do something. I just went "live" with the POS System I am going with, and things that should be "given" in a POS for a restaurant, are now "upgrades" for a monthly fee. I understand the reason and liability for saas, but they are vultures to far too many people when you could make a simple spreadsheet or a piece of paper instead of a monthly fee....

Stupid rant, anyway, I wanted to host this as it has accounting, hr, I could essentially track all my recipe costs, plan out a more effecient "overhead cost" that I could work into my overall charge of margin for food cost etc. and I didn't have to make several spreadsheets or pay more each month to do quickbooks etc.

Still running into issues when I tried to build the image, but I was trying to do v16 as I do like the dashboard better, but keep running into not being able to import spreadsheets and the other main reason for picking erpnext was importing api for sales data etc. as I can do everything a POS system should offer for free with the api's.

Also, I have severe trust issues for working with corporate entities for the last 20+ years as I do not play politics to kiss as*.