[Configuration]: Config values via ENV are not applied · Issue #5768 · kanboard/kanboard · GitHub
Skip to content

[Configuration]: Config values via ENV are not applied #5768

Description

@XenGi

Bug Summary

Can't set config values via ENV

Description

When I set ENV["PLUGIN_INSTALLER"] = true in the php-fpm config, kanboard still doesn't let me install plugins.

Steps to Reproduce

  1. Set ENV["PLUGIN_INSTALLER"] = true in phpfpm-kanboard.conf
  2. Run kanboard with php-fpm -y phpfpm-kanboard.conf -c php.conf
  3. Go to /?controller=PluginController&action=directory

Expected Behavior

Being able to install plugins from the plugin directory

Actual Behavior

Error message Your Kanboard instance is not configured to install plugins from the user interface.

Version

v1.2.48

Database

SQLite

PHP Version

8.4.16

Browser

Firefox

Operating System

NixOS

Relevant Logs or Error Output

Journal doesn't show anything

Additional Context

Complete config file:

[global]
daemonize = no
error_log = syslog


[kanboard]
catch_workers_output = yes
group = kanboard
listen = /run/phpfpm/kanboard.sock
listen.owner = nginx
php_admin_flag[log_errors] = yes
php_admin_value[error_log] = stderr
pm = dynamic
pm.max_children = 32
pm.max_requests = 500
pm.max_spare_servers = 4
pm.min_spare_servers = 2
pm.start_servers = 2
user = kanboard
env[DATA_DIR] = /var/lib/kanboard
env[PLUGIN_INSTALLER] = true
env[PLUGINS_DIR] = /var/lib/kanboard/plugins
env[PLUGIN_API_URL] = https://kanboard.org/plugins.json

Checklist

  • I have searched existing issues to ensure this bug hasn't been reported before.
  • I verified that the problem is not caused by a plugin. Please report the issue to the plugin author if applicable.

Activity

  1. added theissue type on Jan 31, 2026
  2. fguillot commented on Jan 31, 2026

    @fguillot
    Member

    As per the documentation, there are 3 requirements to enable the plugin installer in the web ui:

    • The plugin directory must be writable by the web server user.
    • The PHP Zip extension must be available on your server.
    • The config parameter PLUGIN_INSTALLER must be set to true.

    Source: https://docs.kanboard.org/v1/admin/plugins/

    Does your server is configured to meet these 3 requirements?

    You can also compare your local PHP-FPM configuration with the official Docker image to see if something is missing on your side: https://github.com/kanboard/kanboard/tree/main/docker/etc/php84

  3. changed the issue type fromtoon Jan 31, 2026
  4. changed the title [-][Bug]: Config values via ENV are not applied[/-] [+][Configuration]: Config values via ENV are not applied[/+] on Jan 31, 2026
  5. XenGi commented on Jan 31, 2026

    @XenGi
    Author

    I'll have a closer look what the nix module does and report back. Still not sure if the problem is within nix, kanboard itself or me.

  6. XenGi commented on Feb 1, 2026

    @XenGi
    Author

    The plugin directory must be writable by the web server user

    I'm not sure about that first requirement. The Nginx only talks to php-fpm. So I guess the plugin dir needs to be writable by the user who runs php-fpm which in my case is kanboard? I tried both kanboard and nginx. Still no success.

    $ ls -la /var/lib/kanboard/plugins
    total 8
    drwxrwxr-x 2 kanboard kanboard 4096 Feb  1 15:48 .
    drwx------ 4 kanboard kanboard 4096 Feb  4 13:11 ..
    

    The PHP Zip extension must be available on your server

    Zip is enabled.

    $ php -i
    zip
    
    Zip => enabled
    Zip version => 1.22.7
    Libzip version => 1.11.4
    BZIP2 compression => No
    XZ compression => No
    ZSTD compression => No
    AES-128 encryption => No
    AES-192 encryption => No
    AES-256 encryption => No
    

    The config parameter PLUGIN_INSTALLER must be set to true.

    It is enabled via Environment variable.

    $ cat phpfpm-kanboard.conf
    [kanboard]
    env[PLUGINS_DIR] = /var/lib/kanboard/plugins
    env[PLUGIN_INSTALLER] = true
    

    kanboard is started via systemd like this (shortened paths):

    ExecStart=php-fpm -y phpfpm-kanboard.conf -c php.ini
    
  7. XenGi commented on Feb 4, 2026

    @XenGi
    Author

    I had a look at the code again.

    This part defines the constants from the environment variables.

    // https://github.com/kanboard/kanboard/blob/main/app/constants.php#L19
    defined('PLUGINS_DIR') or define('PLUGINS_DIR', getenv('PLUGINS_DIR') ?: ROOT_DIR.DIRECTORY_SEPARATOR.'plugins');
    defined('PLUGIN_INSTALLER') or define('PLUGIN_INSTALLER', strtolower(getenv('PLUGIN_INSTALLER')) === 'true');

    This part is the check if all 3 reuirements are true.

    // https://github.com/kanboard/kanboard/blob/main/app/Core/Plugin/Installer.php#L23
    public static function isConfigured() {
      return PLUGIN_INSTALLER && is_writable(PLUGINS_DIR) && extension_loaded('zip');
    }

    I'm still investigating but can't find why it doesn't work so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions