Guide to Horde Data Behavior


Last modified: October 29, 2020

Overview

cPanel & WHM’s Horde user data storage uses individual SQLite databases for each cPanel account. Horde webmail and CalDAV/CardDAV services execute as the cPanel account user. This document explains the methods that the system uses to manage Horde data.

New installations

The system stores Horde user data into the new location from the installation.

Horde components and table schemas

Horde user data storage uses many components which include, but are not limited to, the following modules:

  • Horde Application Framework
  • IMP (Mail)
  • Ingo (Mail Filters)
  • Kronolith (Calendar)
  • Mnemo (Notes and Memos)
  • Nag (Task List)
  • Trean (Bookmark Manager)
  • Turba (Address Book).

Scripts

The update_horde_config script

The /usr/local/cpanel/bin/update_horde_config script:

  • Does not add database credentials to /usr/local/cpanel/base/horde/config/conf.php file. The SQLite database uses filesystem permissions for access control.
  • Handles the initial creation of cPanel account SQLite database for Horde.
  • Performs schema checks and upgrade operations with the --full option.

For more information, run the /usr/local/cpanel/bin/update_horde_config --help command.

The SQLite Horde database and the cphorde directory

Each cPanel account possesses its own .cphorde directory under the account’s home directory. The .cphorde directory contains the following items:

  • horde.sqlite (SQLite database) — This database contains the cPanel account’s Horde data.
  • meta (Directory) — The backup service uses this directory to create the Horde database backups.
  • vfsroot (Directory) — The /usr/local/cpanel/base/horde/config/conf.php file uses this directory for the vfsroot setting.

The conf.php file

Important:

cPanel account users must have permissions to this file.

The following applies to the /usr/local/cpanel/base/horde/config/conf.php file:

  • This file does not contain Horde database credentials or a server-specific MySQL® password. The sql entries in this file only contain the generic SQLite setup configuration.
  • This file’s permission is world-readable.

Horde database troubleshooting and repair

You can use the following section to troubleshoot problems for each cPanel account’s Horde SQLite database.

Warning:

If you delete a cPanel account’s Horde SQLite database, you will lose all of that account’s calendar and contact information.

Reset horde database password.

You cannot perform this action. The SQLite database relies on filesystem permissions for access control, not a password.

Create a missing database for cPanel user

Use the following script, where USERNAME is the cPanel account’s username:

/usr/local/cpanel/bin/update_horde_config --user=USERNAME

Create missing databases for all cPanel users on the system

Use the /usr/local/cpanel/bin/update_horde_config script.

Upgrade tables or create missing tables in an existing database for a cPanel user

Use the /usr/local/cpanel/bin/update_horde_config script with the --full option, where USERNAME is the cPanel account’s username:

/usr/local/cpanel/bin/update_horde_config --user=USERNAME --full
Note:

The --full option instructs the script to perform the full table schema check and upgrade/repair instead of only checking whether the database exists.

Upgrade tables or create missing tables in the existing databases for all users on the system

Run the following script:

/usr/local/cpanel/bin/update_horde_config --full
Warning:

This script may require significant time to execute on systems with many accounts.

Move and re-create a new horde database for a cPanel user with the default calendars and address books

  1. Move the user’s file, where USERNAME is the cPanel account’s username:
    mv ~USERNAME/.cphorde/horde.sqlite ~USERNAME/.cphorde/horde.sqlite.bak
  2. Run the following script:
    /usr/local/cpanel/bin/update_horde_config --user=USERNAME --create-defaults

Additional Documentation