feat: add automatic Rancher Desktop support for Docker socket detection#2681
Merged
Siumauricio merged 3 commits intoDokploy:canaryfrom Mar 24, 2026
Merged
Conversation
49af46c to
a32c778
Compare
a32c778 to
71d3a43
Compare
Contributor
Author
|
@Siumauricio i know you are busy, but this commit is a really small one and would allow more people to contribute |
|
Documentation Updates 2 document(s) were updated by changes in this PR: CONTRIBUTINGView Changes@@ -64,13 +64,19 @@
### Optional Docker Configuration
-The following environment variables can be added to your `.env` file if you need custom Docker daemon configuration:
-
-- **DOCKER_API_VERSION**: Specify which Docker API version to use (optional)
-- **DOKPLOY_DOCKER_HOST**: Specify a custom Docker daemon host (optional)
-- **DOKPLOY_DOCKER_PORT**: Specify a custom Docker daemon port (optional)
-
-These variables are typically not needed for standard local development but can be useful if you need to connect to a remote Docker daemon or require a specific Docker API version.
+Docker socket detection is automatic for local development. The system automatically detects and uses Docker sockets in the following order:
+
+- DOCKER_HOST environment variable (if set)
+- Rancher Desktop socket (~/.rd/docker.sock)
+- Standard Docker socket (/var/run/docker.sock)
+
+Contributors using Docker Desktop, Rancher Desktop, Colima, or other Docker alternatives can run `pnpm run dokploy:setup` without any additional configuration.
+
+The following environment variables are only needed for remote Docker host configurations:
+
+- **DOKPLOY_DOCKER_HOST**: Specify a remote Docker daemon host
+- **DOKPLOY_DOCKER_PORT**: Specify a remote Docker daemon port
+- **DOKPLOY_DOCKER_API_VERSION**: Specify which Docker API version to use (optional)
## Requirements
READMEView Changes@@ -34,15 +34,29 @@
### Docker Configuration
-Optional configuration for customizing Docker daemon connections:
+Dokploy automatically detects Docker sockets in the following priority order:
+
+1. **DOCKER_HOST** environment variable (if set)
+2. Rancher Desktop socket (`~/.rd/docker.sock`)
+3. Standard Docker socket (`/var/run/docker.sock`)
+
+This automatic detection means that Docker Desktop, Rancher Desktop, Colima, and other Docker alternatives work out-of-the-box without manual configuration.
+
+**Optional Environment Variables:**
+
+- **DOCKER_HOST** (optional) - Specifies a custom Docker socket path (e.g., `unix:///path/to/docker.sock`). When set, this takes priority over automatic socket detection.
- **DOCKER_API_VERSION** (optional) - Specifies which Docker API version to use when connecting to the Docker daemon. If not set, the Docker client uses the default API version.
-- **DOKPLOY_DOCKER_HOST** (optional) - Specifies the Docker daemon host to connect to. If not set, uses the default Docker socket connection.
-
-- **DOKPLOY_DOCKER_PORT** (optional) - Specifies the port for connecting to the Docker daemon. If not set, uses the default port.
-
-These variables allow advanced users to customize how the Dokploy API server connects to Docker, which can be useful for connecting to remote Docker daemons or using specific API versions.
+**Remote Docker Host Configuration:**
+
+For connecting to remote Docker daemons, use the following variables:
+
+- **DOKPLOY_DOCKER_HOST** (optional) - Specifies the remote Docker daemon host to connect to (e.g., `tcp://remote-host`).
+
+- **DOKPLOY_DOCKER_PORT** (optional) - Specifies the port for connecting to the remote Docker daemon.
+
+Note: `DOKPLOY_DOCKER_HOST` and `DOKPLOY_DOCKER_PORT` are intended for remote Docker host configurations. For local Docker installations, the automatic socket detection handles connection setup without requiring these variables.
## API Endpoints
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR about?
This PR adds automatic Rancher Desktop support to Dokploy, allowing the
pnpm run dokploy:setupcommand to work seamlessly with Rancher Desktop without requiring manual configuration. The enhancement automatically detects Rancher Desktop's Docker socket and uses it instead of the standard/var/run/docker.sock, while maintaining full backward compatibility with Docker Desktop and standard Docker installations.Checklist
Before submitting this PR, please make sure that:
canarybranch.Issues related (if applicable)
Fixes issues where
pnpm run dokploy:setupwould fail with "connect ENOENT /var/run/docker.sock" error on Rancher Desktop installations.Technical Details
packages/server/src/constants/index.tsto automatically detect Docker socket paths~/.rd/docker.sockand uses it when available/var/run/docker.sock) if Rancher Desktop is not detectedDOCKER_HOSTenvironment variable when setBenefits