Nextcloud on Shared Hosting: First Steps for Beginners

Learn how to install, configure, and optimize Nextcloud on your shared hosting for best performance. A beginner's guide with practical tips.

Why Nextcloud on Shared Hosting?

Nextcloud is a powerful open-source platform for file synchronization and sharing. You can run it on your own server and thus have full control over your data. Installation is also possible on a shared hosting package – ideal for beginners who don't want to spend high costs on a dedicated server. In this article, we will show you step by step how to set up, configure, and optimize Nextcloud on your shared hosting for smooth performance.

Requirements

Before you start, make sure your hosting package meets the following requirements:

  • PHP 8.0 or higher (recommended: 8.1+)
  • MySQL or MariaDB (database)
  • Sufficient storage space and traffic
  • SSL certificate (for HTTPS)

If you don't have hosting yet, you can find affordable web hosting packages with us that meet all requirements.

Step 1: Download and Upload Nextcloud

Download the latest version of Nextcloud from the official website. Extract the ZIP file on your computer and upload the entire folder via FTP to your web server – preferably to the directory where the cloud should be accessible (e.g., public_html/cloud).

Step 2: Set Up Database

Create a new MySQL database and a user with all privileges on that database in your hosting control panel (e.g., cPanel). Note down database name, username, and password – you will need them shortly.

Step 3: Installation via Browser

Access the URL of your cloud in the browser (e.g., https://yourdomain.com/cloud). The Nextcloud installation wizard will guide you through the setup:

  • Choose an admin account (username and password).
  • Select "MySQL/MariaDB" as the database type.
  • Enter the database details from step 2.
  • Click "Finish installation".

After a few minutes, Nextcloud is ready to use.

Configuration for More Security

After installation, you should make some security settings:

  • Enable HTTPS (SSL) – most hosting packages offer free Let's Encrypt certificates.
  • Set the .htaccess file correctly (Nextcloud creates it automatically).
  • Change the default admin password to a secure one.
  • Configure the storage location for data outside the web root (optional but more secure).

Performance Tuning for Shared Hosting

1. PHP Optimization

Increase PHP limits in php.ini or via the control panel:

  • memory_limit: 512M or higher
  • upload_max_filesize: 2G (or as needed)
  • post_max_size: 2G
  • max_execution_time: 3600

2. Enable Caching

Use a memory cache like Redis or APCu if your hosting supports it. Many shared hosting providers offer Redis. Install the corresponding PHP extension and configure Nextcloud in config.php:

'memcache.local' => '\OC\Memcache\Redis',
'redis' => [
  'host' => 'localhost',
  'port' => 6379,
],

3. Database Optimization

Use MariaDB instead of MySQL if possible. Run OPTIMIZE TABLE regularly and enable query caching. With Nextcloud, you can also create a database index for large tables (see Nextcloud documentation).

4. Background Jobs (Cron)

Change background jobs from "Ajax" to "Cron". This relieves the web server and improves performance. Set up a cron job in your hosting panel that runs php -f /path/to/nextcloud/cron.php every 5 minutes.

More Tips for Beginners

  • Always keep Nextcloud and its apps up to date to avoid security vulnerabilities.
  • Use the Nextcloud apps for calendar, contacts, and tasks – they conveniently replace Google services.
  • Regularly back up your database and files.
  • If you have problems, the Nextcloud forum or official documentation can help.

If you are looking for reliable hosting, check out our web hosting packages – they are optimal for Nextcloud and other web applications. Or do you need more performance? Our virtual servers offer even more flexibility.