Tips for servers under 1G of RAM

This is my setup (tips) for 1G of RAM servers. :globe_with_meridians:

  1. Install clean Ubuntu 20.04 LTS and do apt-get update, apt -get upgrade
  2. Set FQDN hostname with hostnamectl, and timezone with timedatectl
  3. Make sure that you have 1G of SWAP memory via free -h, if not google how to create it
  4. Download HestiaCP installer script
  5. Install it without ClamAV, and with MultiPHP:
    sudo bash --apache yes --nginx yes --phpfpm yes --multiphp yes --vsftpd yes --proftpd no --named yes --mysql yes --postgresql no --exim yes --dovecot yes --clamav no --spamassassin yes --iptables yes --fail2ban yes --quota no --api yes --force no --interactive yes --port 8083 --hostname --email [email protected] --password password123 --lang en
  6. Reboot
  7. Login into ssh and do: v-add-letsencrypt-host (this will add SSL to your hostname)
  8. Install Ubuntu Livepatch for rebootless kernel update - view how
  9. Login into panel, add domain, dns child-ns for ns1 ns2, tweak php upload limits etc.

Why Ubuntu and not debian?
I suggest CSF is much better at protecting services than fali2ban but I haven’t tested the memory overheads of each, to compare.
Bigger memory optimisation can be achieved by using a small mysql my.cnf template (example: /usr/share/mysql/my-medium.cnf) and Apache tuning. Some might argue for/against the inclusion of nginx and whether better to use it without Apache. Named, is also optional if external nameservers are being used.

Obviously we have different tastes.

Taste doesn’t come into it and is not obvious at all.
Your thread doesn’t explain your choices; yours appear to be arbitrary, to me.

I was bored and wanted to write something until my movie downloads.

Ahh, that explains it! :stuck_out_tongue:
Made me look at memory consumption on my 1GB boxes though. :wink:

1 Like

With very minor tweaking and with fail2ban, bind & CSF:

vm.swappiness = 1
[email protected]:~$ free -m
total used free shared buff/cache available
Mem: 989 266 95 19 627 542
Swap: 1019 0 1019

I’ve set swappiness to 30. The default is 60 on Ubuntu.

  • Don’t use the multiphp flag and hand pick the version you need.
1 Like