Running agent as a service

 

 

 

 

  Important

 

To run the agent as a service:

  • You must have admin privileges on Windows or root privileges on Mac or Linux.

  • The JAVA_HOME environment variable must be set (defining the path to your JAVA folder).

 

 

 

You can run the agent as a service on Windows, Mac or Linux. When the agent is running as a service, it restarts automatically when your machine is restarted.

Installing the agent as a service

  1. Run the agent jar from the admin command prompt on Windows or with sudo on Mac or Linux and register the agent's API key.

  2. At the bottom right of the Agent Management page on the local host, click Run agent as a service and wait for the install process to complete.

 

 

  Tip

 

 

Alternatively, you can install the agent as a service from the command prompt on Windows or with sudo on Mac or Linux:

java -Xms512M -Xmx1G -jar agent.jar service install

 

 

 

 

The service will start automatically.

Starting and stopping the service

Once the agent is installed as a service, you can start or stop it as any other service process. For example, on Windows, you can start and stop it from the Task Manager by right-clicking the service name and clicking Start Service or Stop Service:

 

  Tip

 

Starting and stopping services from the Task Manager requires admin privileges. You can click Show processes from all users at the bottom of the Task Manager window to switch to the admin mode.

 

 

 

Alternatively, you can start and stop the service from the command prompt on Windows or with sudo on Mac or Linux.

To start the service:

java -Xms512M -Xmx1G -jar agent.jar service start

To stop the service:

java -Xms512M -Xmx1G -jar agent.jar service stop

Uninstalling the service

You can uninstall the service from the command prompt on Windows or with sudo on Mac or Linux:

java -Xms512M -Xmx1G -jar agent.jar service uninstall

Installing multiple agents as a service

On Windows, you can install two or more agents as a service from the command prompt using the servicename parameter; for example:

java -Xms512M -Xmx1G -jar agent.jar servicename:MediaAgent1 service install

java -Xms512M -Xmx1G -jar agent.jar servicename:MediaAgent2 service install

If you are running multiple agents as Windows services, you can use the servicename parameter to start, stop or uninstall a specific service on Windows; for example:

java -Xms512M -Xmx1G -jar agent.jar servicename:MediaAgent1 service start

java -Xms512M -Xmx1G -jar agent.jar servicename:MediaAgent1 service stop

java -Xms512M -Xmx1G -jar agent.jar servicename:MediaAgent2 service uninstall

 

  Note

 

Running more than one agent as a service on the same machine is not supported on Linux or MacOS.

 

 

 

 

 

 

 

 

If you still require additional assistance, please contact AP Customer Support.

For current system status or system maintenance information, please visit the AP Customer Zone website.

 

 

 

 

 

 

 

THE ASSOCIATED PRESS

© copyright 2025  Associated Press. All rights reserved.