If you’re a Windows user wanting to set up a cloud storage solution that’s all yours, trying out Nextcloud on Ubuntu 24.04 is a great idea. This guide will make sure you know exactly how to work through setting up your own server. We’ll cover everything from initial prep to making sure you’ve got good security in place, all without losing you in tech jargon.

Why Go for Nextcloud on Ubuntu 24.04?

Nextcloud is top-notch for syncing, sharing, and collaborating, all while keeping your data under lock and key. Unlike big-name clouds, here, your data stays on your server.

Ubuntu 24.04 is the latest and greatest Long Term Support (LTS) version, which means you’ll get stability and updates that make running Nextcloud even better.

Windows folks might find using Ubuntu straightforward when they connect remotely with tools like PuTTY or Windows Terminal. Here’s a fun fact: loads of small businesses or teachers use Nextcloud on Ubuntu for collaboration since it’s cheap and they don’t want their data floating around on other people’s systems.

Getting Your Cloud Server Ready for Nextcloud

First things first, you’ll need to have access to a server with Ubuntu 24.04. It could be a virtual server, a cloud service, or even a home setup.

Minimum Hardware Specs

  • 2 GB of RAM (though 4 GB would be smoother)
  • 10–20 GB of free disk space
  • A decent modern CPU that can handle Ubuntu 24.04
  • A stable network with a static IP (this helps a lot)
  • Root or sudo user rights

If Linux isn’t your jam yet, lots of cloud service providers offer easy guides to create a server. You can securely connect using an SSH client from your Windows computer.

Set Up a Secure Connection (SSH)

Windows users, consider using PuTTY, Windows Terminal, or PowerShell’s SSH for server access.

ssh username@your-server-ip

Switch username and your-server-ip with your server’s info.

Tip: Go for SSH keys instead of passwords. It’s safer and easier.

Installing What’s Needed for Nextcloud on Ubuntu 24.04

Nextcloud works with a web server, PHP, and a database. This guide will walk you through using Apache, MariaDB, and PHP 8.2.

These commands need root or sudo access.

Step 1: Update Your Ubuntu Packages

Kick things off by ensuring your package list is current.

sudo apt update && sudo apt upgrade -y

Step 2: Install Apache and Necessary Modules

sudo apt install apache2 libapache2-mod-php -y

Activate the Apache modules Nextcloud needs:

sudo a2enmod rewrite headers env dir mime
sudo systemctl restart apache2

Step 3: Set Up MariaDB (Database Server)

sudo apt install mariadb-server mariadb-client -y
sudo systemctl start mariadb
sudo systemctl enable mariadb

Secure MariaDB:

sudo mysql_secure_installation

Follow the prompts to create a root password and clear out test databases.

Step 4: Install PHP and Extensions

Nextcloud requires several PHP extensions:

sudo apt install php php-mysql php-gd php-curl php-xml php-mbstring php-zip php-bz2 php-intl php-imagick php-xmlrpc -y

Check your PHP version:

php -v

You should see PHP 8.2 (which is standard for Ubuntu 24.04).

Step 5: Tweak PHP Settings

Nextcloud prefers specific PHP settings. Edit php.ini (found at /etc/php/8.2/apache2/php.ini):

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

Update these lines:

memory_limit = 512M
upload_max_filesize = 512M
post_max_size = 512M
max_execution_time = 360
date.timezone = Your/Timezone

Swap Your/Timezone with wherever you are, like America/New_York.

Save your changes and restart Apache:

sudo systemctl restart apache2

Database Setup for Nextcloud

Log into the MariaDB shell:

sudo mariadb

Create the Nextcloud database and a user too:

CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'your_password_here';
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextclouduser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Replace 'your_password_here' with a solid password.

Getting Nextcloud Installed

Head to /var/www and download the latest version of Nextcloud.

cd /var/www/
sudo wget https://download.nextcloud.com/server/releases/nextcloud-26.0.3.zip

Check for the latest stable version on Nextcloud’s website.

Extract Nextcloud:

sudo apt install unzip -y
sudo unzip nextcloud-26.0.3.zip

Update permissions so Apache can access the files:

sudo chown -R www-data:www-data nextcloud
sudo chmod -R 755 nextcloud

Apache Setup for Nextcloud

Create a configuration file for Nextcloud in Apache:

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

Insert this configuration:

<VirtualHost *:80>
    ServerAdmin admin@example.com
    DocumentRoot /var/www/nextcloud/
    ServerName your.domain.com

    <Directory /var/www/nextcloud/>
        Options +FollowSymlinks
        AllowOverride All
        Require all granted

        <IfModule mod_dav.c>
            Dav off
        </IfModule>
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/nextcloud_error.log
    CustomLog ${APACHE_LOG_DIR}/nextcloud_access.log combined
</VirtualHost>

Update your.domain.com with your proper domain or IP address.

Activate the site and the rewrite module:

sudo a2ensite nextcloud.conf
sudo a2enmod rewrite
sudo systemctl reload apache2

Finishing Nextcloud Install via Web Installer

Fire up your web browser and go to your domain or server IP:

http://your.domain.com

You’ll see the Nextcloud setup page.

Web Installer Steps

  • Make an admin username and a strong password.
  • Input the database user and password (nextclouduser and its password).
  • Database name: nextcloud
  • Database host: localhost

Click Finish Setup. Nextcloud will take care of the rest.

Boosting Security and Speed

Get HTTPS with Let’s Encrypt

For securing data, go HTTPS.

Get SSL certificates using Certbot:

sudo apt install certbot python3-certbot-apache -y
sudo certbot --apache -d your.domain.com

Follow the steps to secure your site.

More Security Tips

  • Set up Two-factor authentication (2FA) for added safety.
  • Keep Nextcloud updated regularly.
  • Regular backups of your database and files.
  • Control who gets in and out using firewall rules (ufw).
sudo ufw allow OpenSSH
sudo ufw allow 'Apache Full'
sudo ufw enable

Real-World Small Business Example

A small design studio I know switched their file storage from Dropbox to a self-hosted Nextcloud server on Ubuntu 24.04. They gained full control over client files and improved teamwork.

We set up a mid-range VPS, and as explained above, implemented strong authentication and encryption. It saved them $300 a month on cloud costs.

Their team loved file sharing and editing tools. In under a year, they scaled up to 15 users.

Common Problems and Fixes

  • Blank screen after install: Double-check you have PHP modules and enough memory set up.
  • Trouble connecting to the database: Confirm MariaDB credentials and connection.
  • Permission issues: Make sure file ownership is set to www-data, and permissions are correct.
  • Sluggish performance: Enable caching with Redis or APCu.

For more help, check out the official Nextcloud documentation.


Wrapping Up

Installing Nextcloud on Ubuntu 24.04 gives you a solid, private cloud server. And even if you’re typically on Windows, the steps are clear when it comes to managing a Linux server. This setup puts you in charge, waving goodbye to endless fees from public clouds and preserving privacy.

With the guide here, you can prep your server, install Nextcloud, secure it, and boost its performance. Now you’re ready to run your nextcloud server for personal or business use.

If you’re eager, start by launching your Ubuntu 24.04 server through a chosen cloud provider. Follow the guide closely and keep up with backups and updates. For advanced options, use official documentation or community support.


Ready to set up your private cloud? Kick things off by creating your Ubuntu 24.04 server. If you need help, you can reach out to Dhabaka for hosting and managed cloud services.

Explore Dhabaka.com for more insights and to ensure your server stays safe.

Start today and take charge of your cloud!

Get in Touch