How to Install Wallabag on Elementary OS Latest

Wallabag is a free and open-source read-it-later application that offers the possibility to help you save web pages for later reading. In this tutorial, we will guide you step by step on how to install Wallabag on Elementary OS Latest.

Prerequisites

Step 1 - Update System

Before starting the installation, it is recommended to update the system to the latest version available. Open the terminal and execute the following command:

sudo apt-get update && sudo apt-get upgrade

Step 2 - Install Required dependencies

Wallabag requires some dependencies to be installed on the system. Run the following command to install them:

sudo apt-get install apache2 libapache2-mod-php7.4 php7.4 php7.4-opcache php7.4-xml php7.4-ctype php7.4-gd php7.4-json php7.4-mbstring php7.4-pgsql php7.4-zip php7.4-curl postgresql postgresql-contrib

Step 3 - Create a PostgreSQL user and database

Create a new PostgreSQL user and database for Wallabag using the following command:

sudo su postgres
psql -c "CREATE USER wallabag WITH PASSWORD '<password>';"
psql -c "CREATE DATABASE wallabag OWNER wallabag;"
exit

Replace <password> with a strong password for the Wallabag database user.

Step 4 - Download and Install Wallabag

Download the latest release of Wallabag by running the following command:

wget https://github.com/wallabag/wallabag/releases/download/2.4.3/wallabag-2.4.3.zip

Unzip the downloaded file using the following command:

unzip wallabag-2.4.3.zip

Copy the extracted files to the Apache web document root using the following command:

sudo mv wallabag-2.4.3 /var/www/html/wallabag

Change the ownership of the wallabag directory to the Apache web server user:

sudo chown -R www-data:www-data /var/www/html/wallabag/

Step 5 - Configure Wallabag

Navigate to the wallabag directory and make a copy of the .env.dist file to .env using the following command:

cd /var/www/html/wallabag/
sudo cp .env.dist .env

Open the .env file using your favorite text editor. Update the following values:

APP_SECRET=your_secret_key
DATABASE_URL=pgsql://wallabag:<password>@localhost/wallabag

Replace <password> with the password you set up for the Wallabag database user in step 3, and replace your_secret_key with a unique secret key.

Step 6 - Configure Apache

Create a new Apache virtual host configuration file for Wallabag using the following command:

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

Insert the following content:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/wallabag/public

        <Directory /var/www/html/wallabag/public>
                AllowOverride All
                Require all granted
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/wallabag_error.log
        CustomLog ${APACHE_LOG_DIR}/wallabag_access.log combined
</VirtualHost>

Save and close the file.

Enable the new virtual host and the Apache rewrite module by running the following command:

sudo a2ensite wallabag.conf
sudo a2enmod rewrite

Restart Apache:

sudo service apache2 restart

Step 7 - Install Composer

Wallabag requires Composer to manage its dependencies. Install Composer using the following command:

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

Step 8 - Install Wallabag Dependencies

Navigate to the wallabag directory and install wallabag dependencies using the following command:

cd /var/www/html/wallabag/
sudo composer install

Step 9 - Update File Permissions

Set the proper file permissions using the following command:

sudo chown -R www-data:www-data /var/www/html/wallabag/
sudo find /var/www/html/wallabag/ -type d -exec chmod 775 {} \;
sudo find /var/www/html/wallabag/ -type f -exec chmod 664 {} \;

Step 10 - Access Wallabag

Open your web browser and navigate to http://localhost/wallabag. You should see the Wallabag setup page.

Follow the instructions on the screen to set up your Wallabag instance.

Congratulations! You have successfully installed Wallabag on Elementary OS Latest.

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!