Dnsmasq not Include configuration from additional file

I maked a file:

root@Router [~]:>ls -l /tmp/dnsmasq-nftset.conf
-rw-r--r--    1 root     root            42 May 18 11:47 /tmp/dnsmasq-nftset.conf

root@Router [~]:>cat /tmp/dnsmasq-nftset.conf
nftset=/www.google.com/4#inet#fw4#google

I wanted to add contents of this file to dnsmasq configuration, so I added the following at the end of /etc/dnsmasq.conf:

conf-file=/tmp/dnsmasq-nftset.conf

Unfortunately, dnsmasq won't start:

Mon May 18 11:49:59 2026 daemon.crit dnsmasq[1]: cannot read /tmp/dnsmasq-nftset.conf: No such file or directory
Mon May 18 11:49:59 2026 daemon.crit dnsmasq[1]: FAILED to start up
root@Router [~]:>apk list -I dnsmasq-full
dnsmasq-full-2.91-r3 mipsel_24kc {feeds/base/network/services/dnsmasq} (GPL-2.0) [installed]
root@Router [~]:>ubus call system board
{
        “kernel”: “6.12.87”,
        “hostname”: “Router”,
        “system”: “MediaTek MT7621 ver:1 eco:3”,
        “model”: “Ubiquiti EdgeRouter X SFP”,
        “board_name”: “ubnt,edgerouter-x-sfp”,
        “rootfs_type”: “squashfs”,
        “release”: {
                “distribution”: “OpenWrt”,
                “version”: “25.12.4”,
                “firmware_url”: “https://downloads.openwrt.org/”,
                “revision”: “r32933-4ccb782af7”,
                “target”: “ramips/mt7621”,
                “description”: “OpenWrt 25.12.4 r32933-4ccb782af7”,
                “builddate”: “1778712129”
        }

Who knows what I'm doing wrong?

Previously working setup:

in rc.local:
cp /root/workpc.conf /tmp/dnsmasq.d/

then the workpc.conf file itself:
domain=office.intranet,192.168.1.234

My config is not directly related to your use case, I'm only sharing the general idea.

The file is not added as an additional mount for the ujail that dnsmasq runs in.

Simplest would be, to copy/paste contents of dnsmasq-nftset.conf into /etc/dnsmasq.conf . Which should be jailed, already. Note, that I was also caught in the past with this secret new feature, jailing of many components.

Thanks for the tip.

The dnsmasq script located in the /etc/init.d directory contains the function: procd_add_jail_mount, which allows access to configuration files in the $dnsmasqconfdir directory; for a single instance of dnsmasq, this is the /tmp/dnsmasq.d directory — adblock uses it.

Copying an additional file there causes dnsmasq to include it in its configuration.

OK. I have some static nftset entries in /etc/dnsmasq.conf, but for lists that are updated frequently, I want to write a script that generates ready-to-use nftset entries in a file. To reduce the number of flash writes, I wanted to place it in /tmp and include it in the dnsmasq configuration. I already know that all I need to do is copy that file to the /tmp/dnsmasq.d directory.