Enable swap on DigitalOcean instances

Enable swap on DigitalOcean instances

Just a quick summary of DigitalOcean article on enabling swap:

fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile

And now add swapon /swapfile to your /etc/rc.local file.