webtrees is an open-source genealogy software that can help you manage and share your family history. This tutorial will guide you through the process of installing webtrees on Debian.
Before starting the installation process, it is recommended to update the system packages.
Run the following command in your terminal to update your system packages:
sudo apt update
sudo apt upgrade
webtrees requires a LAMP (Linux, Apache, MySQL, and PHP) stack to be installed on your system.
To install the LAMP stack, run the following command in your terminal:
sudo apt install apache2 mariadb-server mariadb-client php7.4 php7.4-curl php7.4-gd php7.4-intl php7.4-json php-gmp libapache2-mod-php7.4
During the installation, you will be prompted to set a root password for the MariaDB server. Choose a strong password.
Next, we need to create a database for webtrees. Run the following command in your terminal:
sudo mysql -u root -p
Enter your MariaDB root password, then run the following command to create a new database:
CREATE DATABASE webtreesdb;
Create a new user and grant privileges to the newly created database with the following command:
GRANT ALL PRIVILEGES ON webtreesdb.* TO 'webtrees'@'localhost' IDENTIFIED BY 'password';
Remember to replace 'password' with a strong password.
Flush the changes by entering the following command:
FLUSH PRIVILEGES;
Exit from the MySQL shell by typing:
exit
Download the latest release of webtrees from the official website: https://www.webtrees.net/.
Navigate to the directory where you want to store webtrees files (e.g. /var/www/html/) then run the following command:
sudo wget https://github.com/fisharebest/webtrees/archive/1.7.15.tar.gz
Extract the downloaded archive with the following command:
sudo tar -xvf 1.7.15.tar.gz
Rename the extracted directory to 'webtrees':
sudo mv webtrees-1.7.15 webtrees
Alternatively, you can download the source using git:
sudo git clone --depth 1 https://github.com/fisharebest/webtrees.git
For webtrees to work properly, you need to create a virtual host file for it in Apache. Create a new configuration file in the /etc/apache2/sites-available/ directory by running the following command:
sudo nano /etc/apache2/sites-available/webtrees.conf
Add the following content:
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/webtrees/
ServerName yourdomain.com
<Directory /var/www/html/webtrees/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Replace 'admin@example.com' with your email address and 'yourdomain.com' with your domain name.
Save and exit the file by pressing CTRL + X, Y, then Enter.
Enable the virtual host by running the following command:
sudo a2ensite webtrees.conf
Restart the Apache service for changes to take effect:
sudo systemctl restart apache2
Open your web browser and navigate to your domain (e.g. http://yourdomain.com/).
You should be redirected to the webtrees installation screen.
Follow the on-screen instructions to complete the installation.
When prompted for the database settings, enter the following:
Once you have completed the installation, delete the installation directory by running the following command:
sudo rm -r /var/www/html/webtrees/install
That's it! You have successfully installed webtrees on Debian. You can now begin to enter and manage your family data.
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!