This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm -f /swapfile | |
# create swap file - adjust swapfile size to droplet memory | |
fallocate -l 1024M /swapfile | |
# make it swap | |
mkswap /swapfile | |
# chmod it accordingly | |
chmod 600 /swapfile | |
# enable swap | |
swapon /swapfile | |
# add it to fstab to be mounted on reboot |