Compare Skype, MS Teams, and Virola Messenger — Discover the best Skype alternative for your team Learn more

Virola self-hosted server running as a daemon on Arch Linux

This instruction is valid for other Arch-based Linux distributions (Manjaro, Parabola, ArcoLinux, etc.)

During the installation of the self-hosted Virola server on Linux, you'll have the option to register the server as a systemd service (daemon). If configured, this allows systemd to automatically start the server at boot and restart it gracefully in case of failures.

Below are the instructions you'll need to manage the registered systemd service. Even if you chose not to enable it during installation, you can still create the systemd service configuration manually at any time.

Managing the Virola systemd Service

Start, Stop, and Restart the Virola Server

Use the following systemctl commands to control the Virola server:

  • sudo systemctl start virola-server - Starts the Virola server
  • sudo systemctl stop virola-server - Stops the Virola server
  • sudo systemctl restart virola-server - Restarts the Virola server

Changing the Host or Port

To update the host or port the Virola server listens on:

  1. Open /home/virola/start-virola-server.sh in a text editor
  2. Locate the --listen parameter
  3. Modify the value using the syntax: --listen HOST:PORT
  4. Save the file
  5. Run sudo systemctl restart virola-server to apply the changes

Important: After updating, make sure to also change the Server Host and Server Port settings in your Virola client.

Moving the Database to a New Location

To relocate the Virola server database:

  1. Find the current database (default: /home/virola/storage/virola_server_database_v9.db)
  2. Stop the server: sudo systemctl stop virola-server
  3. Move the database file to the new location
  4. Open /home/virola/start-virola-server.sh in a text editor
  5. Locate the --storage-dir parameter
  6. Update the path using the syntax: --storage-dir STORAGE-DIRECTORY-PATH
  7. Save the file
  8. Start the server: sudo systemctl start virola-server

You may not have access to the /home/virola directory, but you can still view its contents using the command sudo ls /home/virola, and access files inside the directory. For example, the command sudo nano /home/virola/start-virola-server.sh opens the file start-virola-server.sh in nano text editor.

Note! If the /home/virola/start-virola-server.sh file is missing, the Virola server was likely registered as a systemd service manually. In that case, host, port and storage directory settings are defined directly in the virola-server.service file, typically located at /etc/systemd/system/virola-server.service.

Manual systemd Registration for Virola Server

  1. Create user virola with the following command:
    sudo useradd -m virola
    Make sure to keep -m parameter to create the user's home directory at /home/virola
  2. Navigate to /etc/systemd/system directory and create the file virola-server.service there. You may use nano editor for this:
    sudo nano virola-server.service
  3. Add the following to the file:
    [Unit]
    Description=Virola Server
    Wants=network.target
    After=network.target
    
    [Service]
    WorkingDirectory=/home/virola
    User=virola
    ExecStart=/usr/bin/virola-server --listen HOST:PORT --storage-dir ./storage
    Restart=on-failure
    
    [Install]
    WantedBy=multi-user.target
    
    where
    • HOST is the IP you've chosen for the Virola server
    • PORT is the port you've chosen for the Virola server
  4. Save the file
  5. Execute the following commands one by one
    sudo systemctl daemon-reload
    sudo systemctl start virola-server
    sudo systemctl enable virola-server
    
    After this, your Virola Server should be up and running, and you can try to connect to it with Virola Client app.

To check the status of virola-server systemd service, use the following command:

sudo systemctl status virola-server