How to Install Metronome IM on Debian Latest

Metronome IM is an instant messaging server based on the Prosody XMPP server. It offers a simple and secure way to communicate with your team or friends in real-time. In this tutorial, we will show you how to install Metronome IM on Debian Latest.

Prerequisites

Step 1: Install Dependencies

Before installing Metronome IM, make sure that your system is up to date and that all dependencies are installed:

sudo apt update
sudo apt upgrade
sudo apt install build-essential lua5.2 libidn11-dev libssl-dev libexpat1-dev libevent-dev libyaml-dev liblua5.2-0 liblua5.2-dev libsqlite3-dev libpq-dev libmysqlclient-dev libcurl4-openssl-dev

Step 2: Download and Install Metronome IM

  1. Download the latest version of Metronome IM from the official website:

    wget https://downloads.metronome.im/source/metronome-4.4.tar.gz
    
  2. Unpack the archive:

    tar zxf metronome-4.4.tar.gz
    
  3. Move into the Metronome IM directory:

    cd metronome-4.4
    
  4. Compile and install Metronome IM:

    sudo make install
    
  5. Create a new Metronome IM user:

    sudo adduser --disabled-password --gecos "" metronome
    

    This user will be used to run the Metronome IM service.

  6. Set the correct ownership and permissions for the Metronome IM installation:

    sudo chown -R metronome:metronome /usr/local/share/metronome /etc/metronome
    sudo chmod 700 /usr/local/share/metronome /etc/metronome
    

Step 3: Configure Metronome IM

  1. Edit the Metronome IM configuration file:

    sudo nano /etc/metronome/metronome.cfg.lua
    
  2. Update the configuration with your own settings. Here's a sample configuration:

    daemonize = true
    pidfile = "/var/run/metronome/metronome.pid"
    log = "/var/log/metronome/metronome.log"
    modules_enabled = {
        "roster"; -- Allow users to have a roster. Recommended ;)
        "saslauth"; -- Authentication for clients and servers. Recommended ;)
        "tls"; -- Add support for secure TLS on c2s/s2s connections
        "disco"; -- Service discovery
        "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
    }
    c2s_require_encryption = false
    s2s_secure_auth = false
    s2s_require_encryption = true
    authentication = "internal_plain"
    -- Admin user created by 'make install'
    admins = { "admin@localhost" }
    component_interface = { "0.0.0.0" }
    component_ports = { 5347 }
    -- These paths should only exist if 'component_enable_https' is set to true
    https_ssl = {
      certificate = "/path/to/cert";
      key = "/path/to/key";
    }
    component_secret = "change-me"
    

    Note: Make sure to change the admin email address and the component_secret to a strong password.

  3. Save and close the configuration file.

Step 4: Start the Metronome IM Service

  1. Create a systemd service file:

    sudo nano /etc/systemd/system/metronome.service
    
  2. Add the following lines to the file:

    [Unit]
    Description=Metronome IM Server
    
    [Service]
    Type=forking
    ExecStart=/usr/local/bin/metronome
    
    [Install]
    WantedBy=multi-user.target
    
  3. Save and close the file.

  4. Reload the systemd daemon:

    sudo systemctl daemon-reload
    
  5. Start the Metronome IM service:

    sudo systemctl start metronome.service
    
  6. Check the status of the service to make sure it's running:

    sudo systemctl status metronome.service
    

    The output should show that the service is active (running).

Conclusion

In this tutorial, we showed you how to install and configure Metronome IM on Debian Latest. You can now start using the service to communicate with your team or friends in real-time.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!