GoAdmio

roundcube

Install or reinstall Roundcube webmail (default version 1.6.19), create its MariaDB database, and configure it for GoAdmio's mail server

On this page: Overview · Quick start · Syntax · Arguments · Output · Examples · Troubleshooting · Details · Security · See also


Overview

/go/roundcube downloads a Roundcube release from GitHub and sets it up as the webmail application for the server. It:

[!WARNING] This command replaces the existing Roundcube install. It does not upgrade in place. The old folder is deleted before the new version is downloaded. See Reinstalling and upgrading.


Quick start

# Install the default version (1.6.19) with MariaDB
/go/roundcube

Syntax

/go/roundcube [version] [--ssl] [--sqlite] [--mysql] [--silent]

The command writes the call and a timestamp to /var/log/go/roundcube.log. It uses sudo for each step, so run it as root or as a user with sudo rights.


Arguments

Argument Required Default Notes
version No 1.6.19 A Roundcube release tag, such as 1.6.10. It must be the first argument.
--ssl No Off Send mail over SSL (port 465) using the server hostname's certificate. See SMTP settings.
--sqlite No Off Use a SQLite database file instead of MariaDB. See the warning below.
--mysql No On Accepted, but it is already the default.
--silent No — Accepted, but this script does nothing different when it is used.

If the first argument is empty or is one of --silent, --ssl, --mysql, or --sqlite, the version is set to 1.6.19. This means a version placed after a flag is ignored:

Command Version installed
/go/roundcube 1.6.10 --ssl 1.6.10
/go/roundcube --ssl 1.6.10 1.6.19 (the 1.6.10 is ignored)

The flags --ssl and --sqlite are found anywhere in the arguments.

SQLite mode

With --sqlite, the configuration points Roundcube at roundcube.db inside the Roundcube folder. The command that would create the SQLite tables is commented out in the script, so the tables are not created. The MariaDB database and user are still created. Load the SQLite schema yourself, or don't use --sqlite.


Output

The command shows a progress bar titled Installing Roundcube <version> Webmail. There are no success or error messages. Errors from the database import are hidden, and the script doesn't check whether the download worked. Confirm the result by opening the webmail address.


Examples

# Default version, MariaDB
/go/roundcube
# A specific version, with SMTP over SSL
/go/roundcube 1.6.10 --ssl
# Default version, with SMTP over SSL
/go/roundcube --ssl
# Review recent calls
tail /var/log/go/roundcube.log

Troubleshooting

Symptom Likely cause Fix
Webmail is gone after a run The version doesn't exist or GitHub couldn't be reached. The old install was already deleted. Run again with a valid version, and check that the server can reach github.com.
Requested version was ignored The version was not the first argument. Put the version first: /go/roundcube 1.6.10 --ssl.
Database error page with --sqlite The SQLite tables were never created. Load the SQLite schema, or reinstall without --sqlite.
Login uses the wrong IMAP server A hostname in the IMAP setting is not used. See IMAP settings. Use [Domain], or edit config.inc.php by hand.
--ssl used, but mail still goes to port 587 /etc/letsencrypt/live/<hostname> doesn't exist. Install the hostname's certificate (see mailssl), then run again.
Errors after installing a newer version over an old one Roundcube's database was not updated to the new schema. Run Roundcube's bin/updatedb.sh in the install folder.
Contacts and settings lost after a run with --sqlite The SQLite file lived in the deleted folder. Back it up first, or use MariaDB.
Files owned by the wrong user The OS name isn't one the script recognizes, so ownership was not set. Set the owner to apache (RHEL family) or www-data (Debian, Ubuntu).
PHP warning about brevo.php The file /usr/local/goadmio/home/go/webmail/brevo.php is missing. Create it with brevo.

Details

