Self-hosting

On your server, with your database

No stripped-down “community edition” — the same code that runs on consented.eu.

Requirements
  • PHP 8.3 or newer with the extensions pdo_mysql, mbstring, dom, json
  • MariaDB 10.11+ or MySQL 8
  • A web server whose document root points to public/ (Apache with mod_rewrite, or nginx)
  • Redis — optional. Without Redis everything runs through the database.
  • No Node, no Composer, no build step. The runtime ships pre-built in the repository.
Installation
# 1. Get the code
git clone https://github.com/LW-IT-Solutions/consented-eu.git /var/www/consented
cd /var/www/consented

# 2. Create the config and generate secrets
cp .env.example .env
php -r 'echo "APP_KEY=", base64_encode(random_bytes(32)), PHP_EOL;'
php -r 'echo "PASSWORD_PEPPER=", base64_encode(random_bytes(32)), PHP_EOL;'
php -r 'echo "IP_HASH_PEPPER=", base64_encode(random_bytes(32)), PHP_EOL;'
# Put the values into .env, plus DB_NAME / DB_USER / DB_PASS and APP_URL

# 3. Set up the database
php bin/migrate
php bin/seed

# 4. Write permissions for the web server user
chgrp -R www-data storage .env
chmod -R 775 storage
chmod 640 .env

# 5. Point the document root at public/ — done.
Apache example
<VirtualHost *:443>
    ServerName consent.example.com
    DocumentRoot /var/www/consented/public

    <Directory /var/www/consented/public>
        Options -Indexes +FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    SSLEngine on
    SSLCertificateFile    /etc/ssl/consent.example.com.cer
    SSLCertificateKeyFile /etc/ssl/consent.example.com.key
    Header always set Strict-Transport-Security "max-age=15768000"
</VirtualHost>

Important: only public/ may be reachable. If the project directory sat in the document root, .env would be retrievable over HTTP.

Ongoing operation
# Clean up expired sessions, rate limits and consents
*/15 * * * * php /var/www/consented/bin/worker >/dev/null 2>&1

The worker deletes expired sessions and tokens and applies the retention period to the consent log (CONSENT_RETENTION_MONTHS, 36 months by default).

Licence
The code is under the MIT licence — private or commercial, hosted by us or on your own infrastructure, no permission needed and no fee. You may use it, change it, pass it on and build it into your own products; the only condition is to keep the copyright notice. The service catalogue is separately licensed under the Open Database License 1.0: you may use it just as freely, but a modified version that you publish has to be available under ODbL again.