How to install Apache on Truenas 25.04.1

Hi. I am new to Truenas community and I would like to ask how to install Website Server like Apache on Truenas 25.04.1? Can someone guide me?

If it’s not available as an app you can use the custom app function and create your own app via the wizard, or use the custom yaml function, paste in the content of a valid compose file and deploy it that way.
If you find the truenas gui lacking in options, you could also install portainer or dockge from the apps catalogue and use those management apps to deploy it.

I know that. I just need some “yaml” that will work with this version or just a step-by-step guide on how to do it. I want to learn.

i’d propably go for the bitnami one

services:
  apache:
    image: 'bitnami/apache:latest'
    ports:
      - '80:8080'
      - '443:8443'
    volumes:
      - /path/to/app:/app

Edit:
port 80 and 443 are used by the truenas webui, so you may have to change them on the truenas side.

services:
  apache:
    image: 'bitnami/apache:latest'
    ports:
      - '50081:50081'
      - '50444:50444'
    volumes:
      - $Home/Apache:/app

and i got error

[EFAULT] Failed 'up' action for 'apache' app

where is my mistake?

As far as I know you can’t use home as directory

1 Like

in my case this work → yaml

services:
  apache:
    environment:
      - APACHE_HTTP_PORT_NUMBER=81
    image: bitnami/apache:latest
    ports:
      - '81:81'
      - '444:444'
    volumes:
      - /mnt/Tank/Apache:/app

Ofc you must have poll “Tank” and datasets “Apache” (generic) created. Next create “index.html” in “Tank/Apache” and paste this code in to

<!DOCTYPE html>
<html>
    <head>
        <title>TEST</title>
    </head>
    <body>
        <h1><center>WORKS FINE !</center></h1>
   </body>
</html>

Now you can try connet to your site 192.168.xxx.xxx:81 or your domain.

Maybe it will help someone

One more question. How to activate java scripts in apache?

That’s really an Apache question; suggest you ask on their support channels.