6.0.0-git
2024-04-27

Diff for Doc/Dev/H6/Installation/InstallBase between 5 and 6

+ Install Horde Base Application

++ Install base application and dependencies

Inside your Root Project,Project (/srv/www/horde/), run

<code>
composer installsudo -u www-data composer require horde/mnemo:^v5 horde/nag:^v5 horde/imp:^v7  horde/kronolith:^v5 horde/turba:^v5 horde/ldap:^v3 horde/activesync:^v3 horde/passwd:^v6 horde/ingo:^v4  horde/trean:^v2 horde/whups:^v4 horde/form:^v3
</code>

++ Provide minimal configuration

Assuming you are inside the installation's root dir

<code>
## 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
composer horde-reconfigure
</code>

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 /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:
<code>
$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';
</code>

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
<code>
/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
</code>

+++ Setup the database tables
Run this command:
<code>
 ./vendor/bin/horde-db-migrate up
</code>

+++ Set authentication to SQL

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

<code>
$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;
</code>

Please only add configs above the footer line unless you know what you are doing
<code>
/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
</code>

+++ 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>

<code>
 ./vendor/bin/hordectl patch user administrator adminpw
</code>

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:

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