skip to main content
Admin Guide > Appendix D: ICE Agent Operation > Installing ICE Agent > Installing ICE Agent as a Linux Systemd Service
Installing ICE Agent as a Linux Systemd Service
*Running ICE Agent as a Linux systemd service allows systemd to automatically restart ICE Agent in the event of a failure.
Preparation
*First, follow the instructions in Installing ICE Agent as a Native Command-Line Application to install ICE Agent as a native application.
*Next, follow the Verifying ICE Agent installation using Doctor instructions to ensure your ICE Agent is running correctly.
*Finally, when you are ready, perform the procedure below.
To install ICE Agent as a Linux Systemd service
1. Execute the agent in the mode that you wish to deploy (for example, agent external patch). If it is already running then you can skip this step.
2. Once the agent has successfully initialized and is running as intended, stop the application by pressing CTRL+C.
3. Run the agent a second time using the same arguments you did previously but add --systemd followed by the name of the service as the first argument (the service name must end in .service), for example:
agent --systemd agent.service external patch
If successful, the command will return a message similar to the following:
Systemd service unit written to /Users/matt/Downloads/agent.service.
Install service with:
sudo cp /Users/matt/Downloads/agent.service /etc/systemd/system/
sudo systemctl enable agent.service
sudo systemctl start agent.service
Note: This command does not actually start the Agent as an external patch server; the presence of the --systemd argument causes the agent to write a Systemd service unit file and exit.
4. Follow the onscreen instructions to copy the .service file to your systemd directory, and enable and start the service. Use the command sudo systemctl status agent.service to confirm the service is running successfully.
5. To change the user and group that the ICE Agent service will execute using, pass the --systemd-user and --systemd-group arguments. For example:
agent --systemd agent.service external patch