How to Install eLabFTW on Debian Latest

Introduction

eLabFTW is an open-source electronic lab notebook that enables researchers and scientists to organize, manage, and share research data in a secure and collaborative environment. In this tutorial, we will learn how to install eLabFTW on Debian Latest.

Prerequisites

To follow this tutorial, you will need:

Step 1: Install Required Packages

Ensure that your system is up to date and install the required packages:

sudo apt update && sudo apt upgrade
sudo apt install apache2 php php-cli php-gd php-intl php-mbstring php-mysql libapache2-mod-php mariadb-server

Step 2: Create a MariaDB Database for eLabFTW

Create a new database for eLabFTW:

sudo mysql -u root -p
MariaDB> CREATE DATABASE elabftw;
MariaDB> GRANT ALL ON elabftw.* TO 'elabftwuser'@'localhost' IDENTIFIED BY 'password';
MariaDB> FLUSH PRIVILEGES;
MariaDB> quit;

Be sure to replace password with a strong and secure password.

Step 3: Download and Install eLabFTW

Download the latest version of eLabFTW from the official website:

cd /tmp
wget https://github.com/elabftw/elabftw/releases/download/v1.9.16/elabftw-v1.9.16.zip

Extract the files to /var/www/html/elabftw directory:

sudo unzip elabftw-v1.9.16.zip -d /var/www/html/
sudo mv /var/www/html/elabftw-v1.9.16 /var/www/html/elabftw

Step 4: Configure Apache for eLabFTW

Navigate to /etc/apache2/sites-available/ directory and create a new Apache configuration file for eLabFTW:

sudo nano /etc/apache2/sites-available/elabftw.conf

Paste the following configuration:

<VirtualHost *:80>
    ServerName your-domain-name.com
    DocumentRoot /var/www/html/elabftw
    <Directory /var/www/html/elabftw>
        Options -Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Make sure to replace your-domain-name.com with the domain name or IP address of your server.

Enable the new virtual host, disable the default one, and restart Apache:

sudo a2dissite 000-default
sudo a2ensite elabftw.conf
sudo systemctl restart apache2

Step 5: Complete the eLabFTW Installation

Open your web browser and navigate to http://your-domain-name.com/install. Follow the on-screen instructions to complete the eLabFTW installation process.

Note: If you get an error message that says "Write permissions check failed", change the ownership of the elabftw directory to the Apache user:

sudo chown -R www-data:www-data /var/www/html/elabftw
sudo chmod -R g+w /var/www/html/elabftw

Congratulations! You have successfully installed eLabFTW on Debian Latest. You can now start using eLabFTW to manage your research 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!