GroundWork recommends having the GroundWork Monitor application start on system reboot or power on. This allows you to ensure that monitoring automatically starts after power failures or crashes that require a reboot of the host that runs the GroundWork Monitor containers. Doing so entails adding a unit file to restart the system with
Script vs. Docker daemon
Using this method is necessary due to the fact that GroundWork containers have specific timing dependencies, which are handled in the
docker-compose.yaml file. While Docker experts may point out that it is possible to use Docker's own daemon to restart containers, we have found that doing so is not as reliable as using the system control scripts.
Add gw8.service file to /etc/systemd/system
Log in as a privileged user (with sudo rights) to your GroundWork server.
If you are not using the user that you used to install GroundWork 8, then become that user, e.g., if you installed as user
Check where the
docker-composebinary is by typing:
This will give you a path to the binary of
docker-compose, for example:
Type exit to become the user with sudo access if necessary.
docker-composeis not at
/usr/bin/docker-compose, then add a symlink to that location, for example:
Edit the file:
This file may or may not exist, depending on whether you have previously installed GroundWork Monitor.
Insert the following content:
Edit the lines for
Groupto mach your installation. For example, if you installed GroundWork 8 in the
/home/gwosdirectory as user
gwos, and added the gwos user to the docker group, then these lines would look like this:
- Save the file.
Change the ownership of the file to be user
Enable the service:
If you have the authority to pause monitoring, reboot the host as a test. When it comes up, log in as the user you installed GroundWork as, then go to the gw8 directory, and type:
You should see a listing of the GroundWork Monitor containers, all with Status "Up".