How to Install Nextcloud AIO on Docker | Step-by-Step

April 10th, 2024
How to Install Nextcloud AIO on Docker | Step-by-Step

Nextcloud has become a go-to solution for secure file hosting and collaboration. Now, picture a Nextcloud setup that's remarkably simple. A setup where you don't need to worry about complex configurations or your limited Docker knowledge - that's what the Nextcloud All-in-One (AIO) offers.

In our previous Nextcloud installation tutorial, we covered the installation process using the regular Nextcloud Docker image. Here, you'll see how it is done with the Nextcloud AIO Docker image, promising a simplified deployment process.

What is Nextcloud AIO?

Nextcloud All-in-One (AIO) is a web frontend that lets you set up your Nextcloud and its add-on Docker containers and simplifies the process. The Nextcloud AIO image simplifies the Nextcloud installation process by bundling all the necessary components (Nextcloud, web server, and database) into a single image.

Unlike the regular image, the AIO image significantly reduces configuration steps. It also provides easy installation, deployment, and maintenance of your Nextcloud application, making it an attractive option for those looking for simplicity and those with limited knowledge of Docker.

Ready to supercharge your Docker infrastructure? Scale effortlessly and enjoy flexible storage with Cherry Servers bare metal or virtual servers. Eliminate infrastructure headaches with free 24/7 technical support, pay-as-you-go pricing, and global availability.

Prerequisites

This Nextcloud AIO tutorial involves a hands-on demonstration. To follow along, make sure you have the following:

Install Nextcloud AIO on Docker: Step-by-Step process

The steps below show you how to install Nextcloud AIO on Docker; the process is split into two parts. In the first part, you’ll set up the project environment and learn how to configure a few settings on your server. After the server is ready, the second part shows how to install Nextcloud without relying on additional web server or proxy configurations.

Part 1: Set up the project environment

Here, you'll start by configuring a few settings on your server for the Nextcloud installation.

Step 1 - Connect to the server

Begin by connecting to your server through SSH. In your terminal, type the following command:

ssh user@your_server_IP

Replace "user" with your username and "your_server_IP" with your server's IP address.

Connect to the server via SSH

Step 2 - Verify Docker installation

Now confirm that you have Docker installed on your server using the command:

systemctl is-active docker

Confirm if Docker is installed on the server

Step 3: Update system packages

Next, update the server's system packages by running:

apt update && apt upgrade

Update system packages

Step 4 - Update server hostname

Next, update the server hostname to match the domain pointing to your server. Using the Nano editor, open the hostname file using the following command:

sudo nano /etc/hostname

Update server hostname

Enter the domain and save the file.

Step 5 - Create a local user with sudo and Docker access

Next, create a non-root user and grant them access to both sudo and Docker groups. Run the following commands:

adduser demo-user
usermod -aG sudo demo-user
usermod -aG docker demo-user

You can replace "demo-user" with a username you prefer.

Create a non-root user

Step 6 - Enable the firewall and reboot the server

Next, execute these commands to enable the firewall and open the necessary ports for Nextcloud:

sudo ufw allow 22/tcp && sudo ufw enable 
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 8080/tcp
sudo ufw allow 8443/tcp
sudo ufw allow 3478

Enable the firewall and open ports

Once done, reboot the server to apply the changes:

reboot

Reboot the server

Step 7 - SSH into the server as the local user

Now, connect to your server using the local user you set up. Run the following SSH command:

ssh demo-user@your_server_IP

Connect to the server using non-root user

Part 2: Install Nextcloud AIO (All-in-One)

Now, your server is ready for the Nextcloud AIO installation. In this section, you'll go through the steps of installing Nextcloud without relying on additional web server or proxy configurations.

Step 1 - Start the Nextcloud container

To start the Nextcloud AIO container, execute the following command:

docker run \
--init \
--sig-proxy=false \
--name nextcloud-aio-mastercontainer \
--restart always \
--publish 80:80 \
--publish 8080:8080 \
--publish 8443:8443 \
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
nextcloud/all-in-one:latest

This command will pull and extract all the necessary files and get the Nextcloud AIO container up and running. The Nextcloud AIO container bundles all the components required for Nextcloud.

Pulling the Nextcloud AIO image

Nextcloud AIO master container up

Step 2 - Access the Nextcloud AIO setup interface

After the initial setup, you can access the Nextcloud AIO interface either by going to https://internal.ip.of.your.server:8080 or if your server uses ports 80 and 8443 and you've linked a domain, access the Nextcloud AIO Interface at https://your-nextcloud-domain:8443 in your browser.

On the setup page, you should see a password displayed. Save the password for later use. Click "Open Nextcloud AIO" to go to the login page.

Copy generated password

Step 3 - Login to Nextcloud AIO

On the Nextcloud AIO login page, input the password you saved earlier and click "Log in".

Nexcloud AIO login page

Step 4 - Configure the domain for your Nextcloud AIO instance

On the next page, the container page, you'll be required to input the domain you want to use to create a new Nextcloud AIO instance. After inputting the domain, click on "Submit domain".

Submit domian

Step 5 - Install Nextcloud AIO

Next, let’s install Nextcloud AIO. For this, select the optional containers you'd like to enable and click the "Download and start containers" button.

Click Download and start containers

You should see an indication that the containers are being downloaded.

Downloading

Once downloaded, you should see a message on the screen that the containers are starting.

Containers are starting

Wait until you see that all the containers have started. With all the containers running (green circles), you should get an initial Nextcloud username and password generated.

Step 6 - Access your Nextcloud AIO dashboard

Now, you can access the Nextcloud app. Click the "Open your Nextcloud" button to access the Nextcloud login page.

Initial nextcloud username and password displayed

On the login page, input the initial Nextcloud username and password displayed.

Nextcloud login

If successful, you should see your Nextcloud app dashboard.

Accessing the Nextcloud dashboard

Explore how web hosting service provider Debesis improved its service quality, performance, and reliability by migrating to Cherry Servers' bare-metal servers.

"Cherry Servers engineers always help when we need them, while their customer service quality is a blast!"

Conclusion

By the end of this tutorial, you should have your Nextcloud AIO application up and running. Nextcloud with the All-in-One Docker image offers simplicity, reduced configuration, and quick deployment.

You can explore advanced features and customization options using the Nextcloud AIO guide.

Goodness is an expert in technical support, JavaScript programming, and cloud/DevOps engineering. She acquired her skills from studies in computer science and hands-on working experience. Over the years, Goodness has also honed the skills of creating, updating, and improving software documentation, writing instruction guides/manuals and technical articles for the knowledge base, and developing website content. Goodness is an expert in technical writing, DevOps engineering, Linux, Docker, containers, open-source, frontend development, and JavaScript. She also contributes to the documentation of open-source projects like Ansible and ODK-X. Goodness received her B.Sc. in Computer Science from the University of Port Harcourt and resides in Port Harcourt, Nigeria.

Start Building Now

Deploy your new Cloud VPS server in 5 minutes starting from $5.83 / month.

We use cookies to ensure seamless user experience for our website. Required cookies - technical, functional and analytical - are set automatically. Please accept the use of targeted cookies to ensure the best marketing experience for your user journey. You may revoke your consent at any time through our Cookie Policy.
build: b0376f5bd.760