# How to run apm-server as service to run in background

**URL:** <https://discuss.elastic.co/t/how-to-run-apm-server-as-service-to-run-in-background/152850>\
**Category:** APM\
**Created:** [October 17, 2018, 1:35pm UTC](https://discuss.elastic.co/t/how-to-run-apm-server-as-service-to-run-in-background/152850 "2018-10-17T13:35:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arun5635](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@arun5635](https://discuss.elastic.co/u/arun5635)\
**Post date:** [October 17, 2018, 1:35pm UTC](https://discuss.elastic.co/t/how-to-run-apm-server-as-service-to-run-in-background/152850/1 "2018-10-17T13:35:11Z")

</div>

I have APM-SERVER and i using the command ./apm-server -e to run but If i check the status using sudo service apm-server status im get below error.  
sudo service apm-server status  
● apm-server.service - Elastic APM Server  
Loaded: loaded (/usr/lib/systemd/system/apm-server.service; disabled; vendor preset: disabled)  
Active: failed (Result: start-limit) since Wed 2018-10-17 13:29:47 UTC; 15s ago  
Docs: [https://www.elastic.co/solutions/apm](https://www.elastic.co/solutions/apm)  
Process: 15534 ExecStart=/usr/share/apm-server/bin/apm-server -c /etc/apm-server/apm-server.yml -path.home /usr/share/apm-server -path.config /etc/apm-server -path.data /var/lib/apm-server -path.logs /var/log/apm-server (code=exited, status=1/FAILURE)  
Main PID: 15534 (code=exited, status=1/FAILURE)

Oct 17 13:29:46 ip-172-31-11-136.us-west-2.compute.internal systemd[1]: Unit apm-server.service entered failed state.  
Oct 17 13:29:46 ip-172-31-11-136.us-west-2.compute.internal systemd[1]: apm-server.service failed.  
Oct 17 13:29:47 ip-172-31-11-136.us-west-2.compute.internal systemd[1]: apm-server.service holdoff time over, scheduling restart.  
Oct 17 13:29:47 ip-172-31-11-136.us-west-2.compute.internal systemd[1]: start request repeated too quickly for apm-server.service  
Oct 17 13:29:47 ip-172-31-11-136.us-west-2.compute.internal systemd[1]: Failed to start Elastic APM Server.  
Oct 17 13:29:47 ip-172-31-11-136.us-west-2.compute.internal systemd[1]: Unit apm-server.service entered failed state.  
Oct 17 13:29:47 ip-172-31-11-136.us-west-2.compute.internal systemd[1]: apm-server.service failed.

---

<div class="post-metadata">

**Author:** ![gil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gil/32/41911_2.png) [@gil](https://discuss.elastic.co/u/gil)\
**Post date:** [October 17, 2018, 2:27pm UTC](https://discuss.elastic.co/t/how-to-run-apm-server-as-service-to-run-in-background/152850/2 "2018-10-17T14:27:03Z")

</div>

@arun5635 To start apm-server with systemd, use `sudo service apm-server start` instead of `apm-server -e`. This should resolve the issues with `sudo service apm-server status`.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 7, 2018, 10:27am UTC](https://discuss.elastic.co/t/how-to-run-apm-server-as-service-to-run-in-background/152850/3 "2018-11-07T10:27:04Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
