# Can I control the address the sandbox is binding to when starting up?

**URL:** <https://forum.canton.network/t/can-i-control-the-address-the-sandbox-is-binding-to-when-starting-up/459>\
**Category:** App Development\
**Tags:** sandbox\
**Created:** [May 13, 2020, 7:21pm UTC](https://forum.canton.network/t/can-i-control-the-address-the-sandbox-is-binding-to-when-starting-up/459 "2020-05-13T19:21:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![georg](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/georg/32/368_2.png) [@georg](https://forum.canton.network/u/georg)\
**Post date:** [May 13, 2020, 7:21pm UTC](https://forum.canton.network/t/can-i-control-the-address-the-sandbox-is-binding-to-when-starting-up/459/1 "2020-05-13T19:21:14Z")

</div>

I’m running the sandbox inside a Docker container and it seems to bind to `localhost`, which doesn’t allow me to access the process from the outside. Is there a way to control that? I skimmed the documentation but could find anything.

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [May 13, 2020, 7:22pm UTC](https://forum.canton.network/t/can-i-control-the-address-the-sandbox-is-binding-to-when-starting-up/459/2 "2020-05-13T19:22:16Z")

</div>

By default sandbox listens on localhost. You can change that using `daml sandbox --address 0.0.0.0` (`-a 0.0.0.0` works as a short form) to listen on all interfaces or specify a specific external IP that you want to listen on.

---

<div class="post-metadata">

**Author:** ![georg](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/georg/32/368_2.png) [@georg](https://forum.canton.network/u/georg)\
**Post date:** [May 13, 2020, 7:28pm UTC](https://forum.canton.network/t/can-i-control-the-address-the-sandbox-is-binding-to-when-starting-up/459/3 "2020-05-13T19:28:21Z")

</div>

Thanks, that did the trick. My docker run command looks as follows:

```haskell
docker run -p 6865:6865 digitalasset/daml-sdk:1.0.1 /bin/bash -c 'daml sandbox --address=0.0.0.0 --ledgerid=test'

```

Note that I had to use `-p 6865:6865`, if I just use `-p 6865` it doesn’t work. I’m not sure the difference, but I’m no docker expert.

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [May 13, 2020, 7:39pm UTC](https://forum.canton.network/t/can-i-control-the-address-the-sandbox-is-binding-to-when-starting-up/459/4 "2020-05-13T19:39:32Z")

</div>

If you omit the host port, docker expose the given container port on a random port on the host. You can use `docker port <containername>` to see the mapping.
