How to Install Baïkal on Manjaro

Baïkal is a lightweight and open-source CalDAV and CardDAV server that allows you to sync your calendar and contacts across multiple devices. In this tutorial, we will go through the steps to install Baïkal on Manjaro.

Prerequisites

Before we start, make sure that you have the following:

Installation Steps

Step 1: Install Apache and PHP

Baïkal requires an Apache web server and PHP to run. To install Apache and PHP, run the following command:

sudo pacman -S apache php php-apache

Once the installation is complete, start the Apache web server and ensure that it's running:

sudo systemctl start httpd.service
sudo systemctl enable httpd.service
sudo systemctl status httpd.service

Step 2: Install Baïkal

Now we can proceed to install Baïkal. First, download the latest version of Baïkal from their website:

curl -sSL https://github.com/sabre-io/Baikal/releases/download/0.8.0/baikal-0.8.0.zip -o baikal.zip

Unzip the downloaded file and move it to the directory where Apache serves files:

unzip baikal.zip -d /srv/http/

Set the owner and permissions on the files:

sudo chown -R http:http /srv/http/baikal/
sudo chmod -R 755 /srv/http/baikal/

Step 3: Configure Baïkal

Baïkal requires some configuration to work correctly. To do so, we will be editing a configuration file located at /srv/http/baikal/Specific/baikal/config.php. Use a text editor of your choice to edit the file, replacing the following placeholders with the actual values:

<?php
  $pdo = new PDO(
    'mysql:host=localhost;dbname=dbname',
    'dbuser',
    'dbpass'
  );
  define('BAIKAL_CONFIGURED', true);
  define('ENABLE_PREEMPTIVE_AUTH', false);
  define('DEV_NO_CACHE', true);
  define('DEBUG', false);
?>

Save and close the file.

Step 4: Set up the Database

Baïkal requires a database to store its data. Depending on the database type you specified in Step 3, you need to install the necessary database server and create a new database for Baïkal to use.

For example, if you specified MySQL, install the MySQL server:

sudo pacman -S mysql

Start the MySQL service and enable it to start at boot time:

sudo systemctl start mysqld.service
sudo systemctl enable mysqld.service

Log in to MySQL as root, create a new database, and grant privileges to the database user you specified in Step 3:

mysql -u root
CREATE DATABASE dbname;
GRANT ALL PRIVILEGES ON dbname.* TO 'dbuser'@'localhost' IDENTIFIED BY 'dbpass';
FLUSH PRIVILEGES;
EXIT;

Step 5: Finish the Configuration

Finally, we need to run the installation script to generate the necessary database tables:

cd /srv/http/baikal/Specific/db/
php db-setup-mysql.php

If everything goes well, you should see a message saying that the installation was successful.

Step 6: Accessing Baïkal Web Interface

You can now access the Baïkal web interface by opening your web browser and navigating to http://localhost/baikal/html/. You should be able to log in using the default credentials:

After logging in, you can change the password and start using Baïkal to sync your calendar and contacts across devices.

Conclusion

In this tutorial, we learned how to install Baïkal on Manjaro. We hope this tutorial has been helpful, and you're now ready to start using Baïkal. If you have any issues or questions, feel free to leave a comment.

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!