# Trying to reference a golang binary from my job, but nomad is looking in /opt/nomad/

**URL:** <https://discuss.hashicorp.com/t/trying-to-reference-a-golang-binary-from-my-job-but-nomad-is-looking-in-opt-nomad/76862>\
**Category:** Nomad\
**Created:** [November 28, 2025, 4:37am UTC](https://discuss.hashicorp.com/t/trying-to-reference-a-golang-binary-from-my-job-but-nomad-is-looking-in-opt-nomad/76862 "2025-11-28T04:37:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![salmandev](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/salmandev/32/44161_2.png) [@salmandev](https://discuss.hashicorp.com/u/salmandev)\
**Post date:** [November 28, 2025, 4:37am UTC](https://discuss.hashicorp.com/t/trying-to-reference-a-golang-binary-from-my-job-but-nomad-is-looking-in-opt-nomad/76862/1 "2025-11-28T04:37:06Z")

</div>

Nomad version v1.11.0

```auto
job "acmeapp-api" {

  datacenters = ["dc1"]

  type = "service"

  group "api" {

    count = 1

    network {

      port "http" {

static = 8080

        to = 8080

      }

    }

    task "api-server" {

      driver = "exec"

      config {

        command = "/opt/acmeapp/bin/acmeapp-api"

      }

...

    }

  }

```

> failed to launch command with executor: rpc error: code = Unknown desc = file /opt/acmeapp/bin/acmeapp-api not found under path /opt/nomad/alloc/92eda276-1b80-4a83-996d-e3b82b27e7c0/api-server

I can confirm the file exists at path /opt/acmeapp/bin/acmeapp-api

But during deployment of the job, nomad creates an alloc and thats’ a dynamic path.

How can I reference this binary file correctly?

---

<div class="post-metadata">

**Author:** ![Kamilcuk](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@Kamilcuk](https://discuss.hashicorp.com/u/Kamilcuk)\
**Post date:** [November 28, 2025, 8:38am UTC](https://discuss.hashicorp.com/t/trying-to-reference-a-golang-binary-from-my-job-but-nomad-is-looking-in-opt-nomad/76862/2 "2025-11-28T08:38:43Z")

</div>

Hello. Exec mounts only specific directories. See nomad docunentation of exec task driver and add needed directories there. [Configure the Isolated Fork/Exec task driver | Nomad | HashiCorp Developer](https://developer.hashicorp.com/nomad/docs/deploy/task-driver/exec#chroot) Or use raw\_exec.
