AgenDAV is a free, multi-user calendar software for open-source web based calendars that is compatible with CalDAV and CardDAV. In this tutorial, we’ll go through the steps to install AgenDAV on Arch Linux.
Before we get started, ensure that your Arch Linux server meets the following prerequisites:
Log in to your Arch Linux machine and update the package repositories by running:
sudo pacman -Syu
AgenDAV requires PHP 7.3 or later, so we need to ensure that our system has the required PHP extensions installed. Run the following command to install PHP and other required packages:
sudo pacman -S php php-fpm php-intl php-mysql git
During installation, you will be asked to choose a web server. You can select either Apache or Nginx.
If you have installed Apache, you need to configure it to run PHP.
Edit the Apache configuration file with your favorite text editor:
sudo nano /etc/httpd/conf/httpd.conf
Add the following line at the end of the LoadModule section:
LoadModule php7_module modules/libphp7.so
Save the configuration file and exit the editor.
Update the Apache configuration file to include the AgenDAV virtual host configuration by creating a new file:
sudo nano /etc/httpd/conf.d/agendav.conf
Paste the following content into the file:
<VirtualHost *:80>
ServerName agendav.local
DocumentRoot /var/www/agendav/
DirectoryIndex index.php
ErrorLog /var/log/httpd/agendav_error.log
CustomLog /var/log/httpd/agendav_access.log combined
<Directory /var/www/agendav/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<FilesMatch \.php$>
SetHandler "proxy:unix:/run/php-fpm/php-fpm.sock|fcgi://localhost/"
</FilesMatch>
</VirtualHost>
Save the configuration file and exit the editor.
Restart the Apache web server to apply the changes:
sudo systemctl restart httpd
If you have installed Nginx, you need to create a new virtual host file for AgenDAV.
Create the AgenDAV virtual host file:
sudo nano /etc/nginx/sites-available/agendav
Paste the following content into the file:
server {
listen 80;
listen [::]:80;
server_name agendav.local;
root /var/www/agendav;
index index.php;
access_log /var/log/nginx/agendav_access.log;
error_log /var/log/nginx/agendav_error.log;
location / {
try_files $uri /index.php?$query_string;
}
location ~* \.php(?:$|/) {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
}
}
Save the file and exit the editor.
Link the virtual host file to Nginx’s sites-enabled directory:
sudo ln -s /etc/nginx/sites-available/agendav /etc/nginx/sites-enabled/
Restart the Nginx web server to apply the changes:
sudo systemctl restart nginx
Download the latest version of AgenDAV source code from GitHub using the following command:
git clone https://github.com/agendav/agendav.git /var/www/agendav
Change the ownership of the AgenDAV directory to the web server user:
sudo chown -R http:http /var/www/agendav
Rename the configuration file:
sudo cp /var/www/agendav/config/default.config.php /var/www/agendav/config/config.php
Edit the config.php
file:
sudo nano /var/www/agendav/config/config.php
Edit the following variables:
$config[‘system’][‘base_url’]
to the URL of your AgenDAV installation (e.g., http://agendav.local
)$config[‘system’][‘secret_key’]
to a random string of letters and numbersSave the changes and close the editor.
Create a new database and user for AgenDAV:
sudo mysql -u root -p
Enter the MySQL root password when prompted.
Execute the following SQL statements to create a database and user:
CREATE DATABASE agendav;
CREATE USER 'agendav'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON agendav.* TO 'agendav'@'localhost';
FLUSH PRIVILEGES;
exit
Ensure that you replace the 'password'
placeholder with your desired password for the user.
Import the AgenDAV database schema:
mysql -u agendav -p agendav < /var/www/agendav/db/agendav.sql
Enter the agendav
user password when prompted.
Open your web browser and navigate to the URL of your AgenDAV installation.
You will be prompted to create an administrator account. Fill in the required fields and click “Create”:
After logging in, you will be able to use AgenDAV's calendar and contacts functionality:
In this tutorial, we have installed AgenDAV on Arch Linux and configured it to run on a web server. You have also learned how to configure a database for AgenDAV and launch it on a web browser.
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!