6.0.0-git
2024-11-14
Last Modified 2024-03-17 by Guest

Install Horde Base Application

Provide minimal configuration

Assuming you are inside the installation's root dir

## Copy horde's minimal config file to the persistent config dir
cp -a web/horde/config/conf.php.dist var/config/horde/conf.php
## Run the reconfigure command to provide necessary links
sudo -u www-data composer horde-reconfigure

By now you SHOULD be able to hit horde in the browser and be auto-loggedin as administrator. Beware, anybody can access that URL. Don't do this for production servers. Produce complete configs using the steps below and simply provide these instead of the sample config

Configure via Web UI

Go to the http://localhost/horde/admin/config/config.php?app=horde path inside your installation's webroot.
Hit the "create configuration" button. You will likely be rewarded by an error message about a missing preferences table.

Connect to an SQL database

A simple database configuration snippet for a local mariadb or mysql database may look like this:

$conf['sql']['username'] = 'throwaway_horde';
$conf['sql']['password'] = 'throwaway_horde';
$conf['sql']['hostspec'] = 'localhost';
$conf['sql']['port'] = 3306;
$conf['sql']['protocol'] = 'tcp';
$conf['sql']['database'] = 'throwaway_horde';
$conf['sql']['charset'] = 'utf8mb4';
$conf['sql']['ssl'] = false;
$conf['sql']['splitread'] = false;
$conf['sql']['logqueries'] = false;
$conf['sql']['phptype'] = 'mysql';

It is recommended to create the config through the web UI. Note that the SQL charset is set to 'utf8mb4' as the default 'utf-8' may produce undesirable results.

Please only add configs above the footer line unless you know what you are doing

/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */

Setup the database tables

Run this command:

 ./vendor/bin/horde-db-migrate up

Set authentication to SQL

By now you can use the web UI to configure authentication or add this snippet to the conf.php file

$conf['auth']['admins'] = array('administrator');
$conf['auth']['list_users'] = 'list';
$conf['auth']['params']['driverconfig'] = 'horde';
$conf['auth']['params']['encryption'] = 'ssha';
$conf['auth']['params']['show_encryption'] = false;
$conf['auth']['driver'] = 'sql';
$conf['auth']['params']['count_bad_logins'] = false;
$conf['auth']['params']['login_block'] = false;
$conf['auth']['params']['login_block_count'] = 5;
$conf['auth']['params']['login_block_time'] = 5;
$conf['auth']['lowercase'] = true;
$conf['auth']['resetpassword'] = true;
$conf['auth']['checkip'] = true;
$conf['auth']['checkbrowser'] = true;
$conf['auth']['alternate_login'] = false;
$conf['auth']['redirect_on_logout'] = false;

Please only add configs above the footer line unless you know what you are doing

/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */

Inject initial user(s)

The database does not yet contain the admin user by now.
To create it, run this command: hordectl patch <user> <password>

 ./vendor/bin/hordectl patch user administrator adminpw

Obviously, you should use a different, sane password.

Configure global administrator user

In case your admin user is tied to another user name, please change this line accordingly:

$conf['auth']['admins'] = array('adminuser1', 'admin2@somewhere');