Create Calendar Server Baikal: Setup Guide
- Average speed
- km/h
- Result
- Finish time
- 50 min
- You entered
- Distance
- 10 km
- You entered
Baikal is a free, self-hosted CalDAV and CardDAV server that lets you sync calendars and contacts across your devices without relying on a third-party cloud service. This guide walks you through creating and running your own Baikal calendar server on a Linux VPS or local machine, covering installation, configuration, and common troubleshooting.
What Is Baikal and Why Run Your Own?
Baikal is an open-source PHP application that implements the CalDAV (calendar) and CardDAV (contacts) protocols. It stores your data in a SQLite or MySQL database and exposes it over HTTP/HTTPS so that clients like Thunderbird, iOS Calendar, macOS Calendar, and Android apps (e.g., DAVx5) can sync with it. Running your own server gives you full control over your data, no subscription fees, and the ability to host unlimited calendars and address books. It is lightweight enough to run on a Raspberry Pi or a small VPS.
Prerequisites and System Requirements
Before you begin, you need a server or a machine that can run PHP and a web server. The minimum requirements are:
- A Linux distribution (Ubuntu, Debian, CentOS, etc.) or Windows with PHP support.
- PHP 7.4 or newer with the following extensions: pdo, sqlite3 (or pdo_mysql), xml, mbstring, curl, gd (for image thumbnails).
- A web server: Apache, Nginx, or IIS.
- A domain name or a static IP address if you want to access it remotely.
- SSL certificate for HTTPS (Let’s Encrypt is free and works well).
If you plan to use MySQL instead of SQLite, you will also need MySQL 5.7+ or MariaDB 10.2+.
Installation Steps
The installation process is straightforward and can be done in about 15 minutes. Here is a step-by-step guide for a typical Ubuntu server with Nginx and PHP-FPM.
- Download Baikal: Go to the official Baikal website (baikal-server.com) and download the latest release (e.g., baikal-0.9.4.zip). Extract it to your web root, for example
/var/www/baikal. - Set permissions: Ensure the web server user (www-data) has write access to the
Specificandconfigdirectories:chown -R www-data:www-data /var/www/baikal. - Configure Nginx: Create a server block that points to the
baikaldirectory and handles PHP. A minimal configuration includesindex index.php;and a location block for~ \.php$that passes to PHP-FPM. - Run the installer: Open your browser and go to
http://your-server/. The installer will check prerequisites and ask for database type (SQLite or MySQL), admin account details, and timezone. Fill in the details and complete the installation. - Secure with HTTPS: Use Certbot to obtain a Let’s Encrypt certificate and configure Nginx to redirect HTTP to HTTPS.
After installation, you can log in to the admin interface at /admin and create users, calendars, and address books.
Configuring Clients
Once your server is running, you need to connect your devices. The server URL is typically https://your-domain.com and each user has a username and password.
- iOS/macOS: Go to Settings > Calendar > Accounts > Add Account > Other > Add CalDAV Account. Enter the server URL, username, and password. The server will auto-discover the calendars.
- Thunderbird: Use the Lightning add-on (or built-in calendar) and choose “On the Network” with CalDAV format. Enter the URL and credentials.
- Android: Install DAVx5 from F-Droid or Play Store, add a new DAVdroid account with the server URL and credentials, and select which calendars/contacts to sync.
- Windows: Use the built-in Calendar app (Windows 10/11) and add a Google-like account, but choose “CalDAV” and enter the URL and credentials.
Most clients support automatic discovery (via .well-known paths), so you often only need to enter the base URL.
Common Problems and Fixes
Here are a few issues you might encounter and how to solve them:
- 403 Forbidden: Usually a permissions problem. Ensure the web server can read all files and write to
Specificandconfig. - 404 on .well-known: Some clients need
/.well-known/caldavand/.well-known/carddavto redirect to the Baikal endpoint. Add these redirects in your web server config. - SSL certificate errors: Make sure your certificate is valid and includes the domain you are using.
- Sync errors on iOS: Sometimes iOS requires the full server path, e.g.,
https://your-domain.com/dav.php. Try that if auto-discovery fails. - Slow sync: Enable caching in Baikal (it uses SabreDAV which supports caching) and ensure your database is optimized.
Backup and Maintenance
Your calendar data is precious, so regular backups are essential. Since Baikal stores everything in a database (SQLite file or MySQL), you can back up that database file or dump it. For SQLite, just copy the Specific/db/db.sqlite file. For MySQL, use mysqldump. Also back up the config directory to preserve settings. You can automate backups with cron jobs and store them offsite (e.g., using rsync to another server or cloud storage).
To update Baikal, download the latest version, replace the files (except Specific and config), and run the upgrade script in the installer. Always test on a staging copy first.
Security Considerations
Since your calendar server holds personal data, secure it properly:
- Use HTTPS exclusively; redirect all HTTP traffic to HTTPS.
- Use strong passwords for users and the admin account.
- Keep PHP and Baikal updated to patch security vulnerabilities.
- Consider using a firewall to limit access to ports 80/443 only.
- Enable two-factor authentication for the admin interface if you use a reverse proxy with authentication (e.g., Authelia or Organizr).
- Do not expose the server to the public internet unless necessary; use a VPN if only you and your family access it.
Frequently Asked Questions
Is Baikal free?
Yes, Baikal is open-source software released under the GPLv3 license. You can download, use, and modify it for free, even for commercial purposes, as long as you comply with the license terms.
Can I run Baikal on a Raspberry Pi?
Yes, Baikal runs fine on a Raspberry Pi 3 or newer. You need to install a LAMP/LEMP stack (Linux, Nginx/Apache, MySQL/SQLite, PHP). The performance is adequate for a small number of users (up to 10-20) and calendars.
Does Baikal support CalDAV and CardDAV?
Yes, Baikal supports both protocols out of the box. It also supports WebDAV for file storage, but that is not the primary purpose. You can create multiple calendars and address books per user.
How do I migrate from Google Calendar to Baikal?
You can export your Google Calendar events as .ics files and import them into Baikal using the web interface or a client like Thunderbird. For contacts, export as .vcf and import via the admin panel or a CardDAV client.
Can I access Baikal from behind a NAT or dynamic IP?
Yes, you can use a dynamic DNS service (e.g., DuckDNS or No-IP) to map a domain to your changing IP. Then set up port forwarding on your router for ports 80 and 443 to your Baikal server. Alternatively, use a VPN like Tailscale or WireGuard to access it securely without exposing ports.
What is the difference between Baikal and Nextcloud?
Nextcloud is a full file sync and share platform that also includes CalDAV/CardDAV, but it is heavier and requires more resources. Baikal is a lightweight, focused calendar/contacts server. If you only need calendar and contacts, Baikal is simpler and faster. If you also need file storage, notes, and collaborative apps, Nextcloud might be a better fit.
Related
Formula used
in t | Finish time | min | 50 | 0 in d | Distance | km | 10 | 0 out pace | Average pace | min/km | t / d | 2 out speed | Average speed | km/h | d / (t / 60) | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.