You signed in with another tab or window. Reload to refresh your session.You signed out in anothe
8000
r tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@GitGab19 identified a limitation on our side: we currently rely on Docker IPC communication to manage some containers, but this approach is not compatible with the Umbrel environment.
After discussing the issue with people on the Umbrel Discord, the conclusion was that Docker-in-Docker (DinD) is likely the best approach for this scenario.
This issue aims to investigate that possibility and adapt our application where necessary.
Another important question is whether Docker-in-Docker can fully replace our current setup, including for users outside the Umbrel platform. If not, we may need to maintain both approaches, which would add complexity and is probably not ideal long term.
Also, this could be an effort to mitigate the security implications raised by #134
Another important question is whether Docker-in-Docker can fully replace our current setup, including for users outside the Umbrel platform. If not, we may need to maintain both approaches, which would add complexity and is probably not ideal long term.
I think we should unify the setup for both deployments, we don't have to be attached to the current docker run .. command we are showing to users on our website.
The best approach is probably to have the docker-compose.yml in both cases: in case of users running it outside Umbrel, we can eventually simplify the UX by having an installer script, similarly to curl -fsSL https://fleet.proto.xyz/install.sh.
As discussed with @lucasbalieiro during yesterday's PR Review Club call, we will work on adding the docker-compose.yml in this repo in our next milestone.
The reason is that we want to keep things stable for now, and the changes needed for that to happen are not super trivial.
We also agreed on the possibility of having a simple setup script to mention in the website, instead of having users to clone, enter, and run the docker-compose commands.
The REST API does not remove the dependency on docker.sock. It is simply another interface over the same underlying socket, functionally equivalent to libraries like dockerode in our stack.
For example, we can interact directly with the Docker daemon via the socket:
In practice, this still requires mounting docker.sock, and it does not provide additional isolation or permission granularity. It is essentially a different wrapper over the same backend. The Docker Engine does not expose a TCP port by default, which is why the Unix socket is required. Enabling TCP access would remove the need for --unix-socket /var/run/docker.sock, but it requires manual configuration changes, degrades UX, and exposes the API over the network, which increases the attack surface.
Docker Desktop follows the same model: it is a client layered on top of the Docker API.
I also tested Docker-in-Docker (DinD) as an alternative isolation strategy. It does not materially improve security. The container still requires --privileged mode, which effectively grants host-level control. In failure scenarios, isolation is limited: DinD may prevent direct impact on host containers, but any escape from the privileged environment is equivalent to full access via docker.sock.
There are also compatibility concerns. It is unclear how a privileged DinD setup behaves across Windows and macOS. Docker documentation primarily focuses on Linux capabilities (https://docs.docker.com/engine/containers/run/#runtime-privilege-and-linux-capabilities), and our testing so far has been limited to Linux (in the context of Umbrel packaging).
At this point, this feels misaligned with Docker’s security model. Docker is not designed for fine-grained permissions: access is effectively binary, either full control via the socket or no access at all.
From what I could grasp, most systems requiring similar container control use an agent-based architecture: a privileged daemon interacts with docker.sock, while clients communicate with that daemon. We already partially follow this model by restricting Docker access to our backend service and avoiding direct host interaction elsewhere.
From a UX perspective, the main concern is transparency around exposing docker.sock. However, this tradeoff is unavoidable if we want to manage containers. DinD with --privileged carries comparable risk. If a user is not comfortable exposing docker.sock, they are likely also not comfortable with a privileged DinD runtime. In that case, the current sv2-apps model, where users run and manage everything manually, remains the safest option.
A simpler approach may be preferable:
Automatically detect and use docker.sock when available
Hide this configuration step in most cases
Clearly document that docker.sock access is required, including its implications
Finally, beyond security and compatibility concerns, DinD increases system complexity and makes debugging harder due to additional layers of indirection when users report issues.
DinD remains a possible direction, but these trade-offs should be explicitly evaluated before moving forward.
Thanks for your investigation @lucasbalieiro, it's very exhaustive!
It seems very clear to me that using DinD with --priviledged wouldn't add a real security improvement at this point.
The only real hardening would be using the agent-based architecture you mentioned, with a defined set of APIs to do only specific operations on the containers.
So for now I would not change anything tbh, expect for documenting the need for the docker socket more clearly on our website and docs.
Maybe we can consider the work related to the agent-based architecture in the future, wdyt @lucasbalieiro ?
Maybe we can consider the work related to the agent-based architecture in the future, wdyt @lucasbalieiro ?
yes, it could make it easier for security conscious users who are new to the project to review a smaller codebase focused solely on managing Docker lifecycles. Today, they would need to review docker.ts, but I'm not entirely sure all Docker related logic is centralized there.
Activity
GitGab19 commentedon May 12, 2026
I think we should unify the setup for both deployments, we don't have to be attached to the current
docker run ..command we are showing to users on our website.The best approach is probably to have the
docker-compose.ymlin both cases: in case of users running it outside Umbrel, we can eventually simplify the UX by having an installer script, similarly tocurl -fsSL https://fleet.proto.xyz/install.sh.GitGab19 commentedon May 21, 2026
As discussed with @lucasbalieiro during yesterday's PR Review Club call, we will work on adding the
docker-compose.ymlin this repo in our next milestone.The reason is that we want to keep things stable for now, and the changes needed for that to happen are not super trivial.
We also agreed on the possibility of having a simple setup script to mention in the website, instead of having users to clone, enter, and run the docker-compose commands.
lucasbalieiro commentedon Jun 23, 2026
Yesterday I experimented with the Docker REST API (https://docs.docker.com/reference/api/engine/version/v1.54/) to evaluate whether it could remove the need for direct access to
docker.sockand provide a cleaner abstraction.Key conclusions from this exploration:
The REST API does not remove the dependency on
docker.sock. It is simply another interface over the same underlying socket, functionally equivalent to libraries likedockerodein our stack.For example, we can interact directly with the Docker daemon via the socket:
In practice, this still requires mounting
docker.sock, and it does not provide additional isolation or permission granularity. It is essentially a different wrapper over the same backend. The Docker Engine does not expose a TCP port by default, which is why the Unix socket is required. Enabling TCP access would remove the need for--unix-socket /var/run/docker.sock, but it requires manual configuration changes, degrades UX, and exposes the API over the network, which increases the attack surface.Docker Desktop follows the same model: it is a client layered on top of the Docker API.
I also tested Docker-in-Docker (DinD) as an alternative isolation strategy. It does not materially improve security. The container still requires
--privilegedmode, which effectively grants host-level control. In failure scenarios, isolation is limited: DinD may prevent direct impact on host containers, but any escape from the privileged environment is equivalent to full access viadocker.sock.There are also compatibility concerns. It is unclear how a privileged DinD setup behaves across Windows and macOS. Docker documentation primarily focuses on Linux capabilities (https://docs.docker.com/engine/containers/run/#runtime-privilege-and-linux-capabilities), and our testing so far has been limited to Linux (in the context of Umbrel packaging).
At this point, this feels misaligned with Docker’s security model. Docker is not designed for fine-grained permissions: access is effectively binary, either full control via the socket or no access at all.
From what I could grasp, most systems requiring similar container control use an agent-based architecture: a privileged daemon interacts with
docker.sock, while clients communicate with that daemon. We already partially follow this model by restricting Docker access to our backend service and avoiding direct host interaction elsewhere.From a UX perspective, the main concern is transparency around exposing
docker.sock. However, this tradeoff is unavoidable if we want to manage containers. DinD with--privilegedcarries comparable risk. If a user is not comfortable exposingdocker.sock, they are likely also not comfortable with a privileged DinD runtime. In that case, the current sv2-apps model, where users run and manage everything manually, remains the safest option.A simpler approach may be preferable:
docker.sockwhen availabledocker.sockaccess is required, including its implicationsFinally, beyond security and compatibility concerns, DinD increases system complexity and makes debugging harder due to additional layers of indirection when users report issues.
DinD remains a possible direction, but these trade-offs should be explicitly evaluated before moving forward.
GitGab19 commentedon Jun 24, 2026
Thanks for your investigation @lucasbalieiro, it's very exhaustive!
It seems very clear to me that using DinD with
--priviledgedwouldn't add a real security improvement at this point.The only real hardening would be using the agent-based architecture you mentioned, with a defined set of APIs to do only specific operations on the containers.
So for now I would not change anything tbh, expect for documenting the need for the docker socket more clearly on our website and docs.
Maybe we can consider the work related to the agent-based architecture in the future, wdyt @lucasbalieiro ?
lucasbalieiro commentedon Jun 25, 2026
yes, it could make it easier for security conscious users who are new to the project to review a smaller codebase focused solely on managing Docker lifecycles. Today, they would need to review
docker.ts, but I'm not entirely sure all Docker related logic is centralized there.GitGab19 commentedon Jun 25, 2026
Can you open an issue about the agent-based architecture?
So that we can keep tracking that idea in the future, and close this issue for now.
lucasbalieiro commentedon Jun 25, 2026
see: #196
GitGab19 commentedon Jun 25, 2026
Great, thanks man.