wallabag is a self hostable application for saving web pages: Save and classify articles. Read them later. Freely. https://wallabag.org
Wallabag is a free/libre and open source software licensed under MIT license. This is an alternative to Pocket (although I’ve never used it), Instapaper and Xmarks.
I save web pages using the traditional ‘Save Page’,’Save Page as PDF’ and mostly screenshotting them (Screengrab) but these methods are not productive since it leaves a lot of files to my desktop and it is not portable I have to copy and paste them other devices just only to read them.
In this tutorial I will install Wallabag in a different port than 80 (http) or 443 (https) since I used them for something else. Let us clone the wallabag repo to /var
You may want to run these through tmux
$ tmux
$ cd /var
$ sudo git clone https://github.com/wallabag/wallabag.git
Install dependencies ( I will use MariaDB(MySQL) and php7 if you have php5 you can remove it by apt-get remove packagename)
$ sudo apt update
$ sudo apt install apache2 libapache2-mod-php php composer git-core php-bcmath php-gd php-dompdf php-json php-mbstring php-xml php-tidy php-symfony-polyfill-iconv php-curl php-gettext php-mysql make zip unzip
Let us add our web server root location since I am not going to put it on /var/www
$ sudo nano /etc/apache2/apache2.conf
<Directory /var/wallabag/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
Modify ports.conf and add the Listen https
$ sudo nano /etc/apache2/ports.conf
<IfModule ssl_module>
Listen 88XX https
</IfModule>
<IfModule mod_gnutls.c>
Listen 88XX https
</IfModule>
If you have a domain: mydomain.dynamicdns.com
Add a new site to apache2/sites-available
$ sudo nano /etc/apache2/sites-available/wallabag.conf
<VirtualHost *:88XX>
ServerName mydomain.dynamicdns.com
ServerAlias mydomain.dynamicdns.com
DocumentRoot /var/wallabag/web
SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/xxxxxx/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/xxxxx/privkey.pem
DocumentRoot /var/wallabag/web
<Directory /var/wallabag/web>
Require all granted
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app.php [QSA,L]
</IfModule>
</Directory>
# uncomment the following lines if you install assets as symlinks
# or run into problems when compiling LESS/Sass/CoffeScript assets
# <Directory /var/wallabag/wallabag>
# Options FollowSymlinks
# </Directory>
# optionally disable the RewriteEngine for the asset directories
# which will allow apache to simply reply with a 404 when files are
# not found instead of passing the request into the full symfony stack
<Directory /var/wallabag/web/bundles>
<IfModule mod_rewrite.c>
RewriteEngine Off
</IfModule>
</Directory>
ErrorLog /var/log/apache2/wallabag_error.log
CustomLog /var/log/apache2/wallabag_access.log combined
</VirtualHost>
Create the database:
$ sudo mysql -uroot
]>CREATE DATABASE wallabag;
]>GRANT ALL PRIVILEGES ON wallabag.* TO 'wallabag'@'localhost' IDENTIFIED BY 'MYgoodPasWord';
]>FLUSH PRIVILEGES;
]>\q
Begin the installation process, this make take a while since it will install modules, dependencies and configurations to run wallabag.
$ cd /var/wallabag
$ tmux
$ sudo make install
If you do not know the parameters just press enter and the default will be set, for more information please visit https://doc.wallabag.org/en/admin/parameters.html
You need to generate a secret key, you can do this by using a password manager or just use dd command.
$ dd if=/dev/urandom count=1 bs=20 2>/dev/null|base64
W7uKlYp1UjktVKu5tVIp2AQ1pc8
INTERACTIVE OUTPUT:
user@user:/var/wallabag $ sudo make install
composer.phar not found, we'll see if composer is installed globally.
Note: checking out '2.3.2'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at b1b4ae6f... Release wallabag 2.3.2
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Installing dependencies from lock file
- Installing twig/twig (v1.35.0)
Loading from cache
- Installing symfony/polyfill-util (v1.6.0)
Loading from cache
- Installing paragonie/random_compat (v2.0.11)
Loading from cache
- Installing symfony/polyfill-php70 (v1.6.0)
Loading from cache
- Installing symfony/polyfill-php56 (v1.6.0)
Loading from cache
- Installing symfony/polyfill-mbstring (v1.6.0)
Loading from cache
- Installing symfony/symfony (v3.3.15)
Loading from cache
- Installing symfony/polyfill-intl-icu (v1.6.0)
Loading from cache
- Installing symfony/polyfill-apcu (v1.6.0)
Loading from cache
- Installing psr/simple-cache (1.0.0)
Loading from cache
- Installing psr/log (1.0.2)
Loading from cache
- Installing psr/link (1.0.0)
Loading from cache
- Installing psr/container (1.0.0)
Loading from cache
- Installing psr/cache (1.0.1)
Loading from cache
- Installing fig/link-util (1.0.0)
Loading from cache
- Installing doctrine/lexer (v1.0.1)
Loading from cache
- Installing doctrine/inflector (v1.1.0)
Loading from cache
- Installing doctrine/collections (v1.4.0)
Loading from cache
- Installing doctrine/cache (v1.6.2)
Loading from cache
- Installing doctrine/annotations (v1.4.0)
Loading from cache
- Installing doctrine/common (v2.7.3)
Loading from cache
- Installing react/promise (v2.5.1)
Loading from cache
- Installing guzzlehttp/streams (3.0.0)
Loading from cache
- Installing guzzlehttp/ringphp (1.1.0)
Loading from cache
- Installing guzzlehttp/guzzle (5.3.2)
Loading from cache
- Installing bdunogier/guzzle-site-authenticator (1.0.0-beta4)
Loading from cache
- Installing behat/transliterator (v1.2.0)
Loading from cache
- Installing jdorn/sql-formatter (v1.2.17)
Loading from cache
- Installing doctrine/doctrine-cache-bundle (1.3.2)
Loading from cache
- Installing doctrine/dbal (v2.5.13)
Loading from cache
- Installing doctrine/doctrine-bundle (1.8.1)
Loading from cache
- Installing craue/config-bundle (2.1.0)
Loading from cache
- Installing defuse/php-encryption (v2.1.0)
Loading from cache
- Installing zendframework/zend-eventmanager (3.2.0)
Loading from cache
- Installing zendframework/zend-code (2.6.3)
Loading from cache
- Installing ocramius/proxy-manager (1.0.2)
Loading from cache
- Installing doctrine/migrations (v1.5.0)
Loading from cache
- Installing doctrine/doctrine-migrations-bundle (v1.3.1)
Loading from cache
- Installing willdurand/jsonp-callback-validator (v1.1.0)
Loading from cache
- Installing friendsofsymfony/jsrouting-bundle (1.6.3)
Loading from cache
- Installing friendsofsymfony/oauth2-php (1.2.2)
Loading from cache
- Installing friendsofsymfony/oauth-server-bundle (1.5.2)
Loading from cache
- Installing willdurand/negotiation (v2.3.1)
Loading from cache
- Installing friendsofsymfony/rest-bundle (2.3.0)
Loading from cache
- Installing friendsofsymfony/user-bundle (v2.0.2)
Loading from cache
- Installing grandt/relativepath (1.0.2)
Loading from cache
- Installing grandt/binstring (1.0.0)
Loading from cache
- Installing grandt/phpzipmerge (1.0.4)
Loading from cache
- Installing phpzip/phpzip (2.0.8)
Loading from cache
- Installing grandt/phpresizegif (1.0.3)
Loading from cache
- Installing grandt/phpepub (4.0.7.1)
Loading from cache
- Installing hoa/exception (1.17.01.16)
Loading from cache
- Installing hoa/consistency (1.17.05.02)
Loading from cache
- Installing hoa/event (1.17.01.13)
Loading from cache
- Installing hoa/iterator (2.17.01.10)
Loading from cache
- Installing hoa/visitor (2.17.01.16)
Loading from cache
- Installing hoa/ustring (4.17.01.16)
Loading from cache
- Installing hoa/protocol (1.17.01.14)
Loading from cache
- Installing hoa/zformat (1.17.01.10)
Loading from cache
- Installing hoa/regex (1.17.01.13)
Loading from cache
- Installing hoa/math (1.17.05.16)
Loading from cache
- Installing hoa/stream (1.17.02.21)
Loading from cache
- Installing hoa/file (1.17.07.11)
Loading from cache
- Installing hoa/compiler (3.17.08.08)
Loading from cache
- Installing hoa/ruler (2.17.05.16)
Loading from cache
- Installing html2text/html2text (4.1.0)
Loading from cache
- Installing incenteev/composer-parameter-handler (v2.1.2)
Loading from cache
- Installing wallabag/tcpdf (6.2.15)
Loading from cache
- Installing true/punycode (v2.1.1)
Loading from cache
- Installing smalot/pdfparser (v0.11)
Loading from cache
- Installing simplepie/simplepie (1.5.1)
Loading from cache
- Installing monolog/monolog (1.23.0)
Loading from cache
- Installing j0k3r/safecurl (2.0.2)
Loading from cache
- Installing electrolinux/php-html5lib (0.1.0)
Loading from cache
- Installing j0k3r/php-readability (1.1.9)
Loading from cache
- Installing j0k3r/graby-site-config (1.0.45)
Loading from cache
- Installing htmlawed/htmlawed (dev-master 62a8d13)
Loading from cache
- Installing j0k3r/graby (1.12.0)
Loading from cache
- Installing javibravo/simpleue (2.1.0)
Loading from cache
- Installing phpoption/phpoption (1.5.0)
Loading from cache
- Installing phpcollection/phpcollection (0.5.0)
Loading from cache
- Installing jms/parser-lib (1.0.0)
Loading from cache
- Installing jms/metadata (1.6.0)
Loading from cache
- Installing doctrine/instantiator (1.0.5)
Loading from cache
- Installing jms/serializer (1.10.0)
Loading from cache
- Installing kphoen/rulerz (0.20.5)
Loading from cache
- Installing kphoen/rulerz-bridge (1.0.1)
Loading from cache
- Installing kphoen/rulerz-bundle (0.14.1)
Loading from cache
- Installing doctrine/orm (v2.5.14)
Loading from cache
- Installing lexik/form-filter-bundle (v5.0.4)
Loading from cache
- Installing liip/theme-bundle (1.5.2)
Loading from cache
- Installing mgargano/simplehtmldom (1.5)
Loading from cache
- Installing mnapoli/piwik-twig-extension (1.0.0)
Loading from cache
- Installing michelf/php-markdown (1.8.0)
Loading from cache
- Installing nelmio/api-doc-bundle (2.13.3)
Loading from cache
- Installing nelmio/cors-bundle (1.5.4)
Loading from cache
- Installing php-amqplib/php-amqplib (v2.7.0)
Loading from cache
- Installing php-amqplib/rabbitmq-bundle (v1.14.2)
Loading from cache
- Installing predis/predis (v1.1.1)
Loading from cache
- Installing sonata-project/google-authenticator (1.1.0)
Loading from cache
- Installing scheb/two-factor-bundle (v2.14.0)
Loading from cache
- Installing composer/ca-bundle (1.1.0)
Loading from cache
- Installing sensiolabs/security-checker (v4.1.7)
Loading from cache
- Installing sensio/distribution-bundle (v5.0.21)
Loading from cache
- Installing sensio/framework-extra-bundle (v3.0.29)
Loading from cache
- Installing gedmo/doctrine-extensions (v2.4.33)
Loading from cache
- Installing stof/doctrine-extensions-bundle (v1.3.0)
Loading from cache
- Installing symfony/monolog-bundle (v3.1.2)
Loading from cache
- Installing swiftmailer/swiftmailer (v5.4.8)
Loading from cache
- Installing symfony/swiftmailer-bundle (v2.6.7)
Loading from cache
- Installing twig/extensions (v1.5.1)
Loading from cache
- Installing wallabag/php-mobi (1.0.1)
Loading from cache
- Installing pagerfanta/pagerfanta (v1.0.5)
Loading from cache
- Installing white-october/pagerfanta-bundle (v1.1.2)
Loading from cache
- Installing willdurand/hateoas (2.11.0)
Loading from cache
- Installing jms/serializer-bundle (2.3.1)
Loading from cache
- Installing willdurand/hateoas-bundle (1.3.0)
Loading from cache
Generating optimized autoload files
> Incenteev\ParameterHandler\ScriptHandler::buildParameters
Creating the "app/config/parameters.yml" file
Some parameters are missing. Please provide them.
database_driver (pdo_mysql):
database_driver_class (null):
database_host (127.0.0.1):
database_port (null):
database_name (wallabag):
database_user (root): wallabag
database_password (null): MYgoodPasWord
database_path (null):
database_table_prefix (wallabag_):
database_socket (null):
database_charset (utf8mb4):
domain_name ('https://your-wallabag-url-instance.com'): https://mydomain.dynamicdns.com:88XX
mailer_transport (smtp):
mailer_host (127.0.0.1):
mailer_user (null):
mailer_password (null):
locale (en):
secret (ovmpmAWXRCabNlMgzlzFXDYmCFfzGv): thisshouldbegeneratedsecret
twofactor_auth (true):
twofactor_sender (no-reply@wallabag.org): myemailsender@host.com
fosuser_registration (true): false
fosuser_confirmation (true): false
from_email (no-reply@wallabag.org): myemailsender@host.com
rss_limit (50):
rabbitmq_host (localhost):
rabbitmq_port (5672):
rabbitmq_user (guest):
rabbitmq_password (guest):
rabbitmq_prefetch_count (10):
redis_scheme (tcp):
redis_host (localhost):
redis_port (6379):
redis_path (null):
redis_password (null):
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
// Clearing the cache for the prod environment with debug
// false
[OK] Cache for the "prod" environment (debug=false) was successfully cleared.
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets
Trying to install assets as relative symbolic links.
--- ------------------------------ ------------------
Bundle Method / Error
--- ------------------------------ ------------------
✔ NelmioApiDocBundle relative symlink
✔ CraueConfigBundle relative symlink
✔ WhiteOctoberPagerfantaBundle relative symlink
✔ FOSJsRoutingBundle relative symlink
--- ------------------------------ ------------------
[OK] All assets were successfully installed.
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile
Wallabag installer
==================
Step 1 of 4: Checking system requirements.
------------------------------------------
------------------------ -------- ----------------
Checked Status Recommendation
------------------------ -------- ----------------
PDO Driver (pdo_mysql) OK!
Database connection OK!
Database version OK!
curl_exec OK!
curl_multi_init OK!
------------------------ -------- ----------------
[OK] Success! Your system can run wallabag properly.
Step 2 of 4: Setting up database.
---------------------------------
It appears that your database already exists. Would you like to reset it? (yes/no) [no]:
> yes
Dropping database, creating database and schema...
Clearing the cache...
Database successfully setup.
Step 3 of 4: Administration setup.
----------------------------------
Would you like to create a new admin user (recommended)? (yes/no) [yes]:
> yes
Username [wallabag]:
> admin
Password [wallabag]:
>
Email []:
> admin@mydomain.dynamicdns.com
Administration successfully setup.
Step 4 of 4: Config setup.
--------------------------
Config successfully setup.
[OK] Wallabag has been successfully installed.
[OK] You can now configure your web server, see https://doc.wallabag.org
Now we need to set permissionsfrom root to www-data.
$ sudo chown -R www-data:www-data /var/walllabag
You need to create an SSL certificate using Let’s Encrypt and configure apache to become more secure against SSL attacks.
https://mozilla.github.io/server-side-tls/ssl-config-generator/
$ sudo a2ensite wallabag
$ sudo systemctl start apache2
$ sudo ufw allow 88XX/tcp
Start apache2,allow the port from firewall and port forward if you are hosting this on your own pi.
Download the wallabag client and login to your wallabag host and start saving articles to read!
Firefox addon: https://addons.mozilla.org/en-US/firefox/addon/wallabagger/
Android F-Droid apk or use Google Play Store https://f-droid.org/packages/fr.gaulupeau.apps.InThePoche/
You need to also harden your apache webserver.
Except where otherwise noted, this work is licensed under Creative Commons Attribution-ShareAlike 4.0 International License (http://creativecommons.org/licenses/by-sa/4.0/).
I hope that this post is useful to you, if you liked this post you may support me via liberapay. Thank you for your support.
References:
https://blog.cavebeat.org/2017/07/install-wallabag-2-x-on-debian-stretch/
https://github.com/wallabag/wallabag
https://doc.wallabag.org/en/admin/installation/virtualhosts.html
https://doc.wallabag.org/en/admin/installation/installation.html#requirements