Skip to content

[FEAT] Support TLS connection for MariaDB in Docker setup #289

@sylvainblanchouin

Description

@sylvainblanchouin

Is this a new feature request?

  • I have searched the existing issues

Wanted change

Description

I would like to request support for secure TLS connections between BookStack (Docker setup) and a MariaDB database.

Currently, it appears that configuring a TLS-secured connection to MariaDB is either not documented or not fully supported in the official Docker setup.

Use case

In production environments, enforcing encrypted connections to the database is often required for security and compliance reasons. Using plain connections (non-TLS) can be a blocker in such environments.

Expected behavior

It should be possible to configure BookStack (via environment variables or configuration files) to connect to MariaDB using TLS, including:

  • Providing CA certificate
  • Optional client certificate and key
  • Enforcing SSL mode (e.g. REQUIRED, VERIFY_CA, VERIFY_IDENTITY)

Suggested implementation

  • Support additional environment variables such as:

        DB_SSL_CA
        DB_SSL_CERT
        DB_SSL_KEY
        DB_SSL_MODE
    
  • Ensure these parameters are passed to the underlying database connection (Laravel / PDO)

Environment

BookStack version: 26.03.3
Docker setup: official image
MariaDB version: 10.11.16

Reason for change

MariaDB supports TLS connections and this is commonly used in containerized and cloud environments. Adding this support would improve security posture for production deployments.

Proposed code change

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions