Wallabag is an open-source self-hosted application that allows users to save web pages and articles to read later. In this tutorial, we will install Wallabag on Arch Linux.
The first step is to update the system to ensure we have the latest packages. Open the terminal and run the following command:
sudo pacman -Syu
Wallabag is based on PHP and requires a LAMP stack (Linux, Apache, MariaDB, PHP) to run correctly. We will install the latest versions of Apache, PHP, and MariaDB using the pacman package manager. Run the following command to install the LAMP stack:
sudo pacman -S apache php php-apache mariadb
Once the packages are installed, start and enable the Apache and MariaDB services:
sudo systemctl enable httpd.service
sudo systemctl start httpd.service
sudo systemctl enable mariadb.service
sudo systemctl start mariadb.service
To secure MariaDB, run the following command:
sudo mysql_secure_installation
Wallabag requires a database to store the data. We will create a new database, user, and grant privileges to the user on the database.
Log into MariaDB using the following command:
sudo mysql -u root -p
Enter the root user password and then create a new database:
CREATE DATABASE wallabag;
Next, create a new user and grant privileges:
CREATE USER 'wallabag'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON wallabag.* TO 'wallabag'@'localhost';
FLUSH PRIVILEGES;
Replace the password with a strong password.
We will install Wallabag using Composer, a dependency manager for PHP. Composer is not available in the Arch Linux package repository, so we will install it manually.
Install the required packages:
sudo pacman -S php-gd php-intl composer
Next, navigate to the Apache webroot directory:
cd /srv/http
Clone the latest version of Wallabag from the GitHub repository:
sudo git clone https://github.com/wallabag/wallabag.git
Change the ownership of the wallabag directory to the Apache user:
sudo chown -R http:http wallabag/
Navigate to the wallabag directory:
cd wallabag/
Install the dependencies:
sudo composer install --no-dev --optimize-autoloader
Once the dependencies are installed, you should see no errors.
Copy the default configuration file:
sudo cp app/config/parameters.yml.dist app/config/parameters.yml
Open the file using your preferred text editor:
sudo nano app/config/parameters.yml
Modify the following lines:
database_driver: pdo_mysql
database_host: localhost
database_name: wallabag
database_user: wallabag
database_password: password
Replace the database_user with the username you created earlier and replace password with the user's password.
Once you have made the changes, save and exit the file.
Create a new configuration file for Wallabag:
sudo nano /etc/httpd/conf/extra/wallabag.conf
Add the following lines:
<VirtualHost *:80>
ServerName wallabag.example.com
DocumentRoot "/srv/http/wallabag/web"
<Directory "/srv/http/wallabag/web">
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>
</VirtualHost>
Replace wallabag.example.com with your domain name or IP address.
Once you have made the changes, save and exit the file.
Enable the rewrite module:
sudo ln -s /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak
sudo nano /etc/httpd/conf/httpd.conf
Uncomment the following line:
LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so
Save and exit the file.
Restart the Apache service:
sudo systemctl restart httpd.service
Open your browser and navigate to your Wallabag domain. You should see the Wallabag installation page.
Follow the on-screen instructions to configure Wallabag.
In this tutorial, we installed Wallabag on Arch Linux. We installed the LAMP stack, configured the database, installed Wallabag and configured it, and finally configured Apache.
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!