---
title: "Homarr Docker Integration — Container Management & Socket Setup"
aliases: [homarr-docker, homarr-container-management]
tags: [homarr, docker, homelab, self-hosted, security]
sources: [raw/Homarr documentation 6.md]
created: 2026-04-19
updated: 2026-04-19
---

## Overview

Homarr's Docker integration allows you to view and manage Docker containers directly from the dashboard. It requires access to the Docker socket — either mounted directly or proxied for security.

## Enabling the Integration

- **On bare-metal host** (Docker installed directly): enabled by default.
- **Inside a container**: must mount the Docker socket explicitly.

Docker Compose — add to `volumes`:
```yaml
volumes:
  - /var/run/docker.sock:/var/run/docker.sock
  - ./homarr/appdata:/appdata
```

`docker run` flag: `-v /var/run/docker.sock:/var/run/docker.sock`

Windows path adjustment: `-v //var/run/docker.sock:/var/run/docker.sock`

## Container Management Capabilities

From the Homarr UI you can:
- **Start / Stop / Restart / Remove** containers
- **Search & filter** by container name or image name
- **Add containers as apps** — select containers → click "Add to Homarr" → set web addresses → confirm

Once added, containers appear in the app list and behave like manually added apps.

## Configuration Label

| Label | Effect |
|-------|--------|
| `homarr.hide` (any value) | Hides the container from the Docker Containers widget and tools page |

## Security

Mounting the raw Docker socket grants **full control** over the Docker daemon — a compromised Homarr instance could start, stop, or delete any container.

**Recommended: use a socket proxy** instead of direct socket mount:
- [linuxserver/docker-socket-proxy](https://github.com/linuxserver/docker-socket-proxy)
- [Tecnativa/docker-socket-proxy](https://github.com/Tecnativa/docker-socket-proxy)

### Minimal Required Permissions

For standard proxies (`CONTAINERS` + `POST` flags):
```
CONTAINERS=1
POST=1
```

> `POST=1` is security-critical — it enables modification of your Docker environment. Disable if concerned.

### Safer Alternative (LSIO proxy)

Use LSIO's proxy with granular action flags instead of `POST`:
```
ALLOW_START=1
ALLOW_STOP=1
ALLOW_RESTARTS=1
```
Trade-off: container **Remove** is disabled, but start/stop/restart work with `POST=0`.

## Connecting via Socket Proxy

1. Add environment variables to the Homarr service:
   ```yaml
   environment:
     - DOCKER_HOSTNAMES=<socket-proxy-container-name>
     - DOCKER_PORTS=<proxy-port>   # usually 2375
   ```

2. Add the proxy network to the compose file:
   ```yaml
   networks:
     socket-proxy:
       name: socket-proxy
       external: true
   ```

3. Add the network to the Homarr service block:
   ```yaml
   networks:
     - socket-proxy
   ```

4. Remove the `docker.sock` volume mount from Homarr — it's no longer needed.

## Key Takeaways

- Docker socket must be explicitly mounted when Homarr runs in a container
- Direct socket mount = full Docker API access — use a proxy in production
- LSIO socket proxy with `ALLOW_START/STOP/RESTARTS=1` and `POST=0` is the safest usable config
- `homarr.hide` label suppresses a container from appearing in Homarr's UI
- Containers can be bulk-imported as Homarr apps via the Docker tools page

## Related

- [[wiki/homelab/homarr-docker-stats|Homarr Docker Stats Widget]] — real-time CPU/memory display (requires this integration)
- [[wiki/homelab/homarr-integrations|Homarr Integrations — Third-Party App Connections]] — general integration setup
- [[wiki/homelab/homarr-apps|Homarr Apps — Managing Dashboard Links & Status Checks]] — how imported containers become apps
- [[wiki/homelab/homarr-settings|Homarr Settings]] — global force-disable app status option

## Sources

- `raw/Homarr documentation 6.md` — Homarr Docker integration docs (v1.59.2)
