Menu
User

DropVPS Team

Writer: Cooper Reagan

How to Install Nextcloud on Ubuntu 25.10

How to Install Nextcloud on Ubuntu 25.10

Publication Date

11/13/2025

Category

Articles

Reading Time

3 Min

Table of Contents

Nextcloud is one of the best self-hosted cloud platforms for file syncing, backups, collaboration, and secure data storage. On Ubuntu 25.10, installation is clean and straightforward with Apache, PHP, and MariaDB.

Step 1: Update System Packages

Start with a clean, updated base system:

sudo apt update && sudo apt upgrade -y

Step 2: Install Apache Web Server

Nextcloud works great with Apache. Install and enable it:

sudo apt install apache2 -y
sudo systemctl enable --now apache2

Check status:

systemctl status apache2

Step 3: Install PHP and Required Extensions

Nextcloud needs multiple PHP extensions. Install them all at once:

sudo apt install -y php php-fpm php-cli php-common php-mysql php-xml php-zip php-gd php-curl php-mbstring php-intl php-bcmath php-gmp php-imagick php-redis

Restart Apache:

sudo systemctl restart apache2

Check PHP version:

php -v

Step 4: Install MariaDB (Database Server)

Nextcloud stores its data in MySQL/MariaDB. Install MariaDB:

sudo apt install mariadb-server -y
sudo systemctl enable --now mariadb

Secure the installation:

sudo mysql_secure_installation

Step 5: Create Nextcloud Database and User

Log in to MariaDB:

sudo mysql -u root

Run these commands:

CREATE DATABASE nextcloud;
CREATE USER 'ncuser'@'localhost' IDENTIFIED BY 'StrongPasswordHere';
GRANT ALL PRIVILEGES ON nextcloud.* TO 'ncuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 6: Download Nextcloud

Go to /var/www/ and download the latest Nextcloud release:

cd /var/www/
sudo wget https://download.nextcloud.com/server/releases/latest.zip
sudo apt install unzip -y
sudo unzip latest.zip
sudo chown -R www-data:www-data nextcloud
sudo chmod -R 755 nextcloud

Step 7: Configure Apache for Nextcloud

Create a new virtual host file:

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

Add the following:

<VirtualHost *:80>
    ServerName your-domain.com
    DocumentRoot /var/www/nextcloud

    <Directory /var/www/nextcloud/>
        Require all granted
        AllowOverride All
        Options FollowSymLinks MultiViews
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/nextcloud-error.log
    CustomLog ${APACHE_LOG_DIR}/nextcloud-access.log combined
</VirtualHost>

Enable required modules and the site:

sudo a2ensite nextcloud.conf
sudo a2enmod rewrite headers env dir mime
sudo systemctl restart apache2

Step 8: Open Nextcloud Installer in Browser

Visit:

http://your-server-ip/

Or:

http://your-domain.com/

Fill in:

  • Admin username

  • Admin password

  • Database: nextcloud

  • Database user: ncuser

  • Password: (your database password)

  • Host: localhost

Click Finish Setup.

Step 9: Configure PHP for Better Performance (Optional)

Increase PHP memory limits:

sudo nano /etc/php/*/apache2/php.ini

Adjust these values:

memory_limit = 512M
upload_max_filesize = 1G
post_max_size = 1G
max_execution_time = 360

Restart Apache:

sudo systemctl restart apache2
Linux VPS
U
Loading...

Related Posts

How to Install Nextcloud on Ubuntu 25.10