What is Nextcloud?
Nextcloud is a robust and feature-rich open-source cloud platform that provides you with the ability to store, share, and access your data securely from any device. Whether you’re managing personal files, collaborating with a team, or even running your own cloud storage service, Nextcloud offers a complete solution. It’s a self-hosted, private cloud alternative to commercial services like Google Drive or Dropbox.
Imagine having a powerful cloud service that you can fully control. A cloud where your files, photos, contacts, calendars, and more are stored securely—on your terms. Nextcloud is exactly that. It’s an open-source, self-hosted cloud platform that allows you to take full control of your data while offering the same features you’ve come to expect from commercial cloud services like Google Drive or Dropbox.
That’s Nextcloud, and it’s much more than just a cloud storage service. It’s a complete collaboration suite that turns your server into a hub for team communication, file sharing, and document management. Whether you’re managing personal files, working with a team, or hosting your own cloud storage for clients, Nextcloud can handle it all. You can even integrate apps for project management, video calls, document collaboration, and more—all within a secure, private environment that’s fully customizable to your needs.
One of the standout features of Nextcloud is its ability to synchronize your files, contacts, and calendars across all your devices. Whether you’re on your desktop, tablet, or smartphone, Nextcloud keeps everything in sync, making sure you always have access to the latest versions of your files no matter where you are. And it’s not just for individuals—teams and businesses love it too. With features like shared folders, file versioning, and group collaboration tools, Nextcloud makes it easy to work together on documents and projects.
What sets Nextcloud apart from other cloud services is that it’s self-hosted. This means you have full control over your data, and you don’t have to rely on third-party services. With Nextcloud, you can host it on your own server or virtual machine (VM), meaning your data stays on your hardware, not someone else’s cloud. You can also choose who has access to your data, giving you more privacy and security.
Nextcloud isn’t just about storing files; it offers mobile apps for iOS and Android, making it easy to manage and access your cloud content while on the go. From photos to important documents, you can view, share, and edit your files from anywhere. You can even collaborate in real-time with colleagues or family using Nextcloud’s integrated tools like Nextcloud Talk for video calls and Nextcloud Office for collaborative document editing.
Whether you’re looking to host a personal cloud for storing photos or need a powerful solution for managing projects with your team, Nextcloud has you covered. It’s a versatile and secure solution that’s ready for everything from small personal projects to large-scale enterprise environments.
- File Synchronization: Sync your files across multiple devices, including desktops and mobile apps.
- Collaboration Tools: Share documents, calendars, tasks, and more with colleagues or clients.
- Mobile Apps: Access your files, photos, and even collaborate on documents on your smartphone or tablet with dedicated apps for both iOS and Android.
- Privacy and Security: Your data stays under your control. Nextcloud is designed to be self-hosted on your own server, giving you full privacy and control over your information.
- Extensibility: Nextcloud includes a wide range of apps that can be added to expand its functionality—such as video calls, group chat, project management, and more.
You can use Nextcloud for personal use or scale it up for small to large teams, depending on your needs. It integrates with a variety of services and is highly customizable, making it a versatile tool for any server environment.
Nextcloud is especially useful for those who want the flexibility and privacy of self-hosted cloud services. And, if you’re a mobile user, the Nextcloud mobile apps ensure you have easy access to your files, contacts, calendars, and more—whenever you need it.
In this guide, we’ll walk you through how to install Nextcloud on an Ubuntu server using the source installation method, tested and as outlined in the official Nextcloud documentation. We’ll also cover some essential post-installation configurations to get you started. Feel free to follow along (if you are using a different operating system, you may have different steps/commands. Let us know in the comments what version we should make next).
Prerequisites
Before starting the installation, you’ll need:
- A fresh Ubuntu server (18.04, 20.04, or later).
- SSH terminal access
- Administrator root or sudo privileges on your server.
- A working web server (e.g., Apache or Nginx) and a database server (e.g., MySQL or MariaDB).
Step 1: Install Dependencies
Nextcloud requires several packages and software components. Here’s how to install them on Ubuntu.
Update Your System:
Begin by updating the system and all installed software/packages:
sudo apt update && sudo apt upgrade -y
Install Apache Web Server:
Install Apache, which will serve the Nextcloud instance:
sudo apt install apache2 libapache2-mod-php
Install PHP and Required Extensions:
Nextcloud requires PHP 7.4 or later, along with several PHP extensions. Install them with the following command:
sudo apt install php php-cli php-mysql php-zip php-gd php-json php-curl php-mbstring php-intl php-bz2 php-imagick
Install MariaDB Database Server:
For database management, we’ll install MariaDB (You can also use MySQL or if you already have a database system, skip this step):
sudo apt install mariadb-server
Install Additional Utilities:
Nextcloud needs unzip to extract the source files:
sudo apt install unzip
Step 2: Set Up the Database for Nextcloud
Secure MariaDB:
Run the following command to secure the MariaDB installation and set the root password:
sudo mysql_secure_installation
Create the Nextcloud Database:
Log in to MariaDB and create the database:
sudo mysql -u root -p
Inside the MariaDB shell, create a database and user for Nextcloud:
CREATE DATABASE nextcloud;
CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextclouduser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Step 3: Download and Install Nextcloud
Download the Latest Nextcloud Source:
Get the latest Nextcloud source package from the official website:
wget https://download.nextcloud.com/server/releases/nextcloud-22.1.1.zip
Extract the Files:
Extract the downloaded ZIP file to your web server directory:
sudo unzip nextcloud-22.1.1.zip -d /var/www/
sudo chown -R www-data:www-data /var/www/nextcloud
Set Permissions:
Ensure the correct permissions for the Nextcloud directory:
sudo chown -R www-data:www-data /var/www/nextcloud
Step 4: Configure Apache
Create a New Apache Configuration for Nextcloud:
Create a configuration file for Nextcloud in Apache:
sudo nano /etc/apache2/sites-available/nextcloud.conf
Add the following configuration (replace yourdomain.com with your actual domain or IP address):
DocumentRoot /var/www/nextcloud
ServerName yourdomain.com
<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All
Require all granted
</Directory>
Enable the Site and Modules:
Enable the Nextcloud site and necessary Apache modules:
sudo a2ensite nextcloud.conf
sudo a2enmod rewrite headers env dir mime
Restart Apache:
Restart Apache to apply the changes:
sudo systemctl restart apache2
Step 5: Complete the Web Installation
Access Nextcloud in a Browser:
Open a web browser and navigate to http://yourdomain.com (or your server’s IP address).
Create an Admin Account:
During the web-based setup, you will be prompted to create an admin account. Fill in the required details and proceed.
Configure Database & Complete Install:
Enter the database details you configured earlier:
- Database user: nextclouduser
- Database password: yourpassword
- Database name: nextcloud
After filling in the necessary details, click Finish Setup to complete the installation.
Step 6: (Optional) Secure Nextcloud with SSL
It’s recommended to secure your Nextcloud instance using SSL. This can be done using Let’s Encrypt which obtains certificates and configures it on your web server.
Install & Run Certbot:
sudo apt install certbot python3-certbot-apache
sudo certbot --apache
Then follow the prompts to secure your site with SSL.
Step 7: Mobile Apps for Nextcloud
Once your Nextcloud server is up and running, you can access it from your mobile devices. Nextcloud offers apps for both iOS and Android, allowing you to easily access your files, photos, and even collaborate with others on the go.
Simply search for Nextcloud in the App Store or Google Play Store, download the app, and log in with your server’s address and credentials.
Nextcloud is an excellent solution for individuals and organizations looking for a powerful, self-hosted cloud storage platform. It offers privacy, flexibility, and a suite of collaboration tools that allow you to manage and share your files securely. By following the steps above, you can quickly install Nextcloud on an Ubuntu server and start using it right away.
For those who prefer a simpler setup, Nextcloud also offers a VM package for easy installation on virtualized environments like VMware or VirtualBox, which could be a good option if you want a pre-configured environment.
Start enjoying the freedom of a self-hosted cloud solution today with Nextcloud!
Leave a Reply