Posts created by “Simone”

Managing swap

Written by Simone

Swap File

  1. To create a 2GB swap file we can use "dd" command like this:

# dd if=/dev/zero of=/mnt/swapfile bs=1024 count=2097152

bs=1024 means read and write up to 1024 bytes at a time and count it's the size of the file (1024 x 2048)MB

  1. Then set the appropriate permissions on the file; make it readable only by root user:

# chmod 600 /mnt/swapfile

  1. Now prepare the file for swap with the mkswap command:

# mkswap /mnt/swapfile

  1. Next, enable the swap file

# swapon /mnt/swapfile

  1. Afterwards, enable the swap file to be mounted at boot. Edit the /etc/fstab file and add the following new line in it:

/mnt/swapfile swap swap defaults 0 0

You can also disable the swapfile at runtime, any time you want; just make sure it doesn't exceed your available RAM:

# swapoff /mnt/swapfile

Last but not least, this is how to check your swap usage by process:

$ for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n -r | less

Prosody invite page's example with custom apps

Written by Simone

Picture shows 4 XMPP apps with their logos and brief description.

Different apps manually registered in "mod_register_apps.lua" ranging from web apps like Movim, to F-Droid apps like monocles chat and Cheogram.

See also F-Droid app code example

mod_register_apps.lua - f-droid app example

Written by Simone

Here's how you add an F-Droid XMPP App to "mod_register_apps.lua" so that it shows up in the Invite registration page of prosody:

        {
                name = "monocles chat";
                text = [[monocles chat is a fork of blabber.im and Conversations with some changes, to improve usability.]];
                image = "assets/logos/monocles.png";
                link = "https://f-droid.org/packages/de.monocles.chat/";
                platforms = { "Android" };
                supports_preauth_uri = true;
                download = {
                        buttons = {
                                {
                                        image = "https://woodpeckersnest.space/images/fdroid.png";
                                        url = "https://f-droid.org/packages/de.monocles.chat/";
                                };
                        };
                };
        };

Add the "monocles.png" logo to your "assets/logos/" directory and change the "fdroid.png" image link accordingly.

Choose the right host!

Written by Simone

A fire on OVH Data Center, where the smoke is depicted as "Data Cloud"

Yes, this server is running on OVH 😈

Reference: Millions of websites offline after fire at French cloud services firm

A new home

Written by Simone

Do we need it? Nope.

Do I like it? YEP!

Will be posting about my (mis)adventures while administering a VPS.. Or more than one? For the time being I've just installed this beauty, called "chyrp-lite"