How to Install Nextcloud on OpenMediaVault

  • Post author:WunderTech
  • Post published:December 1, 2022
  • Post last modified:May 10, 2024
  • Post category:OpenMediaVault
  • Reading time:8 mins read

In this tutorial, we will look at how to install Nextcloud on OpenMediaVault.

Nextcloud is an extremely popular program and is an absolutely awesome option for OpenMediaVault since there isn’t a great first-party option for this type of application. Nextcloud can be installed relatively quickly and it is extremely powerful. We will look at how to install Nextcloud on OpenMediaVault using OMV6, however, the process will be extremely similar if you’re still running OMV5.

How to Install Nextcloud on OpenMediaVault

Due to how Nextcloud operates (meaning that it uses a database), it’s easiest to configure this with Portainer. In order to get Docker and Portainer running, you must install OMV-Extras, then Docker and Portainer.

Docker and Portainer are a prerequisite, so make sure you install and configure both before looking at how to install Nextcloud on OpenMediaVault.

1. Configure Portainer and navigate to the management UI.

portainer dashboard view.

2. Select Stacks, then Add Stack to create a new stack. This is what we’ll use to create the Nextcloud container and database.

portainer stacks view.

3. Create the stack and set the name as nextcloud.

how to create a stack in portainer.

4. Paste the contents below into the web editor. A few notes:

  • You can adjust the volume details if you’d like. Please keep in mind that these paths are the locations where all important Nextcloud data will be stored. If you’d like to back up or migrate this container, you must use these folders!
  • You should update the passwords below. Make sure the MYSQL_PASSWORD matches for the Database and Nextcloud container.
version: '2'

services:
  db:
    image: mariadb:10.5
    restart: always
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    volumes:
      - /var/lib/docker/volumes/Nextcloud_Database:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=password
      - MYSQL_PASSWORD=password
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

  app:
    image: nextcloud
    restart: always
    ports:
      - 8080:80
    links:
      - db
    volumes:
      - /var/lib/docker/volumes/Nextcloud_Application:/var/www/html
    environment:
      - MYSQL_PASSWORD=password
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=db
web editor of nextcloud stack. how to install nextcloud on openmediavault.

5. After all changes have been made, select Deploy the stack at the bottom to create the two containers.

portainer deploy stack button.

6. The container should now be created! You’ll have one for the Nextcloud container and one for the database.

portainer container list.

Nextcloud Configuration

Now that the container has been created, we can configure Nextcloud.

1. Navigate to your OpenMediaVault server’s IP address and port 8080. Set up a username and password at the first screen, then select Install.

http://[OPENMEDIAVAULT_IP]:8080
nextcloud install screen.

2. Install the recommended apps or skip this step. If you choose to install apps, this step will take a few minutes.

nextcloud recommended apps.

3. Nextcloud will now be ready to use!

nextcloud dashboard.

Nextcloud Remote Access

After configuring Nextcloud, one of the most important things is being able to access it remotely. While you can use it locally only, you’ll soon find that accessing it remotely is extremely helpful. There are many ways to access Nextcloud remotely, but my favorite way of accessing Nextcloud is by VPN.

If you can’t set up a VPN or need users to access your Nextcloud instance without first authenticating with a VPN, I’d suggest looking into a reverse proxy.

Conclusion: How to Install Nextcloud on OpenMediaVault

This tutorial looks at how to install Nextcloud on OpenMediaVault. The process is extremely easy with Portainer as it allows us to utilize Docker Compose. You can also utilize Docker Compose through SSH as well, but the process is a little cleaner with Portainer in my opinion.

Please ensure that the volumes configured are backed up properly as they will hold all Nextcloud data. As mentioned above, if you ever decide to move Nextcloud to a new server, the data that exists in these folders is what must be migrated.

Thanks for checking out the tutorial on how to install Nextcloud on OpenMediaVault. If you have any questions on how to install Nextcloud on OpenMediaVault, please leave them in the comments!

WunderTech

WunderTech is a website that provides tutorials and guides on various NAS, server, networking, and infrastructure-related topics. WunderTech is maintained by Frank Joseph, an IT professional with 14+ years of experience in corporate IT and application management. He focuses on sharing his experience with others on his WunderTech website and YouTube page. Frank holds a Bachelor of Science in Computer Information Systems and a master of Business Administration (MBA).