What it does

  1. Records the call in /var/log/go/roundcube.log.
  2. Loads /go/function and reads the server hostname from /etc/hostname.
  3. Reads the IMAP hostname setting from /var/lib/sqlite/config.db, if that file exists.
  4. Generates a random 16-character database password and runs GRANT ALL PRIVILEGES ON roundcube.* for 'roundcube'@'localhost'. This creates the user, or resets its password if it exists.
  5. Deletes the old roundcube folder in /usr/local/goadmio/home/go/webmail.
  6. Downloads roundcubemail-<version>-complete.tar.gz from the Roundcube GitHub releases, unpacks it, and renames the folder to roundcube.
  7. Creates the roundcube database if it doesn't exist and imports SQL/mysql.initial.sql as the roundcube user. Errors are hidden.
  8. Writes config/config.inc.php from scratch.
  9. Sets ownership for the web server.
  10. Replaces login.php with a copy of roundcube-login.php from the webmail folder.
  11. Deletes the installer folder.

Nothing is restarted. The new files are used on the next request.

flowchart TD
    A["roundcube [version] [flags]"] --> B["Log the call, read hostname and IMAP setting"]
    B --> C["Create database user with new random password"]
    C --> D["Delete old install"]
    D --> E["Download and unpack release from GitHub"]
    E --> F["Create database and import MariaDB schema"]
    F --> G["Write config.inc.php"]
    G --> H["Set ownership, copy custom login.php, remove installer"]

Install location

Item Path
Roundcube folder /usr/local/goadmio/home/go/webmail/roundcube
Configuration /usr/local/goadmio/home/go/webmail/roundcube/config/config.inc.php
Brevo settings (included by the configuration) /usr/local/goadmio/home/go/webmail/brevo.php
Custom login page (copied in) /usr/local/goadmio/home/go/webmail/roundcube-login.php
SQLite file (--sqlite only) /usr/local/goadmio/home/go/webmail/roundcube/roundcube.db
Log /var/log/go/roundcube.log

IMAP settings

The IMAP host and SMTP login come from the IMAP hostname setting in GoAdmio's Config table.

IMAP hostname setting IMAP host written SMTP login written
Empty, or the config database is missing localhost The user's own login (%u / %p)
[Domain] %s: the domain part of the email address typed at login Empty (no SMTP username or password)
Any value containing a dot, such as mail.example.com %s, same as [Domain]. The hostname itself is not written. Empty
Any other value localhost The user's own login

The IMAP port and encryption are not set by this script, so Roundcube's defaults apply.

SMTP settings

Condition SMTP server Port
--ssl was passed and /etc/letsencrypt/live/<hostname> exists ssl://<hostname> 465
Anything else (including --ssl without the certificate) localhost 587

Fixed settings

Setting Value
Skin elastic
Plugins archive, zipdownload
Product name Roundcube Webmail
Support URL Empty
Drafts, Junk, Sent, Trash folders Drafts, Junk, Sent, Trash, created automatically

Reinstalling and upgrading

Running the command again, or with a different version, deletes the whole Roundcube folder and installs fresh. The settings file is rebuilt, and the database password is changed to match.

Data Survives a re-run?
MariaDB data (contacts, identities, settings) Yes. The database is kept, and the schema import is skipped silently because the tables already exist.
SQLite file (--sqlite) No. It is inside the deleted folder.
Manual edits to config.inc.php No. The file is rewritten.
Other changes made inside the Roundcube folder No.

The command does not run Roundcube's own database update. When you install a newer version over an existing database, run bin/updatedb.sh from the install folder.


Security


See also

Command Description
snappymail Install or upgrade SnappyMail webmail while preserving data
installmail Install and configure webmail services (Postfix and Dovecot)
mailssl Install SSL certificates for SMTP and IMAP
checkimap Check the IMAP hostname, its DNS record, and the SSL certificate
brevo Set up Brevo email sending for your domains
hostname Change the server hostname and set up GoAdmio, mail, and SSL for it
installmariadb Install or upgrade MariaDB