Skip to content

docker command fails on QNAP NAS #97

Closed

Description

@88ergts

Connecting to a Pi works flawlessly but connecting to a QNAP NAS on which the docker command works, does not work.
Checked all parameters but with no luck.
Log:
"SSH validation for host 192.168..: docker command failed (exit status 1)"

Activity

  1. gensyn commented on Oct 22, 2026

    @gensyn
    Owner

    This happens when you try to create a new entry in Home Assistant for a Docker container on a QNAP NAS? If so, SSH Docker tries to make sure everything is working by executing <docker_command> ps -q on the host. Could you please log into the NAS through a shell using exactly the credentials you are trying to use in Home Assistant and execute the command manually? <docker_command> should be the command you have entered when trying to create the entry - if you have not entered anything it defaults to docker.

  2. 88ergts commented on Oct 22, 2026

    @88ergts
    Author

    Now that's fast response.. ;)
    If i try that command (docker ps -q) i get all the Container IDs listed.
    I copy pasted the IP, my Username, my password, the container name.
    I even tried to use the Container ID.
    But still get the same error...
    I can also confirm that the login itself is successful as it is logged in the QuLogCenter as successful from the IP where HA is running.
    Unfortunately the QuLogCenter does not log things like the shell commands issued by the user.

  3. gensyn commented on Oct 22, 2026

    @gensyn
    Owner

    Interesting. Could you then use the action ssh_command.execute (available through HA developer tools) to try and issue the command? If it fails (which I expect), you should be presented with a different error message.

  4. gensyn commented on Oct 22, 2026

    @gensyn
    Owner
        I copy pasted the IP, my Username, my password, the container name.
    

    What did you copy the container name for? It should not be necessary for this test.

  5. 88ergts commented on Oct 22, 2026

    @88ergts
    Author

    MY fault.... needed to uncheck known hosts in the developer tools.
    In the integration i did uncheck it
    What a bummer

    this is the output:

    output: ''
    error: |
    sh: docker: command not found
    exit_status: 127

  6. gensyn commented on Oct 22, 2026

    @gensyn
    Owner

    Can you execute any other command like date or whoami?

  7. 88ergts commented on Oct 22, 2026

    @88ergts
    Author

    date works without an issue:

    output: |
    Thu Oct 22 16:44:52 CEST 2026
    error: ''
    exit_status: 0

    i wonder what the issue could be.
    When i ssh into the NAS via iTerm and run "docker" it just works

  8. 88ergts commented on Oct 22, 2026

    @88ergts
    Author

    just the fist line of the docker command in iTerm:
    [User@NAS ~]$ docker ps
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    5bbdc417e40e ghcr.io/homarr-labs/homarr:latest "/app/entrypoint.sh …" 2 hours ago Up 2 hours 0.0.0.0:7575->7575/tcp homarr

  9. gensyn commented on Oct 22, 2026

    @gensyn
    Owner

    First idea: docker is probably not by default on your PATH and only gets loaded by .bashrc when you log in which does not happen when you do it through Home Assistant. So you can either try to put it on the PATH or use the absolute path to the executable in Home Assistant - probably /usr/bin/docker.

  10. 88ergts commented on Oct 22, 2026

    @88ergts
    Author

    Perfect. that works. It is located in "/share/CACHEDEV1_DATA/.qpkg/container-station/bin/" what a ridiculous path :)

    Could you tell me how to simlink ist to PATH ?

  11. gensyn commented on Oct 22, 2026

    @gensyn
    Owner

    Since /usr/bin should be in your PATH, this should do the trick:
    sudo ln -s /share/CACHEDEV1_DATA/.qpkg/container-station/bin/docker /usr/bin/docker

  12. 88ergts commented on Oct 22, 2026

    @88ergts
    Author

    It works like a charm.
    Thanks a lot for your assistance

  13. gensyn commented on Oct 22, 2026

    @gensyn
    Owner

    I'll leave this issue open and try to show a more useful message when this error occurs.

  14. 88ergts commented on Oct 22, 2026

    @88ergts
    Author

    you've got a Ko-Fi ;)

  15. gensyn commented on Oct 22, 2026

    @gensyn
    Owner

    Cheers mate, appreciate it. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions