Skip to content

Instantly share code, notes, and snippets.

@yoyosan
Last active March 28, 2022 11:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoyosan/a303b8d79a0234f6de97ec035eb495da to your computer and use it in GitHub Desktop.
Save yoyosan/a303b8d79a0234f6de97ec035eb495da to your computer and use it in GitHub Desktop.
Enabling swap on Scaleway or any other VPS

It seems all new scaleway servers are created without swap. For people, like me who want to use some, there is the easy way (ex. is for 8Go) :

sudo dd if=/dev/zero of=/swap bs=1024 count=8388608
sudo chmod 0600 /swap
sudo mkswap /swap
sudo swapon /swap
free -h

Add this line to your /etc/fstab file :

/swap swap swap defaults 0 0

And you’re done…

Credits to https://community.scaleway.com/t/howto-add-swap-file/3239

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment