Linux server/domoticz docker container setup

  • Hello,


    I'm trying to set up a domoticz docker container as the domoticz plugin won't work (OpenZwave USB not available).


    While I set all the parameters right and change default port from 8080 to other options such as 8081, 8089, 8085, 1000 etc, when I try to reach Domotiz GUI,I get a 400 Bad Request.


    What am I possibly doing wrong?

  • I don't think you will get any meaningful help until you post the configuration you used.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

    Edited once, last by gderf ().

  • Have you looked in the container log yet?


    I would try setting the exposed port to be the same as the host port - 8085.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 5.x on ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380 + Silverstone DS380 DAS Box.

  • from CLI


    ls -al /sharedfolders/AppData
    ls -al /sharedfolders/AppData/demoticz


    will show you owner and group and the permissions they have

    The outpu is as follows:


    ls -al /sharedfolders/AppData
    total 16
    drwxrwsrwx 4 root users 4096 Aug 6 01:14 .
    drwxr-xr-x 9 root root 4096 Aug 4 14:47 ..
    drwxrwSr-- 5 gtj users 4096 Aug 7 10:59 Domoticz
    drwxrwsrwx 5 gtj users 4096 Aug 5 02:17 Unify




    ls -al /sharedfolders/AppData/Domoticz
    total 428
    drwxrwSr-- 5 gtj users 4096 Aug 7 10:59 .
    drwxrwsrwx 4 root users 4096 Aug 6 01:14 ..
    -rwxrw-r-- 1 gtj users 136 Aug 7 05:00 domocookie.txt
    -rwxrw-r-- 1 gtj users 413696 Aug 6 02:19 domoticz.db
    drwxrwSr-- 2 gtj users 4096 Aug 6 02:18 keys
    drwxrwSr-- 2 gtj users 4096 Aug 6 02:18 plugins
    drwxrwSr-- 8 gtj users 4096 Aug 6 02:15 scripts



    Thank you!

  • If it does not work, try to use this docker-compose file



    with this as a reference


    Delete the container, the image and the folder demoticz before

  • not sure if the sticky bit is a problem


    try


    chmod 774 -R /sharedfolders/AppData/demoticz


    Which hardware are you using?

    It didn't work.
    I'm running OMV on a RockPro64 with its NAS case.
    A Unify controller in a docker container runs already on port 8080 with no problems so I guess Docker should be working fine on my OMV instance?
    Interestingly, through my Windows PC the folder AppData>Domoticz is NOT accessible while the folder AppData>Unify is.


    I will try the docker-compose option.
    Is that configuration going to create a folder itself or should I create a Domoticz folder manually prior to running the script?


    Thanks for all your help once again!

  • not sure if the sticky bit is a problem


    try


    chmod 774 -R /sharedfolders/AppData/demoticz


    Which hardware are you using?

    It didn't work.
    I'm running OMV on a RockPro64 with its NAS case.
    A Unify controller in a docker container runs already on port 8080 with no problems so I guess Docker should be working fine on my OMV instance?
    Interestingly, through my Windows PC the folder AppData>Domoticz is NOT accessible while the folder AppData>Unify is.


    I will try the docker-compose option.
    Is that configuration going to create a folder itself or should I create a Domoticz folder manually prior to running the script?


    Thanks for all your help once again!




    UPDATE


    just ried the docker-compose option.
    Followed instructions up to docker-compose up -d


    but I'm getting the error:
    ERROR: Named volume "sharedfolder/AppData/domoticz:/config:rw" is used in service "domoticz" but no declaration was found in the volumes section.

  • I will try the docker-compose option.
    Is that configuration going to create a folder itself or should I create a Domoticz folder manually prior to running the script?

    Yes the folders are created by docker-compose.

    ERROR: Named volume "sharedfolder/AppData/domoticz:/config:rw" is used in service "domoticz" but no declaration was found in the volumes section.


    Have you removed the demoticz share before running docker-compose?

  • Just tried the docker-compose file on a test system. The docker is created and running, but I also can't access the web interface


    Used another image
    https://hub.docker.com/r/cgatay/domoticz
    That is working


    docker run -d -p 8080:8080 --name=domoticz -v /srv/dev-disk-by-label-disk1/appdata/domoticz:/config -v /etc/localtime:/etc/localtime:ro cgatay/domoticz:master


    But might not run on your RockPro64.


    Maybe you should search and ask on the linuxserver.io forum.
    Or you try another image suitable for your RockPro64.

  • not sure if the sticky bit is a problem


    try


    chmod 774 -R /sharedfolders/AppData/demoticz


    Which hardware are you using?

    It didn't work.
    I'm running OMV on a RockPro64 with its NAS case.
    A Unify controller in a docker container runs already on port 8080 with no problems so I guess Docker should be working fine on my OMV instance?
    Interestingly, through my Windows PC the folder AppData>Domoticz is NOT accessible while the folder AppData>Unify is.


    I will try the docker-compose option.
    Is that configuration going to create a folder itself or should I create a Domoticz folder manually prior to running the script?


    Thanks for all your help once again!




    UPDATE


    just ried the docker-compose option.
    Followed instructions up to docker-compose up -d


    but I'm getting the error:
    ERROR: Named volume "sharedfolder/AppData/domoticz:/config:rw" is used in service "domoticz" but no declaration was found in the volumes section.



    ..................................


    I did remove the Domoticz folder, recreated it, deleted it, left the image to create it by itself - pretty much tried all options.


    I will give the other image you suggested a go as soon as I get home.


    Do I have to run its configuration in a one-line-command as you suggested or should I save a docker-compose.yml like the previous example?


    Many thanks for all your help. It's been proven precious.
    At least I know I'm not doing anything wrong and the problem i with the image which is getting me nowhere!

  • Do I have to run its configuration in a one-line-command as you suggested or should I save a docker-compose.yml like the previous example?

    The one liner is based on the information on hub.docker. Seems like there is not more to it. So the one liner should be the easiest way to set it up. You just have to adjust the path to the config folder.


    And it might not work on the RockPro64

  • not sure if the sticky bit is a problem


    try


    chmod 774 -R /sharedfolders/AppData/demoticz


    Which hardware are you using?

    It didn't work.
    I'm running OMV on a RockPro64 with its NAS case.
    A Unify controller in a docker container runs already on port 8080 with no problems so I guess Docker should be working fine on my OMV instance?
    Interestingly, through my Windows PC the folder AppData>Domoticz is NOT accessible while the folder AppData>Unify is.


    I will try the docker-compose option.
    Is that configuration going to create a folder itself or should I create a Domoticz folder manually prior to running the script?


    Thanks for all your help once again!




    UPDATE


    just ried the docker-compose option.
    Followed instructions up to docker-compose up -d


    but I'm getting the error:
    ERROR: Named volume "sharedfolder/AppData/domoticz:/config:rw" is used in service "domoticz" but no declaration was found in the volumes section.



    ..................................


    I did remove the Domoticz folder, recreated it, deleted it, left the image to create it by itself - pretty much tried all options.


    I will give the other image you suggested a go as soon as I get home.


    Do I have to run its configuration in a one-line-command as you suggested or should I save a docker-compose.yml like the previous example?


    Many thanks for all your help. It's been proven precious.
    At least I know I'm not doing anything wrong and the problem i with the image which is getting me nowhere!



    Just to update with this: This solution did not work either.
    Fed up with all this BS. Thank you very much for your effort and tendency to help though. It is thoroughly appreciated!

Participate now!

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