Dokploy / Dokploy/dokploy

SSH keys not working for private repo builds (SSH_AUTH_SOCK empty)

Open
#2,913 4 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
37.4k
Forks
3k
Avg merge
1d 3h
Merged PRs (30d)
73

Description

What problem will this feature address?

When deploying a Docker Compose app that builds from a private GitHub repo (e.g. git@github.com:uptoamir/******#develop), the build fails with:

invalid empty ssh agent socket: make sure SSH_AUTH_SOCK is set

Dokploy’s SSH keys (added under Core → SSH Keys) are not forwarded to BuildKit during the build.

Expected:
Dokploy should automatically forward configured SSH keys to Docker builds so private repos can be cloned without manual tokens or workarounds.

Workaround:
Use HTTPS + GITHUB_TOKEN or push a prebuilt Docker image.

Environment:
Self-hosted Dokploy (Hetzner VPS, Ubuntu 22.04)

Describe the solution you'd like

Support Docker-compose within private repo dependencies.

Describe alternatives you've considered
Using an HTTPS build context with a GitHub personal access token (GITHUB_TOKEN) — works, but less secure and not ideal for CI/CD.
•	Manually building the Docker image locally or in CI, then pushing it to Docker Hub — functional but adds extra steps and breaks Dokploy’s one-click deployment flow.
•	Switching to Coolify, which supports private repo cloning via OAuth and SSH agent forwarding automatically.

These workarounds confirm the issue is specific to Dokploy’s lack of SSH agent forwarding during builds.

Additional context

No response

Will you send a PR to implement it?

No

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Core → SSH Keys configuration and the Docker Compose build path, then inspect how BuildKit receives build options. Done means a private GitHub dependency builds using a configured Dokploy SSH key without HTTPS tokens or manual workarounds.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, github, typescript
Domain
devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.