How to Install Docker, Docker Compose, and Portainer on OpenMediaVault Using OMV-Extras
This guide will walk you through the steps to get Docker, Docker Compose, and Portainer set up on OpenMediaVault
OpenMediaVault (OMV) is a powerful and flexible NAS (Network Attached Storage) solution based on Debian Linux. By leveraging OMV-Extras, you can easily install Docker, Docker Compose, and Portainer to manage your containers efficiently. This guide will walk you through the steps to get everything set up.
Prerequisites
- A running instance of OpenMediaVault (preferably version 6 or later).
- Basic knowledge of SSH and command-line operations.
- Internet access to download necessary packages.
Step 1: Install OMV-Extras
OMV-Extras is a plugin that extends the functionality of OpenMediaVault by adding additional repositories and plugins.
SSH into your OMV server: Open a terminal and connect to your OMV server using SSH.
ssh your-username@your-omv-ip
Install OMV-Extras: Run the following commands to download and install OMV-Extras.
wget -O - https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/install | bash
Step 3: Enable Docker Repository
- Access OMV Web Interface: Open your web browser and navigate to the OMV web interface (usually
http://your-omv-ip
). - Enable Docker Repo: Go to
System
>OMV-Extras
and enable the Docker repository. ClickSave
and thenApply
.
Step 3: Install Docker Compose
Docker Compose is now part of the openmediavault-compose
plugin. Search for openmediavault-compose
in the plugins section, select it and click on Install button, check the Confirm box and click Yes to install it.
Wait for the OpenMediaVault Compose plugin installation complete, then press Close.
Now the Compose section should appear under Plugin menu:
Step 4: Create user for docker
Go to Users -> Users
> Create User
to create a new user call appuser
. For the Shell scetion, we don't need this account using terminal so choose usr/sbin/nologin
. For Groups, choose users
. Then click Save, and Apply.
Step 5: Configure Docker
- Create a Shared Folder for Docker: Go to
Storage
>Shared Folders
and create a new shared folder nameddockerdata
on your desired volume. - Create a shared folder for compose file:
dockerdata/appdata
as shown in the pictures above. - Similarly, create a shared folder for compose file:
dockerdata/backup_compose
. - Create a shared folder for docker file:
dockerdata/docker
- Create a shared folder for data file in the main HDD (to define a path to a shared folder using the CHANGE_TO_COMPOSE_DATA_PATH variable):
data
- Set Docker Storage Path: Go to
Services
>Docker
>Settings
. Set the Docker storage path to the shared folders you have created. ClickSave
and thenApply
.
Step 5: Install Portainer
Portainer is a lightweight management UI that allows you to easily manage your Docker environments.
- Install Portainer: Go to
Services
>Compose
>Files
. Click onAdd from example
and selectportainer
. Name itportainer
and clickSave
. - Deploy Portainer: In the same
Compose
section, click on theUp
arrow to deploy Portainer. This will download and start the Portainer container. - Access Portainer: Open your web browser and navigate to
http://your-omv-ip:9000
. Follow the setup instructions to configure Portainer.
Conclusion
By following these steps, you should have Docker, Docker Compose, and Portainer up and running on your OpenMediaVault server. This setup allows you to manage your containers efficiently and take full advantage of the powerful features OMV offers.