Page 1 of 1

New Domoticz instance in Docker how to add new Themes

Posted: Saturday 14 June 2025 11:12
by Ragdag
I'm in the process of setting up a new Domoticz instance using Docker, and so far everything is working well — including Z-Wave JS, MQTT, P1 USB, etc.

The only issue I’m still trying to solve is how to restore the Machinon theme.
On my old (non-Docker) setup, I simply placed the theme folder under www/styles, but I can't find that path in the new setup.

Here is my current docker-compose.yml:

Code: Select all

services:
  domoticz:
    container_name: domoticz
    image: domoticz/domoticz:latest
    restart: unless-stopped
    ports:
      - 8080:8080
      - 6144:6144
      - 1443:1443
    volumes:
      - ./config:/opt/domoticz/userdata
    devices:
      - /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A15Z54NR-if00-port0:/dev/ttyUSB0
networks: {}
This creates the expected files and folders (e.g., the database) under:

Code: Select all

/home/user/docker/stacks/domoticz/config/
However, there is no "www/styles/" directory like in my previous install, so I’m unsure where or how to place the machinon theme files.
I only see a "www/templates/"

What am I missing?
Do I need to mount an additional volume to access the web root, or is the theme approach different in the Docker image?

Thanks in advance for your help!

Re: New Domoticz instance in Docker how to add new Themes

Posted: Saturday 14 June 2025 11:39
by Ragdag
Update:

I’ve figured it out — posting here in case it helps someone else.

At first, I tried mounting the entire styles and templates directories:

Code: Select all

services:
  domoticz:
    container_name: domoticz
    image: domoticz/domoticz:latest
    restart: unless-stopped
    ports:
      - 8080:8080
      - 6144:6144
      - 1443:1443
    volumes:
      - ./config:/opt/domoticz/userdata
      - ./config/www/templates:/opt/domoticz/www/templates
      - ./config/www/styles:/opt/domoticz/www/styles
    devices:
      - /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A15Z54NR-if00-port0:/dev/ttyUSB0
networks: {}
With this setup, I was able to add the machinon theme and select it in the UI. However, this approach overwrites all the built-in default themes, making them unavailable.

Final working solution:
Instead of mounting the entire styles folder, I now only mount the custom style subfolder directly:

Code: Select all

services:
  domoticz:
    container_name: domoticz
    image: domoticz/domoticz:latest
    restart: unless-stopped
    ports:
      - 8080:8080
      - 6144:6144
      - 1443:1443
    volumes:
      - ./config:/opt/domoticz/userdata
      - ./config/www/templates:/opt/domoticz/www/templates
      - ./config/www/styles/machinon:/opt/domoticz/www/styles/machinon
    devices:
      - /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A15Z54NR-if00-port0:/dev/ttyUSB0
networks: {}
Now the machinon theme works perfectly and all default themes remain available.

Hope this helps!

Re: New Domoticz instance in Docker how to add new Themes

Posted: Tuesday 17 June 2025 16:47
by waltervl
Thanks!
I added this tip to the tips and tricks section of the Docker wiki: https://wiki.domoticz.com/Docker