Error in installing Pi-hole in Truenas

Im just new in Truenas or any server stuffs. I just decided to turn my old computer to truenas home server and wanted to install adblocker using pihole. I have a error in installing pi-hole. I tried the command to free up port 53 using the command>> sudo incus network set incusbr0 raw.dnsmasq=“port=5354” from LarsR and tried to reinstall Pi-hole but still the same problem. Do I need to reinstall Truenas? Im sorry I tried google but its pointing me here to ask for help. The following is the error code. Thank you.

[EFAULT] Failed to render compose templates: Traceback (most recent call last): File “/usr/bin/apps_render_app”, line 33, in sys.exit(load_entry_point(‘apps-validation==0.1’, ‘console_scripts’, ‘apps_render_app’)()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/usr/lib/python3/dist-packages/catalog_templating/scripts/render_compose.py”, line 48, in main render_templates_from_path(args.path, args.values) File “/usr/lib/python3/dist-packages/catalog_templating/scripts/render_compose.py”, line 19, in render_templates_from_path rendered_data = render_templates( ^^^^^^^^^^^^^^^^^ File “/usr/lib/python3/dist-packages/catalog_templating/render.py”, line 31, in render_templates rendered_templates[i.name] = env.get_template(i.name).render( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/usr/lib/python3/dist-packages/jinja2/environment.py”, line 1301, in render self.environment.handle_exception() File “/usr/lib/python3/dist-packages/jinja2/environment.py”, line 936, in handle_exception raise rewrite_traceback_stack(source=source) File “/mnt/.ix-apps/app_configs/pihole/versions/1.4.11/templates/docker-compose.yaml”, line 62, in top-level template code {{ tpl.render() | tojson }} ^^^^^^^^^^^^^^^^^^^^^^^^^ File “/mnt/.ix-apps/app_configs/pihole/versions/1.4.11/templates/library/base_v2_3_4/render.py”, line 86, in render “services”: {c._name: c.render() for c in self._containers.values()}, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/mnt/.ix-apps/app_configs/pihole/versions/1.4.11/templates/library/base_v2_3_4/render.py”, line 86, in “services”: {c._name: c.render() for c in self._containers.values()}, ^^^^^^^^^^ File “/mnt/.ix-apps/app_configs/pihole/versions/1.4.11/templates/library/base_v2_3_4/container.py”, line 454, in render result[“ports”] = self.ports.render() ^^^^^^^^^^^^^^^^^^^ File “/mnt/.ix-apps/app_configs/pihole/versions/1.4.11/templates/library/base_v2_3_4/ports.py”, line 131, in render self._render_instance.client.validate_ip_port_combos(self._combos_to_validate) File “/mnt/.ix-apps/app_configs/pihole/versions/1.4.11/templates/library/base_v2_3_4/truenas_client.py”, line 58, in validate_ip_port_combos self._validate_ip_port_combo(combo.bindip, combo.port) File “/mnt/.ix-apps/app_configs/pihole/versions/1.4.11/templates/library/base_v2_3_4/truenas_client.py”, line 96, in _validate_ip_port_combo raise RenderError(self._format_err(lines)) from None base_v2_3_4.error.RenderError: The following conflicts have been detected: - “10.10.4.1:53” used by Virt Service

The error message when incus was using port 53 was different then yours is, it was specifying that the port was in use

whereas your error looks like that its specifically the combination of the ip 10.10.4.1:53 is the issue (But it also may be that the error message changed since april 2025).

The error i believe is saying you have a configuration error or invalid configuration in the compose file. A likely config issue is an invalid host path, or referencing a path that contains spaces.

Have you tried setting up the PiHole in/from the apps catalog or are you trying to roll your own? If you have not tried the one in the apps catalog, I suggest that you set that one up to see how Truenas wants things done and what the paths look like. You can turn it into a custom app to see what the compose looks like and edit it.

First of all, I am a newbie in Truenas. I have Truenas installed on a ugreen DXP4800Plus. The first addition I installed was LLDAP and that went ok. Now I wanted to add pi-hole.
I think I ran into the same problem as Abudo, but in absence of many details in Abudo’s message I will try to provide more detail in my report, in the hope it will enable someone to provide us with advise how to solve it.

As indicated, my Truenas is still almost empty. After the basic install, LLDAP from train: community is installed (current version 1.1.9)

Next attempt is to install pi-hole. I selected pi-hole from Train: stable (version: 1.4.15). I left DNS port number to the default value of 53.
Trying to add a Host IP offers two options ‘0.0.0.0’ IP Address and ‘::’ IP Address. I have tried both the option ‘0.0.0.0’ IP Address and a manually filled out IP address (the same address as the Truenas device, with and without port number 53). But the only option that results in the ‘install’ button being enabled is the option ‘0.0.0.0’ IP Address.

My attempt results in a similar error message as Abudo reported, the only difference being the IP address reported for Virt Service, which in my case is in the 10.177… range, while my home network is in the 192.168… range. My conclusion is that this Virt Service is something related to the internal organisation within TrueNas.

Somehow the conflict between the internal Virt Service and pi-hole app must be solved. And I have the impression that the internal Virt Service must free port 53 and use pi-hole for DNS functionality, or an alternative port for internal DNS work. Or the pi-hole configurator must exclude the IP address of Truenas’ internal administration when claiming port 0.0.0.0:53.

May I add that I find it strange that an App in train: stable gets into conflict with internal functionality of Truenas. This of course unless I am totally wrong and Virt Service is not internal functionality of Truenas.

Hope this helps in clarifying the issue.

Gerben

While reading my message, I realise that the last sentence should have been slightly different.

It should have been:
Hope this helps in clarifying the problem and enables someone more skilled than Abudo and me to provide us with advise on how to solve this.

On the install screen is the additional environment variable set to the interface you are using? Also are you installing to a host path?

I left everything to default as much as possible. As a consequence:

I did not set any additional environment variable, should I have done so. Where could I have found that adding any additional environment variables is necessary, and which these variables are? I do not see any information the the web app installer UI, informing me to do so.
Yes, I am trying to install to two host paths, One host path for config storage and another one for DNSMASQ configuration. I read somewhere that it was better to define your own host paths, then to let the system create a data volume automatically.

As said, I am a newbie in TrueNAS. I am still trying to find my way around.

Additional environment variable instructions are in the Pihole release notes. To save time, go to the GUI screen for system-network and find the Interface Name for your truenas install–maybe something like en***. In the Pihole install screen for additional environment variable select add and type in Interface and then type in the name of your interface. If this doesn’t work, try it with storage for both configurations set to ixvolume instead of using host paths.

Tried installing with both storage configurations set to ixvolume: no fix

Tried with setting interface to my actual interface card used (my system has two): no fix

Combined both: no fix

Tried suggestion as proposed in pihole-port-53-appears-to-be-conflicting

sudo incus network set incusbr0 raw.dnsmasq="port=5354"

Does not fix either.

In the end I installed Dockge and with dockge I installed pi-hole using the below compose.yaml

# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    ports:
      # DNS Ports
      - 53:53/tcp
      - 53:53/udp
      # Default HTTP Port
      - 3080:80/tcp
      # Default HTTPs Port. FTL will generate a self-signed certificate
      - 3443:443/tcp
      # Uncomment the below if using Pi-hole as your DHCP Server
      #- "67:67/udp"
      # Uncomment the line below if you are using Pi-hole as your NTP server
      #- "123:123/udp"
    environment:
      # Set the appropriate timezone for your location from
      # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones, e.g:
      TZ: Europe/Amsterdam
      # Set a password to access the web interface. Not setting one will result in a random password being assigned
      FTLCONF_webserver_api_password: "my strong password"
      # If using Docker's default `bridge` network setting the dns listening mode should be set to 'ALL'
      FTLCONF_dns_listeningMode: ALL
    # Volumes store your data between container upgrades
    volumes:
      # For persisting Pi-hole's databases and common configuration file
      - /mnt/ssdpool/appdata/piholedata/pihole:/etc/pihole
      # Uncomment the below if you have custom dnsmasq config files that you want to persist. Not needed for most starting fresh with Pi-hole v6. If you're upgrading from v5 you and have used this directory before, you should keep it enabled for the first v6 container start to allow for a complete migration. It can be removed afterwards. Needs environment variable FTLCONF_misc_etc_dnsmasq_d: 'true'
      - /mnt/ssdpool/appdata/piholedata/dnsmasq.d:/etc/dnsmasq.d
    cap_add:
      # See https://docs.pi-hole.net/docker/configuration/#note-on-capabilities
      # Required if you are using Pi-hole as your DHCP server, else not needed
      - NET_ADMIN
      # Required if you are using Pi-hole as your NTP client to be able to set the host's system time
      - SYS_TIME
      # Optional, if Pi-hole should get some more processing time
      - SYS_NICE
    restart: unless-stopped
networks: {}

This works.

Problem solved, but not in the way it should.