How To Install Nextcloud On Ubuntu

Jay

Desktop Interface
6 min read|02.04.2026

Managing your own cloud storage gives you control over your files and data privacy. Installing Nextcloud on an Ubuntu server lets you run a self-hosted cloud environment on stable, supported software. This guide covers everything from setting up your server to accessing Nextcloud in a web browser, so you can quickly deploy a secure, functional cloud solution.

Key Takeaway

Installing Nextcloud on Ubuntu via Snap offers a quick, reliable way to deploy a self-hosted cloud server with minimal manual configuration. The process involves preparing an updated Ubuntu system, ensuring the required resources are available, installing the Snap package, and accessing the instance via a web browser for initial setup. Securing the deployment with HTTPS, user management, and regular backups is required for stable, secure long-term use.

Why Nextcloud on Ubuntu is the Ideal Choice

Nextcloud is a self-hosted cloud platform that puts you in full control of your data. By hosting it yourself, you avoid third-party storage limitations and reduce the risk of unauthorized access. It is compatible with a wide range of devices and supports extensions, allowing you to scale its functionality according to your needs.

Ubuntu’s Long-Term Support (LTS) releases, such as 22.04, provide stability and security updates for up to five years, ensuring your server remains secure over time. Ubuntu also has broad compatibility with common server software, straightforward package management, and extensive community support, making setup, maintenance, and troubleshooting more manageable. Self-hosting on Ubuntu gives you complete control over system configuration, storage allocation, and data privacy, which is critical for a dependable cloud solution.

For users who want a reliable Nextcloud environment without managing the server themselves, at Cloud Based Backup, we provide fully managed Nextcloud hosting. We handle setup, maintenance, and automatic backups while giving you full control over files, user permissions, and collaboration. This allows you to focus on using your cloud safely and efficiently, with secure access from any device and GDPR-compliant data protection.

Try managed Nextcloud now

System Requirements and Preparations

Minimum Requirements

  • 1 CPU core, 1–2 GB RAM, 10 GB storage

Recommended for larger setups

  • 2+ CPU cores, 4 GB+ RAM, extra storage

Server Setup

  • Ubuntu 22.04 LTS or later, updated
  • SSH access and firewall allowing SSH + HTTP/HTTPS
  • Web server (Apache/Nginx), PHP, and database (MySQL/MariaDB/PostgreSQL)

Optional

  • Domain name and SSL certificates
  • Additional storage planning
  • Backup strategy

Installing Nextcloud on Ubuntu

Step 1: Connect to Your VPS via SSH

Begin by connecting to your Ubuntu server using SSH:

ssh root@YOUR_SERVER_IP

This grants access to your server terminal, where you’ll execute all subsequent commands. SSH access is essential for secure remote administration.

Step 2: Update Ubuntu Packages

Before installing Nextcloud, update your system to avoid conflicts and security issues:

sudo apt update && sudo apt -y upgrade

Update Ubuntu Packages

Keeping your packages up to date reduces the risk of dependency errors and ensures the server is secure.

Step 3: Ensure Snap is Installed

Snap is the recommended method for installing Nextcloud on Ubuntu. Install it with:

sudo apt -y install snapd

Ensure Snap is Installed

Snap simplifies the process by automatically managing services, dependencies, and updates.

Step 4: Configure Firewall Ports

Nextcloud requires HTTP and HTTPS access. Open the necessary firewall ports:

sudo ufw allow OpenSSH sudo ufw allow 80,443/tcp sudo ufw enable sudo ufw status

Configure Firewall Ports

This ensures you can access the Nextcloud web interface while keeping your server secure.

Step 5: Install Nextcloud via Snap

Install Nextcloud with a single command:

sudo snap install nextcloud

Install Nextcloud via Snap

Snap automatically downloads Nextcloud, configures services, and starts them. 

Step 6: Access Nextcloud in Your Browser

Open a web browser and navigate to:

http://YOUR_SERVER_IP

You should see the Nextcloud setup screen prompting you to create an admin account. If the page doesn’t load, verify firewall settings and server connectivity.

Step 7: Create the Nextcloud Admin Account

On the setup page, provide:

  • Admin username
  • Strong password
Access Nextcloud in Your Browser

Once submitted, Nextcloud will initialize, and you’ll be able to log in and start using your cloud server.

Install Recommended Apps
Nextcloud Dashboard

