Step-by-Step Guide to Installing Nextcloud AIO on Ubuntu

Step-by-Step Guide to Installing Nextcloud AIO on Ubuntu

Experiencing storage constraints on Google Drive or Dropbox? If you’re seeking a cost-effective solution for file management, consider self-hosting Nextcloud on your server. Nextcloud, an open-source, self-hosted cloud service, empowers you to store, manage, and share files securely. Unlike conventional cloud services that rely on third-party servers, Nextcloud allows you to keep your data on your own infrastructure, granting you complete control over your information. This guide will walk you through the installation and operation of Nextcloud on an Ubuntu system.

Benefits of Self-Hosting Nextcloud

Nextcloud serves as an excellent alternative to mainstream cloud solutions like Google Drive and Dropbox, offering a range of features that enhance productivity. You can upload and organize files, synchronize them across devices, and benefit from collaboration tools built into the platform, such as Office and Talk. Additionally, Nextcloud enables user creation, permission assignment, and customized access control, ensuring your data’s security and privacy.

This solution stands out by eliminating predetermined storage limits—your hard drive capacity is effectively the only constraint. You will also be free of personalized advertisements and intrusive monitoring. Self-hosting offers all the benefits of cloud storage while ensuring your data remains secure within your own domain.

Installing Nextcloud Using the All-in-One (AIO) Approach

Nextcloud All-in-One (AIO) simplifies the installation process through a Docker-based framework. Unlike traditional installations that require manual configuration of databases, web servers, and security protocols, Nextcloud AIO automates these processes by managing the necessary services within Docker containers. This consolidated setup provides a user-friendly web dashboard for streamlined control.

Essential Prerequisites

Before initiating the installation, ensure your environment meets specific requirements:

  • Operating system: Ubuntu 22.04 or 24.04
  • User account with sudo privileges
  • Docker installed on your system
  • Open access to ports 80, 443, and 8443

Setting Up Nextcloud AIO Using Docker Desktop

There are various methods for installing Nextcloud, but for local setups on Ubuntu, Docker Desktop is a practical choice. Servers and production environments, however, are best suited for Docker Compose installations.

In Docker Desktop, access the Images section and search for nextcloud/all-in-one. Choose the official image from the search results.

Get Official Nextcloud AIO Image

Click Pull to download the nextcloud/all-in-one:latest image.

Pull Nextcloud AIO Image

Once downloaded, find the image in the Images section and click Run.

Run Nextcloud AIO Container

A configuration window will appear in Docker Desktop, where you can set the following options:

  • Assign a unique container name, such as nextcloud-aio-mastercontainer, for easy identification.
  • Map host port 8443 to container port 8443, as Nextcloud AIO runs securely on this port.
  • Mount the Docker socket /var/run/docker.sock to automate internal container management.
  • Create a persistent volume, e.g., nextcloud_aio_mastercontainer, mapped to /mnt/docker-aio-config to preserve configuration data through restarts and updates.
Configure Nextcloud AIO Settings

After configuring the options, click Run and access the Nextcloud AIO setup interface via https://localhost:8443.

Access Nextcloud AIO Setup Interface

Installing Nextcloud AIO via Docker Compose

For those preferring Docker Compose, begin by setting up a designated folder for your Nextcloud AIO installation:

mkdir -p ~/nextcloud-aiocd ~/nextcloud-aio

Next, create a new configuration file named docker-compose.yml:

nano docker-compose.yml

Insert the following configuration into the file:

services: nextcloud-aio-mastercontainer: image: nextcloud/all-in-one:latest container_name: nextcloud-aio-mastercontainer restart: always ports: - "80:80"# Required for Let's Encrypt if using domain - "8080:8080"# Main AIO interface - "8443:8443"# Optional secure AIO interface volumes: - nextcloud_aio_mastercontainer:/mnt/docker-aio-config - /var/run/docker.sock:/var/run/docker.sock:ro volumes: nextcloud_aio_mastercontainer:

Launch the following command to start the container in detached mode:

docker compose up -d

Pull Nextcloud AIO with Docker Compose

