Installing ERPNext 5 in a low memory VPS

I don’t like to update between major versions, and now ERPNext 5 is stable, after the merge of v5 I make some test with the install script and thanks to @pdvyas there were only ans issue with low RAM at the instalation moment.

I will write here how to install ERPNext in a 512 MB of RAM VPS hosted at digital ocean DigitalOcean | The Cloud for Builders

I am working as root, yes I know, you should not work as root.

Step 1: Create a virtual 4GB SWAP file

fallocate -l 4G /swapfile

chmod 600 /swapfile

mkswap /swapfile

swapon /swapfile

Step 2: Check than the virtual SWAP is working:

free
total used free shared buff/cache available
Mem: 501896 47956 112336 4320 341604 362192
Swap: 4194300 0 4194300

Step 3: Make permanent the SWAP file

Edit fstab

nano /etc/fstab

And add this line:

/swapfile swap swap sw 0 0

Step 4: Reboor your server and check than your swap file is working:

free
total used free shared buff/cache available
Mem: 501896 47104 235516 4308 219276 372148
Swap: 4194300 0 4194300

Step 5: Install ERPNext:

You must be familiar with this part

wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh

bash setup_frappe.sh --setup-production --verbose

Remember to save the passwords

Step 6: Open your port 80 in the firewall

yum install firewalld -y
systemctl enable firewalld
systemctl start firewalld
firewall-cmd --add-port=80/tcp
firewall-cmd --add-port=80/tcp --permanent

Step 7: Go to your server ip and enjoy

Step 8: Be a good person:

Make a donation o Frappe team for their awesome ERPNext

Clic on William Digital Ocean Referral link

TODO:
1- Secure your server, keep your server up to date, block ssh logging for root user, change the ssh port.

2- Configure backups in your ERPNext instance: Frappe Cloud

3- Setup a subdomain for your ERPNext instance: DNS How-Tos :: DigitalOcean Documentation

It will good to take a look at:

Please note:
Digital Ocean 512 MB VPS come with 20 GB of this, the system itself use some of this space and if you use 4GB of drive to swap you will have a few more than 10GB of drive, this could be enoutgh for a small company

Hi I dont think it may be possible. i was in a 1GB ram and it works very slowly. After upgrading to 2 GB it worked fine!

You will have .5 GB of RAM and 4 GB of SWAP than make a total of 4.5 GB available for the system, for me it is working smooth, of course this is for people like us than will not have more than 3 users working in the system at the same time, also will work fine for test the system and will be great to make a demo, if would have a higth load of work you must not supose than a minimal VPS will work.

I think there is many people than will find usefull this, a really small company or a a freelance will have suficent will this minimal setup :smile:

So does install-scripts support 32bit now?

Tks

hi
@williamjmorenor how did you manage to stop the conflict between mysql and mariadb
please help

Operative System? Versión? a clean install of many operative system will not have a mysql instalation, it is better to install in a clean install

hi thanks for your reply
OS: CentOS 6 + cPanel
Hosting site : godaddy

thanks again

@williamjmorenor, I want to setup latest erpnext v5 on digital ocean ubuntu 64bit on small 1GB RAM and 1 core processor.

Based on your experience, would it be enough for max.5 concurrent users?

Thnaks for advice.

@Jonathan_Fanny_Lie Keep it with 2 or 3 GB or virtual SWAP and it could be nice,

Do you mean 1GB RAM with additional 2-3 GB SWAP will be enough?

Yes it will be enough, task like make a backup or import large files from a
.csv file will require a lot of RAM,

William Moreno Reyes

1 Like

@williamjmorenor, Is it fine if we add the swap file later after install/use erpnext? Tks

@Jonathan_Fanny_Lie, You may add swap or change swap size any time. but it is observed that on low memory VPS while installing ERPNext likely chances are high that install script might terminate due to no swap and low memory issues in middle of installation process.

So, it is better to create swap and then install, if you have already managed to get ERPNext install without swap then to increase stability adding appropriate amount of swap is always a good idea.

Hi I hope you are well…we are getting difficulty installing ERPNEXT on VPS server running on Centos 6, has anybody done the installation previously
Regards

Project README in frappe/bench says support to CentOS 7