Wallabag installation under Debian

Draft Newest draft | Approver: psycore

This is an old revision of the document!


Wallabag installation under Debian

Wallabag is a self-hostable service that stores your web pages to read them later. With the following steps, you can set up your Wallabag under Debian.

Required packages

The required packages can be found here.

Installation

git clone https://github.com/wallabag/wallabag.git
cd wallabag && make install

Virtual Host

Apache 2.4

<VirtualHost 1.2.3.4:443>
  ServerName wallabag.domain.tld
  ServerAlias www.wallabag.domain.tld
 
  # SSL configuration, you may want to take the easy route instead and use Lets Encrypt!
  SSLEngine On
  SSLProtocol -ALL +TLSv1 +TLSv1.2
  SSLCompression Off
  SSLSessionTickets on
  SSLHonorCipherOrder off
  SSLCipherSuite ECDH+AESGCM:ECDH+AES256:!aNULL:!MD5:!DSS:!DH:!AES128
  SSLVerifyDepth 10
  SSLCertificateFile /etc/letsencrypt/live/wallabag.domain.tld/cert.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/wallabag.domain.tld/privkey.pem
  SSLCACertificateFile /etc/letsencrypt/live/wallabag.domain.tld/chain.pem
  SSLCertificateChainFile /etc/letsencrypt/live/wallabag.domain.tld/fullchain.pem  
 
    DocumentRoot "/home/user/wallabag/web"
    <Directory /home/user/wallabag/web>
Require all granted
        <IfModule mod_rewrite.c>
            Options +SymLinksIfOwnerMatch
            Options -MultiViews
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^(.*)$ app.php [QSA,L]
        </IfModule>
    </Directory>
 
    # If you don't want this caching strategy for your assets
    # you have to comment the two following blocks
    <IfModule mod_expires.c>
        ExpiresActive On
        ExpiresByType application/javascript A259200
        ExpiresByType image/avif "access plus 2592000 seconds"
        ExpiresByType image/gif "access plus 2592000 seconds"
        ExpiresByType image/jpg "access plus 2592000 seconds"
        ExpiresByType image/jpeg "access plus 2592000 seconds"
        ExpiresByType image/png "access plus 2592000 seconds"
        ExpiresByType image/webp "access plus 2592000 seconds"
        ExpiresByType text/css "access plus 2592000 seconds"
    </IfModule>
 
    <IfModule mod_headers.c>
        <FilesMatch "\\.css$">
            Header set Cache-Control "max-age=2592000, public"
        </FilesMatch>
        <FilesMatch "\\.(gif|ico|jpe?g|png|svg|webp)$">
            Header set Cache-Control "max-age=2592000, public, immutable"
        </FilesMatch>
        <FilesMatch "\\.js$">
            Header set Cache-Control "max-age=2592000, private"
        </FilesMatch>
    </IfModule>
 
    # uncomment the following lines if you install assets as symlinks
    # or run into problems when compiling LESS/Sass/CoffeScript assets
    # <Directory /home/psycore/wallabag/web>
    #     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 /home/psycore/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>

Authorisations

chown -R www-data:www-data /home/user/wallabag/var
chown -R www-data:www-data /home/user/wallabag/web
chown -R www-data:www-data /home/user/wallabag/bin/
chown -R www-data:www-data /home/user/wallabag/app/config/
chown -R www-data:www-data /home/user/wallabag/vendor/
chown -R www-data:www-data /home/user/wallabag/data/

LetsEncrypt certificate as cronjob

30 3 * * 0 /opt/certbot/certbot-auto certonly --apache --force-renewal -d wallabag.domain.tld --post-hook "/etc/init.d/apache2 reload"
en/linux/wallabag/installation.1701686434.txt.gz ยท Last modified: 2023/12/04 11:40
CC Attribution-Noncommercial-Share Alike 4.0 International