Hello,
I am new to Frappe and ERPnext, and I’m seeking some insight into a my specific setup.
I own a dedicated server running Ubuntu, which I use to host multiple websites based on different CRMs/frameworks(wordpreas, Express.js, etc…).
So on this server I am already using Nginx, MySQL, node, python, docker, etc
My question is if it is possible to install a production ready ERPnext on that same server, alongside these applications (Note: the server has enough RAM and disk space)
In other words, my main concerns are:
Would it work? And if so, is it better to go the docker way?
The docker installation requires traefik. Wouldn’t traefik cause a conflict with the already running Nginx webserver?
If if turns out to be possible, how can make ERPnext be accessed via a subdomain? (I have configured the base domain to serve the company’s website). What is the proper way to configure both Nginx & ERPNext for that matter.
Thank you for taking the time to read this. Any help is appreciated, whether partial or complete.
@T33KS I dont recommand docker , use the normal method . just setup the production mode using a different port . you can install many erpnext servers along with other applications .
On same server can work, but the risks you carry is unwarranted changes to config, apt, pip packages which may not be compatible with old or new set-up (now or in future)
I would call this as experimental.
if you don’t want to go with docker, lxd is good alternative to maintain isolation.
Btw traefik can be configured to be behind nginx getting only erpnext related requests. Or alternatively traefik can be ahead forwarding all non erpnext request to your existing nginx.
we decided to use lxd - as it is already included in ubuntu/debian and does not require docker daemon to be running all the time (our setup is small with mariadb, wordpress and erp containers). Each container is its own server and so the setup / install commands for erp stay same as in a standalone server - and a lot of documentation can be found on this forum. database container is shared and its internal ip address can be specified in erpnext under db_host in site_config. you can use a front facing “gatekeeper” container like haproxy or nginx as a reverse proxy to redirect traffic to the desired container (wordpress sites or erp sites not mariadb) based on url - and learning curve is minimal as you only need to learn some rudimentary commands around managing / bashing in/out of containers. Automated backup is easy.
docker is also good - and perhaps better suited for large company installs - it does not consume as much storage (read up on application container vs os install for each container for lxd) - which is better depends on your requirements… frankly I am not a developer and find docker commands confusing. have not researched podman.
As much as I enjoy reading posts about docker I’ve found it nearly impossible to use for ERPNext deployment. It sounds interesting when the pros use it but a noob (like me) will fall into a bottomless pit if you attempt it without some level of knowledge about how to manipulate docker beyond reading ‘how to’ posts here (trust me I have tried and failed many times).
LXD seems the easiest route at the moment except you have a deep knowledge of docker in which case I’d say go for it.
Thank you for all your answers.
I can see that there are different opinions/preferences.
I am going to first try the docker way, since it won’t affect any of my local files.
My config is the following:
myurl.com is pointed at my server IP and a local installation of Nginx forwards it to the wordpress site through reverse proxy.
Now I would like my ERPnext instance to be accessible on erp.myurl,com
Do I need some specific option turned on/modified during the ERPnext setup, if the site I am linking is actually a subdomain? (while researching this I came across multi-tenancy being referred to).
Should I install Traefik or I can manage the Let’s Encrypt manually?
erpnext container has frontend service which serves site on port 8080.
traefik is configured using service labels on frontend service, those labels are useless if traefik is not installed. You can expose that service on port 8080 using ports: Once it is available on localhost 8080 you can configure /etc/nginx/conf.d/erpnext.conf or place a conf in nginx config directory that reverse proxy to localhost 8080.
I am using a container setup (docker). I followed these instructions:
But I am getting the above error.
And when I check Portainer, I can’t see any published ports.
(I sent you my Portainer credentials via PM, it would be great if you could check it when you have time)