This document establishes a method to successfully install any application on OMV using Docker.
The OMV forum is a bi-directional tool. Provides users with solutions to their problems. It provides developers with information about user problems and allows them to implement appropriate solutions in software and methods.
In the case of Docker, the forum has received numerous queries about very diverse problems. Based on that forum experience, this document offers a simple method for configuring Docker that fixes the vast majority of these problems before they arise.
Index:
“ A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.
Container images become containers at runtime and in the case of Docker containers – images become containers when they run on Docker Engine. Available for both Linux and Windows-based applications, containerized software will always run the same, regardless of the infrastructure. Containers isolate software from its environment and ensure that it works uniformly despite differences for instance between development and staging. ”
That's all very well, but… What the hell is docker?
That definition is very good and very professional, but it is of little use to people on the street, so we will try to explain in an easier way what docker is and how it works. If you are an experienced docker user you will probably want to skip this part. If this is your first time using docker, keep reading.
Docker is a system that allows you to run an application within your server as if it were an independent and isolated system. It has its own processes, its own file system, and its own networking, all independent of the main (host) server. The container cannot access the host's file systems or network, and vice versa. This is why we say that it is isolated, and way it cannot damage your system. It is safe.
Docker is quite similar to a virtual machine, but with one key difference: a virtual machine includes a complete operating system, with its own kernel, drivers, and services. Docker, on the other hand, does not run a complete operating system. Instead, it uses the host's kernel and only isolates the container's processes, network, and file system.
Because of this, containers consume far fewer resources and start up in a matter of seconds, although their isolation is not as deep as that of a traditional virtual machine.
This makes containers designed for different architectures. A container designed for Raspberry PI (ARM architecture) will not work on an Intel/AMD system (amd64 architecture) and vice versa. You should keep this in mind when choosing a container to install on your system.
Many modern containers include multiple architectures, and Docker will automatically select the correct one. However, not all images support this, so it is important to verify that the image is compatible with your architecture.
At this point it is good to remember that the 32-bit architecture is obsolete, little by little 32-bit containers are disappearing. OMV 8 no longer works on 32-bit systems, so if you were able to install OMV 8, your system is 64-bit. When installing a container, always choose the 64-bit version. Docker will usually select the correct image automatically, but if multiple variants exist, choose the one labeled amd64 or x86_64.
The operation of docker is very simple. Someone on the Internet packages a system into a file we call an image. This image contains the necessary packages for the application we want to use to work. Docker downloads that image, installs it on our server and runs it. We already have a container working.
Now the creator of that image does the corresponding maintenance and publishes a new updated image. Docker can download and apply the new image if you trigger an update. Tools like docker-compose make this easy by pulling the updated image and restarting the container. This way, your container can be kept up to date.
So far so good. But now we want to configure certain information in our application, for example a password to access that application. We could “enter” the container and make that configuration by writing to the /folderpass/password file inside the container. That would work, but on the next image update that /folderpass/password file will be overwritten and the settings will be lost. To solve this Docker allows folder mapping.
Mapping a folder means that Docker will make a configuration such that when the container writes to the /folderpass/password file it will actually be writing to an external folder, a folder located on our server file system. This way, when we update the container image, all its files will be overwritten except /folder/password, since this folder is not in the container but in the file system of the host server, and when the container is running it will be able to continue reading the password that we have stored in our server file system. As an added bonus, mapping a folder makes it easier to manipulate the files in that folder from the server without needing to enter the container.
In the same way that Docker maps folders it can also map network ports, we can map port 3800 that the container uses internally to any port on our server, for example 4100, the container will send data packets to port 3800 internally but Docker will that these packets be sent through port 4100 of our server.
We can also map users. And this is important to understand. The container will work internally as root, but we can make that user be another user on the server, for example the user superman. From that moment on, everything the container does to the mapped files or ports will not be done by root, it will be done by superman. That allows us to restrict the permissions of that container, we only have to restrict the permissions of the superman user of our system. We will give the user superman write permissions to the /folderpass/password file on our system so that he can write or modify that file but we will not give him permissions to write to any other folders. In this way we ensure that the container remains isolated.
To define all these container configurations the openmediavault-compose plugin uses docker-compose for its simplicity. Using a configuration file of a few lines we define the mappings and other configurations of a container and then we execute it.
To map a user we define the PUID value, the user's identifier, and to map the group it will be the PGID value, the group's identifier. In the OMV GUI we can see the PUID value for each user in the USERS > USERS tab by opening the UID and GID columns using the icon at the top right. So if the user superman has the values 1004 and 100, in the compose file we would do something like this:
- PUID=1004
- PGID=100
The way to map a folder (volume) in docker-compose is something like this:
- /srv/dev-disk-by-uuid-9d43cda9-20e5-474f-b38b-6b2b6c03211a/appdata/folderpass:/folderpass
That could be one of the lines in the compose file that defines a container. This line is divided into two parts. To the left of the : we have /srv/dev-disk-by-uuid-9d43cda9-20e5-474f-b38b-6b2b6c03211a/appdata/folderpass which is the path of a real folder on our server, in our file system. On the right of the : we have /folderpass which is the path of a folder within the container, in its own file system.
| Beginners Info | |
|
All that long string of numbers is the path of one of our disks on the server and inside that disk we have an appdata folder and inside we create the folderpass folder Filesystem mount paths are usually in the /srv folder and the following folder contains a uuid to uniquely identify that drive. That folder is the mount folder for that hard drive. You should never modify the permissions of that folder or use it to create a shared folder. Create a folder inside to use as a shared folder. | |
From now on, every time the root user of the container writes to its /folderpass folder, what will really be happening is that the superman user will be writing to our /srv/dev-disk-by-uuid-9d43cda9-20e5-474f-b38b-6b2b6c03211a/appdata/folderpass folder from our server. The content of that folder is what we call persistent data. Naturally we must give permission to the superman user on our server to write to that folder or the container will throw an error.
The advantage of all this is that the container is limited to writing to that folder. We could be unlucky enough to download an image that has harmful code inside. Or if that container was exposed to the internet and had a security hole, perhaps it could be hacked. In this case the hacker could take control of the root user of the container. The advantage is that that root user on our system is actually the superman user, and in this case, no matter how superman he is, he can only write to the /folderpass folder, so he cannot access our server in any way. The user superman does not have permissions to write or read any other files on our server. Contained threat.
Conclusion. Never map the container user to the root user of the server, unless it is absolutely necessary and the container developer is fully trusted. If there were a security hole in that container, your server would be at the mercy of the hacker, since they would have permissions for everything. Related to this, never include the user running a container in the docker group, this is another story but any user in the docker group can gain root access to the system by escalating permissions.
If you're reading this, it's probably your first time using Docker. Docker may seem complicated at first glance, but once you get over the initial learning curve, setting up and installing a container literally takes less than 30 seconds. Keep going.
| Note | |
| You should read this even if you are an experienced Docker user but have no experience with OMV. | |
Docker’s security model is based on a simple principle: a container has exactly the same permissions as the user (UID/GID) it is executed with.
The easiest way to manage this in OMV is to create a dedicated user —for example, appuser— and use it to run all your containers. Simply grant it read/write access only to the folders required by your containers. This prevents containers from accessing other parts of the system and provides a solid level of security.
In OMV, all users created through the GUI belong by default to the primary group users (GID=100). Shared folders are also created with ownership set to root:users (user=root, group=users), with read/write permissions for both. This is the standard Linux filesystem permission layer.
This means that any user created from the GUI automatically has read/write access to any shared folder, since they belong to the users group —unless you explicitly restrict it using OMV’s permission management, which is a higher-level Samba layer.
OMV applies a Samba permission layer on top of the filesystem permissions. These are the permissions you manage from the OMV GUI.
If you use a single user like appuser, it will have access to all the folders you allowed through the GUI. This works well for most containers, but not for every scenario. For example, if the Jellyfin container should only access /Media, but Nextcloud requires /Documents as well, both containers would need to run under a user with access to /Documents.
This may not be desirable if one of the containers is exposed to the Internet.
If you need maximum separation, you can create one user per container —but this only works properly if you avoid the users group (GID=100). To do so, you must create the users from the CLI:
sudo useradd -U jellyfin
This creates:
When you return to the GUI, you will see the user and can manually add it to its own group. This way, all files created by the container will belong to the jellyfin user/group, and no other container will be able to access them unless you explicitly add that container’s user to the group. You also retain full control to grant permissions to your shared folders individually.
In this document, we will use a single appuser created from the GUI. This is sufficient for 99% of users.
If your use case requires stronger isolation between containers, apply the techniques described to create users outside of GID=100 and assign them individually.
In OMV8's GUI:
Under SYSTEM > OMV-EXTRAS, click the DOCKER REPO button and then click SAVE. This activates the Docker repository so you can install Docker and the Compose plugin.
Next, go to SYSTEM > PLUGINS, find and select openmediavault-compose 8.X, and click INSTALL.
| Warning | |
| Do not uninstall the openmediavault-sharerootfs plugin. It is a dependency of the openmediavault-compose. Uninstalling openmediavault-sharerootfs while openmediavault-compose is installed will also remove the openmediavault-compose plugin. | |
The first step is to define the folders where the different data is stored. To do this, we go to SERVICES > COMPOSE > SETTINGS.
There are many possible NAS layouts. First we will look a simple setup, and then a more advanced configuration.
| Beginners Info | |
|
Installing OMV on a USB flash drive may seem unusual to newcomers, but you may be surprised to learn that many professional-grade servers boot directly from USB devices. This approach provides several advantages and no drawbacks:
| |
In this simple setup, the OMV operating system runs from a USB stick, and there is a single data drive that stores all NAS data. On this drive we will configure Docker and all related folders.
The following diagram shows a schematic example of this layout:
In this case, all required folders are located on the same drive, which makes the configuration very straightforward.
All folders will live under the mount point of that drive, for example: /srv/dev-disk-by-uuid…/appdata
Create these shared folders from the OMV GUI, then follow the explanations in section 2.3. Just keep in mind that, in this simple scenario, all paths will be inside the same mount folder—for example:
/srv/dev-disk-by-uuid-…/docker/srv/dev-disk-by-uuid-…/backup_composeSince there is only one data drive, everything lives under the same location.
In more advanced setups, your system may look similar to the following example.
The diagram below represents a typical OMV NAS layout. From this point onward, all explanations in the document will be based on this example system. Your own system will probably differ — simply adapt the configuration logic to match your real setup.
On the right side, you can see how the plugin’s SETTINGS tab may look after applying this configuration. If your system is simpler or more complex, adjust the folder paths accordingly.
In any case, the main recommendation here is to keep Docker data separate from the OMV operating system.
You can name these folders however you prefer. In this document we use the names shown in the diagrams for clarity. The example folders are:
appdatadatabackup_composedocker(These names match the diagrams in this document. You can create the shared folder with any name you prefer; the plugin will work the same.)
We will review them one by one below.
| Beginners Info | |
Why you should keep Docker off the OS drive (this may surprise Windows users — Linux handles storage differently):
| |
| Beginners Info | |
|
Recommended capacity for the Docker drive Required size depends on the number and type of containers. A sensible minimum is **60–100 GB**. If you run media servers (Jellyfin, Plex) with very large libraries, consider **250–500 GB** or more. Nextcloud can also require significant storage depending on your usage. | |
| Note | |
| If your NAS already contains data, you probably already have a data folder (it may use a different name). Select that folder in the plugin settings if appropriate. | |
appdata
(This name matches the diagrams in this document. You can create the shared folder with any name you prefer; the plugin will work the same.)
| Beginners Info | |
| Each container is defined by two files: the yml (service definitions: image, volumes, ports, etc.) and the env (environment variables for that container). You do not need to edit the env file manually for common tasks. | |
| Beginners Info | |
|
This folder will store the persistent data of each container. Example for Jellyfin config: /srv/dev-disk-by-uuid-.../appdata/jellyfin/config:/config When the container starts, Docker will create missing subfolders (for example, jellyfin and config) automatically. Don't worry for now, we'll see it with examples later. | |
| Warning | |
|
Always create a subfolder inside each container directory in appdata to store persistent data. ❌ Do NOT do this: /srv/.../appdata/jellyfin:/config → Docker writes directly inside appdata/jellyfin and modifies its permissions. ✔️ Do this instead: /srv/.../appdata/jellyfin/config:/config → Keeps data isolated and preserves the plugin’s permissions. | |
| Advanced configuration. | |
|
The compose plugin supports relative paths in volume definitions. Using relative paths ensures the data is stored in the correct subfolder. Example for Jellyfin: - ./config:/config This creates: /appdata/jellyfin/config The plugin also supports symlinks to define volume paths. You can create them with the openmediavault-symlinks plugin or manually. Both systems (relative paths and symlinks) can be combined. | |
data
(This name matches the diagrams in this document. You can create the shared folder with any name you prefer; the plugin will work the same.)
CHANGE_TO_COMPOSE_DATA_PATH variable defined in the compose file is automatically replaced with the shared folder you configure here.
backup_compose
(This name matches the diagrams in this document. You can create the shared folder with any name you prefer; the plugin will work the same.)
| Note | |
|
In the system diagram of this document, the backup_compose folder is located on the NVMe drive rather than on the dedicated backup drive. The plugin’s scheduled backup function is designed to produce a consistent and up-to-date copy of your persistent data by temporarily stopping the containers during the backup and starting them again afterward. Since each backup overwrites the previous one, this folder is ideal for use together with a separate backup application, which can then create versioned and/or compressed backups without needing to stop the containers. If you prefer, you can place this folder directly on your backup drive instead — both approaches are valid. | |
docker
(This name matches the diagrams in this document. You can create the shared folder with any name you prefer; the plugin will work the same.)
| Warning | |
|
The filesystem hosting the docker folder should preferably be EXT4. If you need to place it on ZFS or BTRFS file system, consult the official Docker documentation for the required configuration. Never use an NTFS file system for Docker data — it does not work and will lead to failures. (or generally for anything on linux other than a staging mount for copying data). Do not place the Docker folder in a mergerfs pool, as Docker will spread its internal files across multiple drives, eventually causing corruption or operational problems. If the only storage available is inside a mergerfs pool, you may: - Create the Docker folder directly on a specific drive that belongs to the pool instead of inside the pool, and configure the plugin using the absolute path of that drive. - Avoid using mergerfs rebalance on that pool, as it may move Docker’s files to another drive and break Docker. | |
| Advanced configuration. | |
|
You can manually edit /etc/docker/daemon.json to customize Docker’s behaviour. This is required, for example, to configure an NVIDIA GPU driver or to set a custom storage driver for certain filesystems. If you need to customize this file, simply leave the Docker storage field empty in the plugin settings — the plugin will not modify the file. | |
If you read the introduction, you already know whether the appuser user is sufficient for your needs or if you should create a custom user.
If you are happy with this user for some or all containers, proceed; otherwise, customize it as explained earlier.
render and video groups.| Warning | |
| Do not add appuser to the docker group. This creates a security hole. | |
/media for Jellyfin movies).| Beginners Info | |
|
To create the appuser user in the OMV GUI: - Go to the USERS > USERS tab and press the +CREATE button. - In the NAME field type appuser - In the PASSWORD field define a strong password and confirm it. - If needed, add appuser to the required groups by clicking the GROUPS field. - Click SAVE. To assign permissions to appuser, select appuser and press the SHARED FOLDER PERMISSIONS button. - For each folder, choose the appropriate permissions and ensure the box is highlighted in yellow. - Click SAVE. | |
| Warning | |
|
Except in very controlled special cases, never assign the admin user (UID=998) or root (UID=0) to manage a container. This is a serious security flaw. Doing so gives the container unrestricted access to your system. Consider carefully what the container is capable of doing before assigning elevated privileges. | |
Global environment variables will be used in the procedure that follows this document.
The plugin allows you to define global environment variables in a file that will be available to all running containers. This means that the variables defined in this file can be used in the different compose files. When you start a container, docker will replace those variables with their real values.
This is very useful for defining paths to folders or the user running the container. We define these values once and have them updated automatically in all containers.
# THE FOLLOWING VARIABLES CAN BE USED IN ANY COMPOSE FILE # THEIR VALUE WILL BE REPLACED BY THE VALUE ASSIGNED HERE # YOU CAN ADD AS MANY VARIABLES AS YOU NEED # # # Customize the PID and GID value of your appuser user. # You can see it in the OMV GUI in the USERS > USERS tab # APPUSER_PUID=1002 APPUSER_PGID=100 # # Customize your time zone value. # You can see it in the OMV GUI in the SYSTEM > DATE & TIME tab # TIME_ZONE_VALUE=Europe/Madrid # # In this file you can define how many paths you need for different compose files. # The following are examples corresponding to the example system in the Docker on OMV document on the omv-extras wiki. # Customize the values according to your system configuration. # PATH_TO_APPDATA=/srv/dev-disk-by-uuid-9d43cda9-20e5-474f-b38b-6b2b6c03211a/appdata PATH_TO_DATA=/srv/mergerfs/pool/data PATH_TO_DOCUMENTS=/srv/mergerfs/pool/data/documents PATH_TO_MEDIA=/srv/mergerfs/pool/data/media PATH_TO_MOVIES=/srv/mergerfs/pool/data/media/movies PATH_TO_PHOTOS=/srv/mergerfs/pool/data/media/photos PATH_TO_BACKUPS=/srv/dev-disk-by-uuid-384444bb-f020-4492-acd2-5997e908f49f/backups PATH_TO_DOWNLOADS=/srv/dev-disk-by-uuid-384444bb-f020-4492-acd2-5997e908f49f/downloads
---
services:
jellyfin:
image: lscr.io/linuxserver/jellyfin:latest
container_name: jellyfin
environment:
- PUID=${APPUSER_PUID}
- PGID=${APPUSER_PGID}
- TZ=${TIME_ZONE_VALUE}
volumes:
- ${PATH_TO_APPDATA}/jellyfin/config:/config
- ${PATH_TO_APPDATA}/jellyfin/cache:/cache
- ${PATH_TO_MEDIA}:/media
ports:
- 8096:8096
restart: unless-stopped
---
services:
jellyfin:
image: lscr.io/linuxserver/jellyfin:latest
container_name: jellyfin
environment:
- PUID=1002
- PGID=100
- TZ=Europe/Madrid
volumes:
- /srv/dev-disk-by-uuid-9d43cda9-20e5-474f-b38b-6b2b6c03211a/appdata/jellyfin/config:/config
- /srv/dev-disk-by-uuid-9d43cda9-20e5-474f-b38b-6b2b6c03211a/appdata/jellyfin/cache:/cache
- /srv/mergerfs/pool/data/media:/media
ports:
- 8096:8096
restart: unless-stopped
What this variable system does is convert the variables that we have defined in the compose file into the actual values that we need to define in the compose file. If we are only creating one compose file it may not make much sense, but it is very useful when there are several compose files.
The advantage of using this system is that we define the compose file once and never need to modify it. Even if we reinstall the OMV system we just need to update those global variables and all our containers will be up to date and continue to work as before.
| Note | |
|
At this time, the plugin fully supports global environment variables, even while using the plugin's backup utility, so there is no reason to use symlinks. But if you want to use them for some reason, you can still do so. If you don't want to use environment variables, simply write the full values to the compose files without using variables. | |
| Note | |
| If you have configured folders in the plugin's SETTINGS tab, the example files will usually work as is, but you may want to modify them to optimize your settings. If you finish reading this document and look at any of the example files, you will understand why. | |
| Beginners Info | |
| You will find containers where the creator has not published a compose file. Containers can be run from the CLI with a command line. The plugin uses docker-compose for easy setup but you need that compose file. If you can't find it, you can build it yourself using Composerize and starting from that container's docker command. There is a prepared Composerize container in the plugin's examples list. | |
# https://hub.docker.com/r/linuxserver/jellyfin
services:
jellyfin:
image: lscr.io/linuxserver/jellyfin:latest
container_name: jellyfin
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- JELLYFIN_PublishedServerUrl=192.168.0.5 #optional
volumes:
- CHANGE_TO_COMPOSE_DATA_PATH/jellyfin/library:/config
- CHANGE_TO_COMPOSE_DATA_PATH/jellyfin/tvseries:/data/tvshows
- CHANGE_TO_COMPOSE_DATA_PATH/jellyfin/movies:/data/movies
ports:
- 8096:8096
- 8920:8920 #optional
- 7359:7359/udp #optional
- 1900:1900/udp #optional
restart: unless-stopped
| Note | |
| Verify on the official page that this compose file has not changed before installing it | |
| Beginners Info | |
|
WHAT A COMPOSE FILE IS LIKE A compose file is a yaml format file that is used to define the configurations that docker will adjust to the downloaded image to form the container. The parts of this composition file for jellyfin are as follows: services: It is always the first line and gives way to the definition of the different services. jellyfin: Is the name of a service in this compose file. In this case there is only one but there could be more. image: Defines where the container is downloaded from, in this case linuxserver. This value may have options to download different versions of images. In this case the word latest indicates that the latest available version will always be downloaded. container_name: Simply the name of the container for this service, in this case jellyfin. environment In this section some environment values are defined, such as in this case the user who will run the container, the time zone, or others. volumes Here we define the folder mounts in the container. ports To define port mounts. restart Tells docker how we want the container to behave when the server starts, etc. In this case, the container will always be running unless we stop it manually. | |
The next thing we need to do is adapt the container configurations so that it works on our system. We will see it below step by step.
The first line contains a link to the website of the container developer, useful to reach quickly and take a look. It is always a good idea to read the editor's comments to familiarize yourself with the options and check that the container is valid for your architecture (x86, arm…) or see special configurations that we may need.
To customize this compose file we will follow the system example used in the previous point of this document and the generated environmental global variables file, which is as follows:
# THE FOLLOWING VARIABLES CAN BE USED IN ANY COMPOSE FILE # THEIR VALUE WILL BE REPLACED BY THE VALUE ASSIGNED HERE # YOU CAN ADD AS MANY VARIABLES AS YOU NEED # # # Customize the PID and GID value of your appuser user. # You can see it in the OMV GUI in the USERS > USERS tab # APPUSER_PUID=1002 APPUSER_PGID=100 # # Customize your time zone value. # You can see it in the OMV GUI in the SYSTEM > DATE & TIME tab # TIME_ZONE_VALUE=Europe/Madrid # # In this file you can define how many paths you need for different compose files. # The following are examples corresponding to the example system in the Docker on OMV document on the omv-extras wiki. # PATH_TO_APPDATA=/srv/dev-disk-by-uuid-9d43cda9-20e5-474f-b38b-6b2b6c03211a/appdata PATH_TO_DATA=/srv/mergerfs/pool/data PATH_TO_DOCUMENTS=/srv/mergerfs/pool/data/documents PATH_TO_MEDIA=/srv/mergerfs/pool/data/media PATH_TO_MOVIES=/srv/mergerfs/pool/data/media/movies PATH_TO_PHOTOS=/srv/mergerfs/pool/data/media/photos PATH_TO_BACKUPS=/srv/dev-disk-by-uuid-384444bb-f020-4492-acd2-5997e908f49f/backups PATH_TO_DOWNLOADS=/srv/dev-disk-by-uuid-384444bb-f020-4492-acd2-5997e908f49f/downloads
# https://hub.docker.com/r/linuxserver/jellyfin
services:
jellyfin:
image: lscr.io/linuxserver/jellyfin:latest
container_name: jellyfin
environment:
- PUID=${APPUSER_PUID} # See Comment 1
- PGID=${APPUSER_PGID} # See Comment 1
- TZ=${TIME_ZONE_VALUE} # See Comment 2
#- JELLYFIN_PublishedServerUrl=192.168.0.5 # See Comment 3
volumes:
- ${PATH_TO_APPDATA}/jellyfin/config:/config # See Comment 4
- CHANGE_TO_COMPOSE_DATA_PATH/media:/media # See Comment 4
devices: # See Comment 5
- /dev/dri:/dev/dri # See Comment 5
ports:
- 8096:8096 # See Comment 6
restart: unless-stopped
| Beginners Warning | |
|
This file is in Yaml format, indentations are important. If you do not respect the indentations, Docker will not be able to interpret the configuration file and the container will give an error and will not start. Whenever you ask for help on the forum, post the compose file in a code box to show the indentations so you can get help. To create a code box in the forum press the corresponding button in the toolbar. Hides sensitive data, such as passwords, email addresses, etc. | |
Etc/UTC the container will use the Coordinated Universal Time.cat /etc/timezone in a terminal.# at the beginning and replace the IP with the real IP of your server.192.168.1.100 the line would look like this: - JELLYFIN_PublishedServerUrl=192.168.1.100| Beginners Info | |
|
On the left the folder on the host. On the right the folder in the container. Read the introduction of this document to understand folder mapping. | |
| Advanced configuration | |
|
You can use relative paths. Set the volume mapping in the compose file: - ./config:/config will create the folder ${PATH_TO_APPDATA}/jellyfin/config on the host. | |
| Beginners Info | |
| This will be the persistent data for this container. If we need to reset the container, it is enough to stop it, delete this folder and start the container. We will find it in its initial state and ready to configure from scratch. | |
/srv/mergerfs/pool/data/media. We can use that route or take advantage of the facilities that the plugin gives us to define routes.CHANGE_TO_COMPOSE_DATA_PATH is equivalent in our case to /srv/mergerfs/pool/dataPATH_TO_DATA=/srv/mergerfs/pool/data. In the compose file we would write this line - ${PATH_TO_DATA}/media:/media:/media| Note | |
|
In the case of jellyfin the libraries are configured from the container, we just need it to be able to see them. That is to say, it is not necessary to map movies on the one hand and photos on the other hand, although we could do it that way too. To make it easier, we map a single volume that contains everything. Later from jellyfin we will search each folder for each library. /media/movies /media/photos etc. | |
Devices: section to the compose file and mount the /dev/dri volume so that Jellyfin can read it using the line - /dev/dri:/dev/dri/dev/dri folder on his file system docker will cause the container to actually read the server filesystem folder /dev/dri8096 on both sides of :8888, then the separator : and on the right the one that specifies the original stack 8096, which is used internally by the container. The result would be - 8888:8096| Beginners Info | |
|
You should always make sure that the port mapped on the host is free. There are special cases where the container needs port 80 and/or port 443, with Nginx Proxy Manager. OMV uses those ports to access the GUI. You can change them in System Workbench. Another special case is pihole, which needs port 53. OMV uses port 53 and we cannot occupy it, so in this case it can be solved with a VLAN. There is a procedure in the openmediavault-compose plugin document on this wiki. | |
When you run that container, what will actually be executed is the following. If you don't want to use global environment variables you can do it just like this. It will work the same way:
services:
jellyfin:
image: lscr.io/linuxserver/jellyfin:latest
container_name: jellyfin
environment:
- PUID=1002
- PGID=100
- TZ=Europe/Madrid
volumes:
- /srv/dev-disk-by-uuid-9d43cda9-20e5-474f-b38b-6b2b6c03211a/system/appdata/jellyfin/config:/config
- /srv/mergerfs/pool/data/media:/media
devices:
- /dev/dri:/dev/dri
ports:
- 8096:8096
restart: unless-stopped
: and the access port defined in the previous point. In this case, if the IP of our server were, for example, 192.168.1.100, we would write http://192.168.1.100:8096 to access Jellyfin.</> button in the toolbar of the box in which you write the post.
Once the global environment variables file is configured, implementing containers is very simple. Some examples may be those listed below.
In each of them the container has been configured following the system and folder scheme outlined in this document. Adapt it to your server configuration if it is different.
Useful application to make encrypted, versioned, compressed and deduplicated backups locally or remotely.
# https://hub.docker.com/r/linuxserver/duplicati
services:
duplicati:
image: lscr.io/linuxserver/duplicati:latest
container_name: duplicati
environment:
- PUID=${APPUSER_PUID}
- PGID=${APPUSER_PGID}
- TZ=${TIME_ZONE_VALUE}
#- CLI_ARGS= #optional
volumes:
- ${PATH_TO_APPDATA}/duplicati/config:/config
- ${PATH_TO_BACKUPS}/duplicati/backups:/backups
- ${PATH_TO_DOCUMENTS}:/source/documents:ro # :ro makes the container only have read access to this volume
- ${PATH_TO_PHOTOS}:/source/photos:ro
ports:
- 8200:8200
restart: unless-stopped
###########################
# This compose file is customized following the document: "Docker in OMV" from the OMV-Extras wiki.
# Adapt it to your server if the configuration is different.
# https://wiki.omv-extras.org/doku.php?id=omv7:docker_in_omv
###########################
Application to synchronize folders between different devices and the server, such as smartphones or PCs.
# https://hub.docker.com/r/linuxserver/syncthing
services:
syncthing:
image: lscr.io/linuxserver/syncthing:latest
container_name: syncthing
hostname: syncthing #optional
environment:
- PUID=${APPUSER_PUID}
- PGID=${APPUSER_PGID}
- TZ=${TIME_ZONE_VALUE}
volumes:
- ${PATH_TO_APPDATA}/syncthing/config:/config
- ${PATH_TO_DOCUMENTS}/mary/syncthing:/mary # If your name is not Mary, modify this
- ${PATH_TO_DOCUMENTS}/peter/syncthing:/peter # If your name is not Peter, modify this
ports:
- 8384:8384
- 22000:22000/tcp
- 22000:22000/udp
- 21027:21027/udp
restart: unless-stopped
###########################
# This compose file is customized following the document: "Docker in OMV" from the OMV-Extras wiki.
# Adapt it to your server if the configuration is different.
# https://wiki.omv-extras.org/doku.php?id=omv7:docker_in_omv
###########################
This container will allow you to publish services (for example jellyfin) on the internet securely with Let's encrypt certificates. It has a very intuitive administration GUI.
| Advanced configuration. | |
|
NPM requires ports 80 and 443 on the router to validate Let's Encrypt certificates. You can free those ports by changing the ones used by the OMV GUI as suggested or you can do a forwarding from the router to the container. To do this, forward 80 and 443 on the router to, for example, 30080 and 30443 with the server's IP. In the NPM container it collects these ports using: - 30080:80 - 30443:443 The result will be the same, the container will receive the traffic from those router ports and you will still have the OMV GUI on port 80 and 443 of your local network. | |
# https://nginxproxymanager.com
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80' # Public HTTP Port
- '443:443' # Public HTTPS Port
- '81:81' # Admin Web Port
# Add any other Stream port you want to expose
# - '21:21' # FTP
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"
# Uncomment this if IPv6 is not enabled on your host
# 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
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
###########################
# This compose file is customized following the document: "Docker in OMV" from the OMV-Extras wiki.
# Adapt it to your server if the configuration is different.
# https://wiki.omv-extras.org/doku.php?id=omv7:docker_in_omv
###########################
admin@example.comchangemeNextcloud is a private cloud hosting system. You will be able to access the files on your server from the internet.
This container is the official version of Nextcloud AIO (All In One). It has a configuration GUI that installs and manages several containers at the same time.
Before installing Nextcloud you need to previously install a proxy, such as the one described above Nginx Proxy Manager (you can use any other proxy supported by Nextcloud AIO, check their documentation for other options). Install NPM first and configure it following these instructions: NPM configuration for Nextcloud AIO (Click on “click to expand” in the option for Nginx-Proxy-Manager)
For this container to work you will have to do the following:
# 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
init: true
restart: always
container_name: nextcloud-aio-mastercontainer
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- 8080:8080
environment:
- APACHE_PORT=11000
- NEXTCLOUD_DATADIR=${PATH_TO_APPDATA}/nextcloud_data
volumes:
nextcloud_aio_mastercontainer:
name: nextcloud_aio_mastercontainer
###########################
# This compose file is customized following the document: "Docker in OMV" from the OMV-Extras wiki.
# Adapt it to your server if the configuration is different.
# https://wiki.omv-extras.org/doku.php?id=omv7:docker_in_omv
###########################
Notice that we have configured the Nextcloud data volume in the appdata folder. This is due to two reasons.
All of this can be easily overcome by using the Nextcloud External Storage Plugin to mount those shared folders from the Nextcloud GUI, for example with samba. This will allow you to continue using those files within Nextcloud but outside of its database. Then in the data volume set up for Nextcloud there will only be information such as phone books or calendars of the different users, which do not take up much space and can be stored on a small and fast disk.
| Note | |
|
Nextcloud AIO is a container that spawns other containers and stores them in the docker folder. The openmediavault-compose plugin backup utility does not back up data in this folder. If you want to have a backup of this container you must use the internal backup function of Nextcloud AIO. In the Nextcloud AIO GUI you must establish where this backup is saved and how often it should be done, Nextcloud AIO takes care of everything else, stopping containers, making the backup and starting containers again. | |
| Beginners Info | |
| Most of the example compose files will work out of the box if you run them without making any modifications. But it will probably be better to adapt them to your system configuration according to everything explained in this document. This will avoid unexpected situations. | |
If you can't find a container that fits what you need in the plugin's list of examples or on the internet, you can create an image yourself and run the container from that image. To do this you can use Dockerfile.
The openmediavault-compose plugin makes it easy to create images using the Dockerfile. You can see its use here → Dockerfiles
Especially useful is this feature of the plugin. You will be able to selectively schedule container updates. And you can also make backups of the containers and volumes you want on a scheduled basis.
See how to do it in the corresponding section of the plugin document in this wiki → Schedule (Updates and Backups)
If for any reason you need to modify the container configuration, change the location of a volume or any other circumstance, do the following:
If you want to restore the container to its initial state, do the following (This will remove any configuration we have made to the container):
/srv/dev-disk-by-uuid-9d43cda9-20e5-474f-b38b-6b2b6c03211a/appdata/jellyfin/config
You can find several useful procedures in the corresponding section of the openmediavault-compose plugin document. Among them you will find a procedure to configure a vlan that will allow you to install pihole or adguard. → Usual procedures
We, who support the openmediavault project, hope that you’ll find your openmediavault server to be
enjoyable, efficient, and easy to use.
If you found this guide to be helpful, please consider a modest donation to support the
hosting costs of this server (OMV-Extras) and the project (Openmediavault).
OMV-Extras.org