There are a lot of yunohost instance without swapfile, it could be dangerous during installation/remove operation (or simply could create service instability).
Swapfile of 1GB can be added really simply:
dd if=/dev/zero of=/swapfile bs=1024 count=1048576 mkswap /swapfile swapon /swapfile echo "/swapfile swap swap defaults 0 0" >> /etc/fstab
On hard drive disk no doubt you should add it, but on SDcard (like in the internetcube) the swapfile could accelerates the end of life of your SDcard.
Any idea how we should properly manage this in YunoHost ?
I suggest to add it automatically (during the yunohost upgrade) if it’s an hard drive or if the device has less than 1GB RAM. What’s your point of view.
Note: if your / is on a sdcard the better will be to put your swap file on a small usb disk (1GB)