This article was originally published by Merijn at 14th of May and here I am just adding some more info to an article . The original article is avalible at https://www.group-office.com/blog/post?id=1292351958275005706
This is a walkthrough on how to install Group-Office on a Synology NAS with docker. Make sure you’ve installed Docker via the Synology package center.
- Launch Docker
- Go to the “Registry” tab and search for “mariadb”. Double click to download the latest:
- Search for “groupoffice” and install the latest “intermesh/groupoffice”:
- Go to the image tab and double click “maridb” to create a container called “godb”.
- Click on “Advanced Settings” and set in the “Environment” tab: MYSQL_USER=groupofficeMYSQL_PASSWORD=groupofficeMYSQL_DATABASE=groupofficeMYSQL_ROOT_PASSWORD=groupoffice
- Create a folder for the “/var/lib/mysql” volume in the “Volumes” tab.
- Click “Apply” to create the container.
- Now double click the “intermesh/groupoffice” container and go to the “Advanced Settings”.
- In the “Links” tab create a link to “godb” and call it “db”:
- Review the “Environment” tab. Set apache server name and email:
- Check the port settings and launch your browser to the host and port. You should see the Group-Office installation screen. If you get the message “Please create a writable config.,ini” file then either /var/lib/groupoffice is not writable or the database connection can’t be established. Please review those if you get that message.
You will definitively get two errors that are related with the GO instance. It is not just in docker. It is basically in every instalation of GO that have ever done.
config.php is not writable
A usuall error you will get (and it is related to almost every Groupoffice) is a non-writable config.php. So you have to locate the config.php /etc/groupoffice. The file is just config.php. NOT config.php.ini, NOT config.ini. Just config.php. and it is by default already created in GO. Basically it just has (probably) a security permission set by default. So durning t just chmod 777 to this file. In a Deb instalation it is simple, in a docker, you have to login to the cli of synology NAS, execute sudo su to log in as a root and the execute a command to get to the container. Firstly Use a command
to see you containers. I just wanna be sure you have the default name intermesh-groupoffice1. If yes, then go to the container by executing
docker exec -it intermesh-groupoffice1 bash
Here, go to /etc/gropupoffice and
chmod 777 config.php
After the instalation, you can change the permission back if you wanna.
DB can not connect
Another problem you will face is the problem to connect to a DB. It tells you something like user groupoffice@IP can not connect. Solution is simple. The DB is inside the intermesh-groupoffice1 container.So execute inside, connect to a db with a command
mysql -u root -p
The default password is groupoffice. Here, create a new user for example groupoffice1 by a command
CREATE USER 'groupoffice1'@'172.17.0.3' IDENTIFIED BY 'yourpassword';
Notice, that we create a user based on IP, not as a localhost. You will find the IP in the GO instalation error. In my case it was 172.17.0.3 in a Synology container. In your case it can be a different IP address.
Then grant to a new user permissions to access groupoffice database by executing a command in mysql
GRANT ALL PRIVILEGES ON groupoffice.* TO 'groupoffice1'@'172.17.0.3';
Done. Just for sure stop both containers, in mariadb check variables in both containers that define a new username and password and change them in mariadb and in intermesh-groupoffice1. See below an example
In my case when I was hopeless, I also created a new user groupoffice1 with new password in mariadb container. So I am not sure, if the error ir related to GO container or mariadb.