# APM server using Docker

**URL:** <https://discuss.elastic.co/t/apm-server-using-docker/216134>\
**Category:** APM\
**Tags:** ruby\
**Created:** [January 22, 2020, 8:58pm UTC](https://discuss.elastic.co/t/apm-server-using-docker/216134 "2020-01-22T20:58:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sudostack](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sudostack/32/40738_2.png) [@sudostack](https://discuss.elastic.co/u/sudostack)\
**Post date:** [January 22, 2020, 8:58pm UTC](https://discuss.elastic.co/t/apm-server-using-docker/216134/1 "2020-01-22T20:58:30Z")

</div>

**APM Server version** : 7.5.2

**APM Agent language and version** : Ruby / 3.4.0

I'm attempting to start the APM server locally using directions found here: [Running APM Server on Docker | APM Server Reference [7.5] | Elastic](https://www.elastic.co/guide/en/apm/server/7.5/running-on-docker.html#CO1-2)

```
docker run -d \
--name=apm-server \
--user=apm-server \
--volume="$(pwd)/apm-server.docker.yml:/usr/share/apm-server/apm-server.yml:ro" \
docker.elastic.co/apm/apm-server:7.5.2 \
--strict.perms=false -e \
-E output.elasticsearch.hosts=["elasticsearch:9200"]

```

> If you are using the hosted Elasticsearch Service in Elastic Cloud, replace the `-E output.elasticsearch.hosts` line with the Cloud ID and elastic password using the syntax shown earlier.

I'm using a hosted instance. However, I'm unsure about how the command changes with the above instruction as the part that reads, "using the syntax shown earlier" doesn't seem to have an example.

Any help would be greatly appreciated!

---

<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:** [January 22, 2020, 11:12pm UTC](https://discuss.elastic.co/t/apm-server-using-docker/216134/2 "2020-01-22T23:12:37Z")

</div>

That documentation is indeed confusing. It is referring to [this page](https://www.elastic.co/guide/en/apm/server/current/configure-cloud-id.html) and trying to communicate that you should instead use:

```auto
-E cloud.id="id" -E cloud.auth="user:pass"

```

Since you're bind mounting the configuration into the container, I'd suggest putting that the config file instead, so at least the password doesn't show up in the process table. Concretely, that would be:

```auto
cloud.id: id
cloud.auth: user:pass

```

---

<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:** [February 12, 2020, 7:12pm UTC](https://discuss.elastic.co/t/apm-server-using-docker/216134/3 "2020-02-12T19:12:38Z")

</div>

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