"/var/run/docker.sock" seem cooked?

  • First thank you to all contributors and maintainers that make this project possible. I've been a user of OMV for a long time as a home server and it's been an awesome experience overall!


    Recently I ran into a edge case issue I think regarding "/var/run/docker.sock". I run around 15 docker containers for different services via the OMV compose plugin and those all work fine and can interact with each other no problem via the filesystem permissions and "docker" user, so I'm certain that's setup correctly.


    But I recently started to use Homarr as a dashboard and whilst it works fine container/port wise and things like the OMV integration work well, the docker integration doesn't. It communicates via "/var/run/docker.sock" to get all the actively running containers and such, but in my case it fails with this error due to "/var/run/docker.sock" permissions.


    Code
    2025-08-05T05:46:48.951Z error: tRPC Error with query on 'docker.getContainers' 
        at Object.onError (/app/apps/nextjs/.next/server/app/api/trpc/[trpc]/route.js:5:5083)
        at Object.onError (/app/apps/nextjs/.next/server/app/api/trpc/[trpc]/route.js:5:4123)
        at /app/apps/nextjs/.next/server/app/api/trpc/[trpc]/route.js:1:26363
        at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
        at async /app/apps/nextjs/.next/server/app/api/trpc/[trpc]/route.js:5:1389
    caused by Error: connect EACCES /var/run/docker.sock errno="-13" code="EACCES" syscall="connect" address="/var/run/docker.sock"
        at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1637:16)
        at PipeConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17)


    My docker-compose for Homarr is as below;


    PUID = 1001 (docker user), and PGID = 100 (users group)


    If I check the permissions of the "/var/run/docker.sock" itself I get this;

    Code
    srw-rw---- 1 root docker 0 Aug  5 13:43 /var/run/docker.sock

    If I manually SSH into the server and change /var/run/docker.sock to have docker:docker permissions, then suddenly it works, but this only stays until I restart the server and then it will reset back to root:docker and I have to manually SSH in and change it again.


    What is the intended/expected way to set this up? I tried looking through the docker wiki for OMV but it seems this isn't really documented beyond being included in a nextcloud example docker-compose yaml. I did notice in the compose plugin settings "owner of directories and files" and "group of directories and files" are both set to root for me, but also referencing the OMV docker wiki it seems this is also what it's set as there as well so not really sure if that is what is causing the issue?


    Any help is greatly appreciated!

  • votdev

    Approved the thread.
    • Official Post

    I don't know anything about homarr but I don't see anything about user and group IDs (PUID and PGID) being set and docker.sock being readonly in their docs - https://homarr.dev/docs/getting-started/installation/docker/. I would remove PUID and PGID. If that doesn't fix it, remove the ro flag from docker.sock.

    omv 8.2.2-1 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.2.1 | compose 8.1.6 | cterm 8.0 | borgbackup 8.1.7 | tempmon 8.0.3 | mergerfs 8.0.1 | scripts 8.0.1 | writecache 8.1.7


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Official Post

    I added a homarr example to the compose plugin. It uses the homarr docs example and seems to be working fine on my dev system.

    omv 8.2.2-1 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.2.1 | compose 8.1.6 | cterm 8.0 | borgbackup 8.1.7 | tempmon 8.0.3 | mergerfs 8.0.1 | scripts 8.0.1 | writecache 8.1.7


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!