Running Nextcloud on Storage VPS allows you to create a private and secure cloud for your team. By using a High Storage VPS, you achieve massive disk space directly attached to your server, which ensures fast access without the latency of external object storage.
In this guide, you will learn to install Nextcloud on a High Storage VPS using Ubuntu 24.04 LTS, Apache, MariaDB, and PHP 8.3, which is the current standard for stability and performance.
Prerequisites for Setting up Nextcloud on Storage VPS
Before you start, make sure to have a VPS running Ubuntu 24.04 LTS with at least 2GB RAM and a large disk partition. 4GB is recommended for production use.
You need a valid Domain name that is pointed to your VPS IP address, for example, cloud.yourdomain.com.
Also, make sure to have root access or sudo privileges to execute the commands.
Note: For this tutorial, you'll need a High Storage VPS. If you don't have one yet, check out PerLod Hosting for affordable storage-optimized plans.
Prepare your System for Nextcloud Setup
You must run the system update and upgrade to ensure all existing packages are secure:
Bash
sudoaptupdate&&sudoaptupgrade-y
Also, you can verify your High Storage partition is mounted and ready. Usually, it is your root partition / or mounted at /mnt. To check this, you can run the command below:
Bash
df-h
If you see a large partition mounted at /, for example, 500GB+, it is OK. If it is mounted elsewhere, like /mnt/storage, note that path for next steps.
Install LAMP Stack and Dependencies for Nextcloud Setup
Nextcloud requires a web server, database, and PHP. Ubuntu 24.04 ships with PHP 8.3, which is fully supported. You can use the commands below to install the LAMP stack and dependencies:
The php8.3-redis and redis-server are essential for high-storage setups to prevent database locking when multiple users upload files simultaneously.
Nextcloud Database Configuration
In this step, you must secure your database installation and create a dedicated user for Nextcloud.
Run the security script for your database with the command below:
Bash
sudomysql_secure_installation
Answer Y to switch to unix_socket authentication, change root password, remove anonymous users, disallow root login remotely, and remove test database.
Log in to your MariaDB shell with the command below:
Bash
sudomysql-uroot-p
Run the following SQL commands to create the Nextcloud user and grant the required privileges for it:
SQL
1CREATEDATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;2CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY'secure_password';3GRANTALL PRIVILEGES ON nextcloud.* TO 'nextclouduser'@'localhost';4FLUSH PRIVILEGES;5EXIT;
Download Nextcloud and Set up the Data Directory
At this point, you can download the latest release of Nextcloud by using the commands below:
For better security, you can keep the data folder outside the public web directory. Instead of keeping data inside /var/www/nextcloud/data, you can create a dedicated directory.
Note: If your large storage is mounted at /mnt/storage, use /mnt/storage/nc_data instead.
To create a secure data directory, use the command below:
Bash
sudomkdir-p/var/www/nextcloud_data
Apache needs full control over these directories. To set the correct ownership, run the following commands:
At this point, you can secure your Nextcloud with an SSL certificate. Use Certbot to obtain a free Let's Encrypt certificate, ensuring all your files are transferred securely over HTTPS.
Install Certbot and obtain your SSL certificate for your domain with the commands below:
Once you are done, you must enable system Cron, because Nextcloud runs background jobs, and using the system cron is more reliable than AJAX.
Bash
sudocrontab-uwww-data-e
Add this line to the bottom:
Bash
*/5****php-f/var/www/nextcloud/cron.php
To apply the changes, restart Apache:
Bash
sudosystemctlrestartapache2
At this point, your installation and optimization are completed. You can go to your Administration Settings and Overview in your Nextcloud dashboard. It should pass all security checks.
Now you have a fully functional and self-hosted cloud on your storage VPS.
Conclusion
Self-hosting Nextcloud on a High Storage VPS puts you in full control of your team's data, no monthly subscription, no storage limits set by someone else. With everything configured in this guide, your setup is secure, fast, and ready for real use.
We hope you enjoy using this guide. Subscribe to our X and Facebook to get the latest updates and articles on storage VPS hosting.
Yes, as long as you keep the server updated, enforce strong passwords, enable two-factor authentication, and always use HTTPS.
Nextcloud will stop accepting uploads when the disk is full. Monitor usage from Administration Settings and System, and set up storage quotas per user to prevent this.
Yes. Nextcloud has official clients for Windows, macOS, Linux, Android, and iOS. Just enter your server URL and credentials to sync files across devices.
We use cookies to run PerLod and to understand how the site is used. You can accept everything, or open Manage to turn individual categories off. Cookie policy.