# Can I specify several dars to be uploaded when using the \`daml start\` command?

**URL:** <https://forum.canton.network/t/can-i-specify-several-dars-to-be-uploaded-when-using-the-daml-start-command/4770>\
**Category:** App Development\
**Created:** [June 21, 2022, 12:46pm UTC](https://forum.canton.network/t/can-i-specify-several-dars-to-be-uploaded-when-using-the-daml-start-command/4770 "2022-06-21T12:46:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [June 21, 2022, 12:46pm UTC](https://forum.canton.network/t/can-i-specify-several-dars-to-be-uploaded-when-using-the-daml-start-command/4770/1 "2022-06-21T12:46:47Z")

</div>

I know I can pass several dars to the `daml sandbox` command to be uploaded to Sandbox.

In addition to uploading several dars, I also would like to run a script after Sandbox is ready, which is possible using the `--on-start` option of the `daml start` command.

I would like to combine these two features.

---

<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:** [June 21, 2022, 12:51pm UTC](https://forum.canton.network/t/can-i-specify-several-dars-to-be-uploaded-when-using-the-daml-start-command/4770/2 "2022-06-21T12:51:37Z")

</div>

There is no builtin feature for this. You have a few options:

1. Don’t use daml start. You can use `daml sandbox --port-file portfile` and then wait for `portfile` to be created as an indication that sandbox is up. Even in something like a bash script waiting for a file to be created is reasonably simple.
2. A DAR includes its dependencies. So if your project depends on other DARs, those should get uploaded as well. Note that you actually need to use them though (as in have a reference to them). Just putting them in `data-dependencies` isn’t going to include them.
3. You could put `daml ledger upload-dar` commands in your `on-start` script.

---

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [June 21, 2022, 12:53pm UTC](https://forum.canton.network/t/can-i-specify-several-dars-to-be-uploaded-when-using-the-daml-start-command/4770/3 "2022-06-21T12:53:40Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![rikotacards](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@rikotacards](https://forum.canton.network/u/rikotacards)\
**Post date:** [June 21, 2022, 4:20pm UTC](https://forum.canton.network/t/can-i-specify-several-dars-to-be-uploaded-when-using-the-daml-start-command/4770/4 "2022-06-21T16:20:12Z")

</div>

For some practical examples, in my `start.sh` file, I have something like :

```haskell
cantonPortFile="./canton-sandbox-port.txt"
jsonApiPortFile="./json-api-port.txt"

```

```haskell
  daml sandbox --dar main/Asset/asset.dar --dar main/User/user.dar --dar main/Account/account.dar --port-file ${cantonPortFile}

```

The below waits for the sandbox file to be created, then you can run another command after, for example, I’ll allocate parties.

```haskell
waitForSandBox(){
  while [! -f "$cantonPortFile"];
    do
      echo "Setting up sandbox..."
      if ["$timeout" == 0]; then
        echo "ERROR: Timeout while waiting for the file ${cantonPortFile}"
        exit 1
      sleep 2 # or less like 0.2
      fi
      sleep 1
      ((timeout--))
    done
  echo "Canton sandBox setup complete"
}

```

The json api server can also create a port-file, which outputs the file once the server is setup, which you can then run triggers.

```haskell
{
    server {
      address = "localhost"
      port = 7575
      port-file="json-api-port.txt"
    }
    ledger-api {
      address = "localhost"
      port = 6865
    }  
}

```
