Přeskočit obsah

GroupOffice in Docker on Synology NAS DS1019+

Language version

This article also has a Czech version.

TL;DR ✨

An article was published on the Intermesh company blog on May 14 and can be read in full at this link: https://www.group-office.com/blog/post?id=1292351958275005706. This article adds a few details concerning issues the author encountered during installation.

A common problem the author encounters with every new GroupOffice installation is that the config.php file is not writable. It therefore needs to be found and its permissions changed with chmod 777. The file is named only config.php. Some forums refer to config.ini or config.php.ini, but those names are incorrect. By default, GroupOffice creates only config.php.

An article was published on the Intermesh company blog on May 14 and can be read in full at this link: https://www.group-office.com/blog/post?id=1292351958275005706. This article adds a few details concerning issues the author encountered during installation.

  • Open Docker.
  • Go to "Registry" and search for MariaDB. Double-click it to download the latest version.
  • Search for "groupoffice" and install “intermesh/groupoffice”.

! - Go to Image and double-click MariaDB to create the godb container. - Click Advanced Settings and configure the environment variables. - MYSQL_USER=groupofficeMYSQL_PASSWORD=groupofficeMYSQL_DATABASE=groupofficeMYSQL_ROOT_PASSWORD=groupoffice

!

  • Create a new directory for “/var/lib/mysql” on the “Volume” tab.

! - Apply the changes. - Now double-click the “intermesh/groupoffice” container and go to Advanced Settings. - In the “Links” section, create a link to “godb” and name it “db”:

!

Go to “Volume” and mount the “/var/lib/groupoffice” directory:

! - Check the settings.

! - Start both containers, check which port the GroupOffice installer is listening on, and enter the NAS IP address and port in a browser. Two main errors that occur during almost every installation will probably appear.

!

✨ config.php is not writable

A common problem the author encounters with every new GroupOffice installation is that the config.php file is not writable. It therefore needs to be found and its permissions changed with chmod 777. The file is named only config.php. Some forums refer to config.ini or config.php.ini, but those names are incorrect. By default, GroupOffice creates only config.php. The fix is easy with a Debian installation; with Docker, it is first necessary to log in to the container and only then change the file permissions.

In the Synology NAS command line, log in as root using sudo su and enter:

docker ps

This displays all running containers. Find the one running GroupOffice and enter it:

docker exec -it intermesh-groupoffice1 bash

🔍 Go to /etc/gropupoffice and change the permissions

chmod 777 config.php

After installation, the permissions on config.php can be changed back.

🌐 The database cannot connect

Another problem concerns the database connection. During a Docker installation, an error appears stating roughly that the groupoffice@IP user cannot connect. The solution is simple. The database is in the intermesh-groupoffice1 container. Connect to it and then connect to MySQL:

mysql -u root -p

The default password is groupoffice. Create a new user there, for example groupoffice1, with this command:

CREATE USER 'groupoffice1'@'172.17.0.3' IDENTIFIED BY 'yourpassword';

Notice that the user is created for an IP address, not for localhost. The IP address is shown in the error message produced when trying to install GroupOffice. It is the same as the container's IP address. In the author's case, it was 172.17.0.3. Grant the newly created user permission to access the GroupOffice database with this MySQL command:

GRANT ALL PRIVILEGES ON groupoffice.* TO 'groupoffice1'@'172.17.0.3';

That is all. Stop both containers, go to Advanced Settings, and edit the user and password environment variables in both intermesh-groupoffice1 and the MariaDB container. An example is shown below.

! In the author's case, after becoming fairly desperate, he also changed the database access details in MariaDB. He created the new groupoffice1 user there as well, assigned it a new password, and granted it permission to access the GroupOffice database.

Installation can then continue according to the manual: https://www.group-office.com/blog/post?id=2084881479292726246