Skip to content

🖐️ Unable to use remote runner host via SSH #5852

Closed

Description

@skycaptain

What happened? What did you expect to happen?

With #5415 (released with v0.8.0) the engine client was refactored and the SSH connection helper from buildkit was added.

Knowing that _EXPERIMENTAL_DAGGER_RUNNER_HOST is experimental as the name suggest and not officially supported, I though I'd give it a try.

Using a remote host via SSH with buildx is rather easy and straight forward using:

docker buildx create --name my-remote-host ssh://[email protected]

Since newBuildkitClient uses the buildkit client, I thought this should work now:

export _EXPERIMENTAL_DAGGER_RUNNER_HOST="ssh://[email protected]"
dagger run ...

However, when I run this command the dagger CLI timeouts with new client: context deadline exceeded after 10 minutes. I double checked that the machine is reachable via SSH and also buildx works fine.

Has anyone some hints on how to debug this any further?

Activity

  1. sipsma commented on Oct 11, 2023

    @sipsma
    Contributor

    @skycaptain if you call dagger run with --focus=false, do you get any more output with actual helpful error messages? Wondering if we could be swallowing the errors by default on accident in this case.

    Also, when you are calling dagger run and pointing to ssh://[email protected], is the my-remote-host.local machine running the dagger engine? Or is it the same host you provisioned with docker buildx create?

    If you are trying to connect to a host that was provisioned via buildx then it's not expected to work at this time. Dagger has a bit of divergence from the buildkitd that buildx uses.

    We have some advanced "power-user" docs on provisioning a custom dagger engine runner here if you are interested in setting up a custom runner.

    As you can probably tell, this exact use case is still considered "advanced" at the moment and not incredibly well polished yet 🙂 But happy to work through this with you if you can tolerate a bit more bumpy ride than ideal.

  2. skycaptain commented on Oct 24, 2023

    @skycaptain
    ContributorAuthor

    Thanks for having a look.

    @skycaptain if you call dagger run with --focus=false, do you get any more output with actual helpful error messages? Wondering if we could be swallowing the errors by default on accident in this case.

    Sry, no more output, just:

    $ dagger run ...
    ┣─╮ 
    │ ▽ init
    │ █ [30.00s] ERROR connect
    │ ┣ [30.00s] starting engine
    ┻ ┻ 
    
    ⧗ 30.02s  ✔ 1 ✘ 1
    new client: context deadline exceeded
    

    Don't mind the 30s. I recompiled the CLI to fail after 30s instead of 10 minutes to debug faster.

    Perhaps the issue is due to a wrong assumption on my part. Should the engine already be running on the remote system? In other words, do I need to start it manually? Additionally, does the engine need to run natively on the remote system, or can it also run inside a container? If it can run inside a container, how does the CLI know which container to connect to? For example, with Buildx, you can set the remote address as mentioned above, and it will automatically start the engine inside a container and connect to it if you're using the docker-container driver. This is really convenient, as it allows multiple users to utilize the same high-performance workstation, each with their own engine instance. I'm curious if the same is possible with Dagger. Would be happy to assist in getting this feature.

  3. locked and limited conversation to collaborators on Mar 24, 2026
  4. converted this issue into a discussion #12445 on Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions