Linux server/domoticz docker container setup

    • OMV 4.x
    • 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?
    • macom wrote:

      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

      Source Code

      1. ---
      2. version: "2"
      3. services:
      4. domoticz:
      5. image: linuxserver/domoticz
      6. container_name: domoticz
      7. environment:
      8. - PUID=1000
      9. - PGID=100
      10. - TZ=Europe/London
      11. - WEBROOT=domoticz #optional
      12. volumes:
      13. - sharedfolder/AppData/demoticz:/config
      14. ports:
      15. - 8080:8080
      16. - 6144:6144
      17. - 1443:1443
      18. restart: unless-stopped
      Display All

      with this as a reference

      Delete the container, the image and the folder demoticz before
      Odroid HC2 - armbian - OMV4.x | Asrock Q1900DC-ITX - Intenso SSD 120GB - OMV4.x
      :!: Backup - Solutions to common problems - OMV setup videos - OMV4 Documentation - user guide :!:
    • macom wrote:

      not sure if the sticky bit is a problem

      try

      chmod 774 -R /sharedfolders/AppData/demoticz

      macom wrote:

      gtj wrote:

      I use the linuxserver image and even pulled the ''arm64v8-latest'' tag
      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!
    • macom wrote:

      not sure if the sticky bit is a problem

      try

      chmod 774 -R /sharedfolders/AppData/demoticz

      macom wrote:

      gtj wrote:

      I use the linuxserver image and even pulled the ''arm64v8-latest'' tag
      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.
    • gtj wrote:

      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.

      gtj wrote:

      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?
      Odroid HC2 - armbian - OMV4.x | Asrock Q1900DC-ITX - Intenso SSD 120GB - OMV4.x
      :!: Backup - Solutions to common problems - OMV setup videos - OMV4 Documentation - user guide :!:
    • 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
      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.
      Odroid HC2 - armbian - OMV4.x | Asrock Q1900DC-ITX - Intenso SSD 120GB - OMV4.x
      :!: Backup - Solutions to common problems - OMV setup videos - OMV4 Documentation - user guide :!:

      The post was edited 3 times, last by macom ().

    • macom wrote:

      not sure if the sticky bit is a problem

      try

      chmod 774 -R /sharedfolders/AppData/demoticz

      macom wrote:

      gtj wrote:

      I use the linuxserver image and even pulled the ''arm64v8-latest'' tag
      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!
    • gtj wrote:

      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
      Odroid HC2 - armbian - OMV4.x | Asrock Q1900DC-ITX - Intenso SSD 120GB - OMV4.x
      :!: Backup - Solutions to common problems - OMV setup videos - OMV4 Documentation - user guide :!:
    • macom wrote:

      not sure if the sticky bit is a problem

      try

      chmod 774 -R /sharedfolders/AppData/demoticz

      macom wrote:

      gtj wrote:

      I use the linuxserver image and even pulled the ''arm64v8-latest'' tag
      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!