How to find domoticz log file

Subforum for general discussions. Do not dump your questions/problems here, but try to find the subforum where it belongs!

Moderators: leecollings, remb0

Post Reply
meal
Posts: 117
Joined: Monday 04 March 2019 14:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.2
Location: France
Contact:

How to find domoticz log file

Post by meal »

Hello,

1 - Context
Domoticz V2025.2 (build 17277) running on bookworm
Build Hash fac6d8f
Compile Date 2026-02-26 06:42:05
dzVents Version 3.1.11
Python Version 3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0]

2 - How to find domoticz log file

I switched from the deprecated mean to create domoticz service using the /etc/init.d/domoticz.sh file to the preferred one in /etc/systemd/system/domoticz.service.

Previously i recorded domoticz messages in "/var/log/domoticz.log" by setting in domoticz.sh file the line:
DAEMON_ARGS="$DAEMON_ARGS -log /var/log/domoticz.log"

Now when using /etc/systemd/system/domoticz.service I see the domoticz messages in domoticz UI but I am not able to find in which file they are stored. I also would like to define the file name supporting these messages.

I would be grateful if someone could help me or give me a hint.

BR
meal
User avatar
waltervl
Posts: 6691
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: How to find domoticz log file

Post by waltervl »

It should be defined in the EnvironmentFile (eg /home/pi/domoticz.env)
See https://wiki.domoticz.com/Linux#Option_ ... Preferred)

the location of the environment file is set in the systemd configuration file eg
/etc/systemd/system/domoticz.service
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
meal
Posts: 117
Joined: Monday 04 March 2019 14:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.2
Location: France
Contact:

Re: How to find domoticz log file

Post by meal »

@waltervl

Many thanks for the information.
To be more precise if I want to store the domoticz messages in /tmp/domoticz.log what do I have to set in /home/pi/domoticz.env file ?
meal
User avatar
waltervl
Posts: 6691
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: How to find domoticz log file

Post by waltervl »

Seems I was wrong according AI:

To set the Domoticz log file using a systemd service configuration, you must modify the ExecStart directive within the service unit file to include the -log command-line parameter.
1. Locate the Service File
The Domoticz systemd service file is typically located at:
/etc/systemd/system/domoticz.service

2. Configure the Log File Path
Edit the file using a text editor like nano:

Code: Select all

sudo nano /etc/systemd/system/domoticz.service 
Find the ExecStart line and append the -log and -loglevel parameters. For example:
ini

Code: Select all

[Service]
ExecStart=/home/pi/domoticz/domoticz -www 8080 -log /var/log/domoticz.log -loglevel normal,status,error
-log <path>: Specifies the full path to the log file.
-loglevel <levels>: Sets the verbosity (e.g., normal,status,error,debug).

3. Set Permissions (not sure this is needed)
Ensure the directory where the log will be stored exists and that the user running Domoticz (often pi or domoticz) has write permissions to it:

Code: Select all

sudo touch /var/log/domoticz.log
sudo chown pi:pi /var/log/domoticz.log 
4. Apply Changes
Reload the systemd manager configuration and restart the service:
Reload daemon:

Code: Select all

sudo systemctl daemon-reload
Restart service:

Code: Select all

sudo systemctl restart domoticz.service
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
meal
Posts: 117
Joined: Monday 04 March 2019 14:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.2
Location: France
Contact:

Re: How to find domoticz log file

Post by meal »

Many thanks
meal
Post Reply

Who is online

Users browsing this forum: meal and 1 guest