Last Updated: May 22nd, 2026

Nextcloud Installation Using Docker

Introduction:

This tutorial will explore the download and installation of Docker and Nextcloud. There are many benefits to having a home server or home lab. It can create render many different services and features and a new paradigm shift in how to view technology and navigation of the internet. Docker allow a server to have multiple purposes and offer different features. Virtual Machine and Docker equivalent in in functionality of enabling the server to be versatile in the range of offering different services. However, docker can be more beneficial because freedom, flexibility and hardware dynamics. The virtual machine are allot static hardware capacity and this is where diverges it diverges from docker. Virtual machine have has it's own finite hardware specifications that pulls from the actual system's resources. It has it’s kernel, operating system and system settings. Docker dynamically shares hardware resources through the kernel of the operating system that is actually installed on the server. The docker creates a container, it is sand boxed from the rest of the system, but the container is dependent on the kernel which is able access the hardware resources.

Nextcloud is an open-sources cloud environment with many different functionality and feature rich. It can serve as a cloud back up service, calendar, contacts backup, notes, file sharing. There is many other functionalities such has having a cloud based office suite that can be connected to the instanced to being able to dynamically work on documents or a spreadsheet. It even has the capability of perform video calling or instant messaging. It is a very versatile software program.

Objective:

This tutorial's aim is to provide commands and docker compose in order to successful install Nextcloud onto the home server using Fedora 44 server operating system.

Installation:

The installation of docker and nextcloud will be set up only on the private network, not publicly accessible for the time being. More than likely this tutorial will be updated over time with a comprehensive view. There will be screenshot to show what will transpire after the commands are typed in. Also, for simplicity you can copy and paste the commands the docker compose file in order to simple the process. Nextcloud can rather be difficult to install and setup so hopefully this tutorial will be comprehensive enough to install it on the Fedora server.

  1. Open the terminal and type in the command:

  2. sudo dnf install -y docker docker-compose

    The "-y" flagging means yes to downloading of the required packages and necessary dependencies. You will be prompted to type in your password and followed by pressing enter. The download and installation process will commence.

  3. After docker is installed it maybe required to active system daemon by typing in the command:
  4. sudo systemctl start docker && sudo systemctl status docker

    You will be prompted to type in your password followed by pressing the enter button on the keyboard.

    In the screenshot above, we are looking to see if the system daemon is active which is in a green font color. Press "ctrl + C" to exit.

  5. There are some basic commands that will be unearthed next coming steps to help with running docker. Personally, docker compose it much better to use because it is reusable and it is a file instead of a command. Organization of the system is paramount and it is sufficient to think methodically and organizing everything. We will create a directory with its corresponding directories by typing in the command:
  6. mkdir –p ~/Docker/Nextcloud && cd ~/Docker/Nextcloud

    This command will create the the parent directory with child directories and will change directory into the ~/Docker/Nextcloud. The "-p" flagging represent the parent directory as in it will create the pathway provided.

  7. Now being within the current directory. A file will be created which will be titled "docker-compose.yml"; this is the standard name convention and cannot be customized, but the docker compose file must be unique to it’s own directory. Type in the command:
  8. sudo nano docker-compose.yml

    Now using nano text editor within the terminal will be opened up.

  9. Copy and paste the code below and edit it as necessary in the terminal. The images will be used from the Linux server which do an excellent job of simplifying the installation process of Nextcloud. Configure the code below as needed
  10.         
    ---
    services:
      nextcloud:
        image: lscr.io/linuxserver/nextcloud:latest
        container_name: nextcloud
        environment:
          - PUID=1000
          - PGID=1000
          - TZ=Etc/UTC
          - MYSQL_PASSWORD=Set_this_password!! #change this password for the sql 
          database
          - MYSQL_DATABASE=nextcloud
          - MYSQL_USER=nextcloud
          - MYSQL_HOST=db
        links:
          - mariadb
        volumes:
          - ~/Docker/Nextcloud/config:/config #change the pathway of the directory 
          if necessary
          - ~/Docker/Nextcloud/data:/data #change the pathway of the directory 
          if necessary
        ports:
          - 443:443 # change the internal to something else. The internal port is 
          the 443 for the container
        restart: always
      
      mariadb:
          image: linuxserver/mariadb
          container_name: mariadb2
          environment:
            - PUID=1000
            - PGID=1000
            - MYSQL_ROOT_PASSWORD=Set_this_Password!! #change this password for the 
            root password of the maria database
            - TZ=America/”New York” #set the timezone to your timezone
            - MYSQL_PASSWORD=Set_this_password!! #this password should be the same 
            as the above in the nextcloud instance
            - MYSQL_DATABASE=nextcloud
            - MYSQL_USER=nextcloud
          volumes:
            - ~/Docker/Nextcloud/mariadb:/config #change the pathway if necessary
          ports:
            - 3306:3306 #leave this port alone unless it interferes with another container.
          restart: always
                  
              

    After copy and pasting, the code. Press "ctrl + x" to exit the file then press "Y" meaning yes to save the file and press enter to keep the file name the same and will be closed out.

  11. Next, to confirm the file saved, type in the command below:
  12. cat docker-compose.yml
  13. We will need to create the directories in the ~/Docker/Nextcloud for the docker compose to work properly. Type in the command while being in ~/Docker/Nextcloud
  14. mkdir mariadb config data

    Pressing enter after the command is typed in shows no feedback means the command was successfully executed.

  15. Now we can run the file in order to install the docker container.
  16. sudo docker compose up -d

    The "-d" flagging will hide the all of the background installation and will present a clean screen install. If prompted to type in the password do so and press the "enter" button on the keyboard.

  17. Type in the command below to confirm the Nextcloud and maria database are up and running.
  18. sudo docker ps
  19. We need to locate the private IP address associated the the computer device so type in the command:
  20. ip addr show

    The command will show all of the internet connection and convey which ones are active. Depending on how you are trafficking the internet you will see either “enp” state is “UP” which means the ethernet is connected to the server and this will provide the local ipv4 or inet which is the private network IP address that will be used to navigate to the nextcloud instance. If the device is connected through wifi you should see wlp state is "UP" which means the device is connected to the wifi. Either way you are wanting to retrieve the inet which is the IPV4 address which usually begins with 192.168.000.000. For security reasons, no photo will be provided for this step due to security reasons.

  21. Now open up your web browser and type into the address bar:
  22. https://192.168.000.000:443

    Replace the URL with you private IPV4 address followed by the port.

    This screenshot above is what it should look like for the first time navigation on the private network. However, you will need to submit your information and create an user. This tutorial will be amended over time to show a more in depth view to have the Nextcloud be accessible on the public network which will include Nginx proxy manager and portainer for container management.