Hi,
I am still quite new to OMV or setting up my own NAS in general but the last few months I have been working on (and struggling with) setting up docker and getting a mediaserver (Jellyfin) and cloud solution (Nextcloud) up and running via Nginx proxy manager.
The reason it took me so long is that many tutorials and guides are (slightly) outdated or do not sufficiently explain (the importance of) networking in docker and how to do that in OMV7.
So, after finally having a working setup, I want to post my setup and hopefully help someone, or get useful feedback to improve.
By default, many containers create their own network in docker. To get it to communicate with the proxy manager, they need to be in the same network.
So, for every network you want to use, you need to create it in the OMV GUI (Services -> Compose -> Networks)
In this example I created the network "dockernet" and "nextcloud-aio" with 172.20.0.0/16 en 172.18.0.0/16 subnets (Set the Gateways accordingly, driver: bridge).
In the compose files I need to make the container not create their own network, but connect to the network I created.
This example of Jellyfin shows my settings in a configuration with nginx proxy manager.
Jellyfin
---
# Date: 2025-06-01
# https://hub.docker.com/r/linuxserver/jellyfin
# https://jellyfin.org/docs/
services:
jellyfin:
image: lscr.io/linuxserver/jellyfin:latest
networks:
dockernet:
container_name: jellyfin
environment:
- PUID=1002
- PGID=1002
- TZ=${TIME_ZONE_VALUE}
volumes:
- ${PATH_TO_APPDATA}/jellyfin/config:/config
- ${PATH_TO_MEDIA}/series:/data/tvshows
- ${PATH_TO_MEDIA}/films:/data/movies
- ${PATH_TO_MEDIA}/muziek:/data/music
ports:
- 8096:8096
- 8920:8920 #optional
restart: unless-stopped
networks:
dockernet:
external: true # explanation under Nextcloud-AIO
Display More
NGINX proxy manager (NPM)
---
# Date: 2025-06-01
# https://github.com/NginxProxyManager/nginx-proxy-manager
services:
app:
image: jc21/nginx-proxy-manager:latest
restart: unless-stopped
networks:
dockernet:
nextcloud-aio:
ports:
# These ports are in format <host-port>:<container-port>
- 80:80 # no quotes around the ports!
- 443:443
- 81:81
# Add any other Stream port you want to expose
# - 21:21
environment:
#Mysql/Maria connection parameters:
DB_MYSQL_HOST: db
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: npm
DB_MYSQL_PASSWORD: npm
DB_MYSQL_NAME: npm
DISABLE_IPV6: true
volumes:
- ${PATH_TO_APPDATA}/nginxproxymanager/data:/data
- ${PATH_TO_APPDATA}/nginxproxymanager/letsencrypt:/etc/letsencrypt
depends_on:
- db
db:
image: jc21/mariadb-aria:latest
restart: unless-stopped
networks:
dockernet:
environment:
MYSQL_ROOT_PASSWORD: npm
MYSQL_DATABASE: npm
MYSQL_USER: npm
MYSQL_PASSWORD: npm
MARIADB_AUTO_UPGRADE: 1
volumes:
- ${PATH_TO_APPDATA}/nginxproxymanager/mysql:/var/lib/mysql
networks:
dockernet:
external: true
nextcloud-aio:
external: true
Display More
Note that I have connected NPM to two networks. Docker containers in the same docker network have all their ports to each other exposed, so I like Nextloud AIO separated from my other containers.
Nextcloud-AIO
Nextcloud-aio has a mandatory network: nextcloud-aio. Yes, the same network I created earlier, but I think it's important to configure like this. The declaration 'external: true' is to tell docker that the network is configured outside the container. I created the networks in the gui, so 'external: true' should be set here. Also in the other compose files.
In this file I used "init: true" based on the docker docs. I am not sure if it's needed, but based on https://github.com/nextcloud/a…ne/blob/main/compose.yaml it makes sense to add it.
# https://wiki.omv-extras.org/doku.php?id=omv7:docker_in_omv#examples_of_configuration_of_some_containers
# https://github.com/nextcloud/all-in-one
# For custom configuration consult - https://github.com/nextcloud/all-in-one/blob/main/compose.yaml
services:
nextcloud-aio-mastercontainer:
image: nextcloud/all-in-one:latest
restart: unless-stopped
container_name: nextcloud-aio-mastercontainer
init: true
networks:
nextcloud-aio:
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- 8080:8080
environment:
- NEXTCLOUD_DATADIR=${PATH_TO_NC}
- APACHE_PORT=11000
- APACHE_IP_BINDING=127.0.0.1 # important for nginx to refer to 'localhost'
# Apache settings are needed when running behind a web server or reverse proxy, https://github.com/nextcloud/all-in-one/blob/main/compose.yaml
volumes:
nextcloud_aio_mastercontainer:
name: nextcloud_aio_mastercontainer
networks:
nextcloud-aio:
external: true
Display More
In Nginx you can refer to Nextcloud by 'localhost' as in this guide that OMV-extras links to. I think you need this setting for it:
APACHE_IP_BINDING=127.0.0.1
In my nginx proxy host config I don´t use localhost, but the (network)name (use inspect) of nextcloud, in my case: nextcloud-aio-mastercontainer. I am not sure if this Apache setting is needed in my case. By disabling it NC seems to be working fine, but I don´t exactly know what I'm messing with. And I haven´t used NC very much yet to properly test.
I hope this is useful to someone.
Thank you for everyone working on OMV!