Link with Systemd

If you would like to run the Link Agent as a systemd service, you can use the following template and customize it to your environment:

Description=mabl Link Agent

ExecStart=/opt/mabl/link-agent/bin/link-agent -a <your-api-key> -n <your-agent-name>



This service file needs to be customized before it can be used

At a minimum you will need to update the the ExecStart parameter with your actual API key, Link Agent name, and the path where you have installed the Link Agent.

We recommend creating a separate user and group called mabl (or similar) and using chown to ensure that only this user/group can read/write the directory where the Link Agent is installed. If you would like to use a user other than mabl, please update the User parameter in the service file.


Specifying JAVA_HOME

If the path to Java is not picked up automatically, or you need to specify a different version of Java than your system default, insert the following line under the [Service] section of the service file:


For example, if the version of Java that you would like to use is installed at /usr/lib/jvm/openjdk-bin-17, the line would be:


Once you have finished customizing the above template to your system and environment, save the file as link-agent.service in the location on your system where service files are defined, such as /etc/systemd/system, then execute the following commands:

systemctl enable link-agent
systemctl start link-agent

To verify that the agent has started up properly, use journalctl

journalctl -u link-agent -r

You can also look at the logs/agent.log file in the directory where the agent is installed.