Accessing the Nextcloud AIO Dashboard

Once Nextcloud AIO is installed, open its web interface. If you’re using the same server, navigate to https://localhost:8080. To access it remotely, substitute https://your-server-ip:8080 with your server’s IP address.

Note: Always connect using the server’s IP address on port 8080, avoiding domain names during initial setup due to potential HSTS complications. A self-signed SSL certificate will trigger a browser security warning, which is typical. You can proceed by clicking Advanced and confirming your risk acceptance.

Upon loading, the Nextcloud AIO Dashboard will present a generated passphrase. Store this securely, as it’s essential for logging in later. If lost, you will need to delete the Docker volume and restart the configuration.

Nextcloud AIO Interface

Input your passphrase and click Log in to access your Nextcloud AIO account.

Login with Passphrase

Configuring Your Domain and Finalizing Setup

Next, prepare your domain for HTTPS access using Let’s Encrypt, which requires a valid domain pointing to your server’s public IP. Local testing may not allow automatic HTTPS unless DNS, port forwarding, or a reverse proxy is configured.

Configure Domain for Nextcloud

You can now select optional add-ons, adjust your timezone, and click Download and Start containers to begin the download and launch process.

Download and Start Containers

The initial setup generally takes between 5 to 10 minutes as the master container automatically retrieves and configures the required services.

Downloading Containers

A status screen will indicate that the services are initializing while Nextcloud conducts background setup tasks automatically.

Initializing Containers in Nextcloud

Once all containers are operational (indicated by a green status), you’ll see the initial username (admin) along with a generated password. Remember to note this password carefully, as it is necessary for your subsequent log in.

Running Containers in Nextcloud

Next, visit your domain in a browser and use the username admin along with the generated password to complete the login process.

Login to Nextcloud AIO Dashboard

Your Nextcloud AIO installation is now ready for use!

Nextcloud AIO Dashboard

Security Measures and Post-Installation Advice

Upon first logging into Nextcloud, it’s essential to take steps to secure your instance:

  • Change the default admin password if it wasn’t altered during setup.
  • Implement two-factor authentication to enhance account security.
  • Ensure HTTPS is configured with a valid SSL certificate, with Let’s Encrypt highly recommended.
  • Regularly monitor Admin Settings for any warnings and address minor issues proactively.
  • Enable BorgBackup, Nextcloud’s built-in backup tool, and perform an initial backup from the AIO dashboard before introducing major changes or adding new applications.
  • Keep your Nextcloud and Docker containers updated via the AIO dashboard to uphold security and efficiency.

Managing Users in Nextcloud

User management within Nextcloud is straightforward. Click the Profile icon and access the Accounts option.

Access Account Settings in Nextcloud

Here, you can create, edit, or define permissions for accounts. You have the option to assign users into groups and manage file and folder access effectively, ensuring proper levels of engagement for all users.

Manage User Accounts in Nextcloud

Efficient File Management

For file management, simply click the +New button and choose Upload file, or drag and drop files directly into the browser window. Organize your files into folders and utilize the Share feature to generate links or send access invitations via email. Nextcloud AIO also allows you to secure shared links with passwords and set expiration dates, enabling total control over your content access.

Manage Files in Nextcloud

Additionally, the Photos app within Nextcloud AIO provides a centralized location to manage images and videos. Upon entering, you’ll be greeted by the All your media page—your primary dashboard for all uploaded content. To add new media, click the + Add button and select files from your device.

Media Management in Nextcloud

Use the left sidebar to navigate between sections such as All media, Photos, Videos, and Albums to filter and organize your content effectively without manual sorting through files.

Conclusion

The Nextcloud All-in-One (AIO) suite simplifies the creation of a secure private cloud solution while streamlining user management and collaboration capabilities. It serves as an ideal choice for both personal users and small teams seeking a complete cloud system without the complexity typically involved. You may also explore alternative self-hosted cloud solutions like OwnCloud and Seafile to find the one that meets your specific needs.

Source & Images

Leave a Reply

Your email address will not be published. Required fields are marked *