---
title: "How to Install Nextcloud on Ubuntu Latest - CloudBlast"
description: "How to Install Nextcloud on Ubuntu Latest"
url: "https://cloudblast.io/article/How-to-Install-Nextcloud-on-Ubuntu-Latest"
language: "en-US"
---

BLOG

# How to Install Nextcloud on Ubuntu Latest

5€ FREE BALANCE when you register

Register to cloudblast and get 5€ cloud credit to deploy your VPS's

[Claim Free 5€](https://console.cloudblast.io/auth/login?ref=2)

-   [Back](https://cloudblast.io/)
-   [All Articles](https://cloudblast.io/blog)

2024-10-10

### How to Install Nextcloud on Ubuntu Latest

tutorials

[Add as a preferred source on Google](https://www.google.com/preferences/source?q=cloudblast.io)

**Introduction**

Nextcloud is a robust open-source platform for file sharing and collaboration, offering a self-hosted alternative to proprietary cloud services. This guide will walk you through the installation process of Nextcloud on the latest version of Ubuntu.

**Prerequisites**

Before starting, ensure your server meets the following requirements:

-   A server running the latest version of Ubuntu.
-   A LAMP (Linux, Apache, MySQL, PHP) stack installed on your server.
-   Access to a terminal with root privileges.

**Step 1: Update Your System**

Begin by updating your package list and upgrading all system packages to their latest versions. Open your terminal and execute these commands:

> sudo apt update

> sudo apt upgrade -y

**Step 2: Install Apache and PHP**

Nextcloud requires a web server and PHP. Install Apache and the required PHP modules:

> sudo apt install apache2

> sudo apt install php libapache2-mod-php php-mysql php-xml php-mbstring php-curl php-gd php-zip php-intl php-bcmath php-gmp

**Step 3: Install MySQL**

Install MySQL server and secure the installation:

> sudo apt install mysql-server

> sudo mysql\_secure\_installation

Follow the prompts to secure your MySQL installation.

**Step 4: Download and Configure Nextcloud**

Download the latest version of Nextcloud from the official website or use wget to download directly:

> cd /var/www/html

> wget https://download.nextcloud.com/server/releases/nextcloud-x.y.z.zip

Replace `x.y.z` with the latest version number. Extract the downloaded file:

> sudo apt install unzip

> unzip nextcloud-x.y.z.zip

Move the extracted files to the web root directory:

> mv nextcloud /var/www/html/nextcloud

**Step 5: Set Permissions**

Set the correct permissions to ensure Nextcloud can write to the necessary directories:

> sudo chown -R www-data:www-data /var/www/html/nextcloud

> sudo chmod -R 755 /var/www/html/nextcloud

**Step 6: Configure Apache**

Create a new Apache configuration file for Nextcloud:

> sudo nano /etc/apache2/sites-available/nextcloud.conf

Add the following configuration:

> ServerAdmin admin@example.com DocumentRoot /var/www/html/nextcloud ServerName your\_domain.com ServerAlias www.your\_domain.com Options +FollowSymlinks AllowOverride All Require all granted Dav off SetEnv HOME /var/www/html/nextcloud SetEnv HTTP\_HOME /var/www/html/nextcloud ErrorLog ${APACHE\_LOG\_DIR}/error.log CustomLog ${APACHE\_LOG\_DIR}/access.log combined

Enable the new configuration and rewrite module, then restart Apache:

> sudo a2ensite nextcloud.conf

> sudo a2enmod rewrite

> sudo systemctl restart apache2

**Step 7: Set Up the Database**

Log in to your MySQL shell and create a database for Nextcloud:

> mysql -u root -p

Enter the following commands in the MySQL shell:

> CREATE DATABASE nextcloud;

> CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'yourpassword';

> GRANT ALL PRIVILEGES ON nextcloud.\* TO 'nextclouduser'@'localhost';

> FLUSH PRIVILEGES;

> EXIT;

**Step 8: Complete the Installation**

Open your web browser and navigate to your server’s domain (e.g., http://your\_domain.com). Follow the on-screen instructions to complete the Nextcloud installation, entering your database details when prompted.

**Conclusion**

You have successfully installed Nextcloud on the latest version of Ubuntu. You can now use Nextcloud to manage and share your files securely.

Share

## Continue Reading

[2026-07-25 How to Install and Set Up Mailcow on Ubuntu and Debian VPS tutorials](https://cloudblast.io/article/how-to-install-and-setup-mailcow-on-ubuntu-and-debian-vps)

[2026-07-25 How to Install Chatwoot on the Latest Ubuntu and Debian Server tutorials](https://cloudblast.io/article/how-to-install-chatwoot-on-ubuntu-and-debian-server)

[2026-07-25 How to Install Mattermost on the Latest Ubuntu and Debian Server tutorials](https://cloudblast.io/article/how-to-install-mattermost-on-ubuntu-and-debian-server)

[2026-07-25 How to Install RustDesk on the Latest Ubuntu and Debian Server tutorials](https://cloudblast.io/article/how-to-install-rustdesk-on-ubuntu-and-debian-server)