Alternative Installation Methods

Manual LAMP/LEMP Stack Installation

The manual installation method involves setting up a full web server stack, typically using Apache or Nginx, a database such as MariaDB or PostgreSQL, and PHP with the required extensions. This approach provides complete control over the Nextcloud server setup, making it ideal for advanced users or production environments where customization is necessary.

With this method, you manually download the latest Nextcloud release, configure the web server, set up database credentials, and manage file permissions. It also allows fine-tuning of performance settings, caching mechanisms, and security configurations. However, it requires a deeper understanding of server administration and ongoing maintenance, including updates and backups.

Nextcloud AIO (Docker-Based Installation)

Nextcloud All-in-One (AIO) is a modern deployment method that uses Docker containers to simplify installation and management. It bundles all required services, such as the web server, database, and caching, into a single, orchestrated environment.

This method is ideal for users who prefer containerized applications and want a balance between simplicity and flexibility. It reduces manual configuration while still allowing scalability and easier updates compared to traditional installations. 

Post-Installation Essentials

After installation, there are a few steps to ensure your Nextcloud instance is secure and performant:

Securing Your Server

Enable HTTPS with Let’s Encrypt to encrypt data in transit. Consider using Fail2ban to protect against brute-force attacks.

Performance Optimization

Enable caching with Redis or APCu, and optimize PHP and database settings to improve performance, especially for larger deployments.

Maintenance and Backups

Regularly update your system and Nextcloud Snap package. Set up periodic backups to prevent data loss.

Exploring Features

Install Nextcloud apps, manage users, and expand storage as needed. These practices ensure your cloud server is both functional and reliable.

Conclusion

Installing Nextcloud on Ubuntu via Snap provides a practical way to run your own cloud service without relying on external providers. At this point, your server is not just set up, it’s ready to handle real usage, whether that’s personal file storage or team-based access.

To get the most out of your setup, focus on securing your instance with HTTPS, organizing users and permissions, and establishing a reliable backup process. As your usage grows, you can expand storage, monitor performance, and fine-tune your configuration to match your needs. A properly maintained Nextcloud deployment on Ubuntu can serve as a stable, long-term solution for managing and protecting your data.

Secure and privacy-first managed Nextcloud hosted in Germany.

Our Blog

Cloud Insights: Trends, Tips & Technologies

Secure File Sharing for Business: How Companies Use Nextcloud for Collaboration
8 min read|27.03.2026

Secure File Sharing for Business: How Companies Use Nextcloud for Collaboration

Businesses share sensitive files such as contracts, financial records, customer data, and internal documents every day across teams, devices, and external partners. At the same time, the risks are also increasing. The average cost of a data breach in 2023 reached $4.45 million, and many incidents are linked to unsecured cloud-based file transfers. Even a simple mistake, like sending a file to the wrong recipient, can trigger a GDPR violation. Remote work and constant collaboration with client

What Is Nextcloud Used For?
6 min read|26.03.2026

What Is Nextcloud Used For?

Managing files, communicating with teams, and staying organized no longer requires juggling multiple platforms. Modern cloud solutions are built to handle it all in one place, and Nextcloud is one of the most capable examples of that shift. With over 400,000 deployments globally, it has grown into one of the most trusted private cloud solutions available today. This article will discuss what Nextcloud is, walk through its core use cases, and explain who it is built for, giving you a clear pictu

Can Nextcloud Logs Be Cleared?
6 min read|25.03.2026

Can Nextcloud Logs Be Cleared?

Managing a self-hosted cloud environment comes with its share of maintenance tasks, and keeping log files under control is one of them. Over time, Nextcloud logs can grow significantly, consuming disk space, slowing the admin interface, and making it harder to spot relevant errors.  This article will discuss what Nextcloud logs are and whether they can be cleared, where log files are located across different server setups, the distinct types of log files administrators should know, how to

Get in Touch with Our Cloud Experts

Chat with us
Chat

Chat with us

Our friendly team is here to help

Cbb logo
Secure real-time Cloud collaboration from Europe
CloudBased Backup empowers you with Managed Nextcloud, a secure, on-premise collaboration platform offering real-time document editing, seamless video chat, and groupware across mobile, desktop, and web.
Visit us on social media.
Subscribe to our newsletter.
Get exclusive offers and always stay up-to-date.
© 2026 CloudBased Backup. All rights reserved.