Setting up Nextcloud on Shared Hosting for Small Teams
Learn how to install Nextcloud on shared hosting, enable file versions, and set sharing permissions for your team – without a VPS.
Why Nextcloud on Shared Hosting?
Nextcloud is a powerful open-source cloud solution that enables you and your team to securely exchange and manage files. Many small teams are hesitant to install it because they think a VPS is required. However, with the right shared hosting – such as our web hosting packages – you can run Nextcloud without any issues. You save costs and benefit from easy administration.
Check Requirements
Before you start, make sure your hosting meets the following requirements:
- PHP 8.0 or higher (with modules ctype, curl, dom, gd, imagick, intl, mbstring, pdo_mysql, xml, zip)
- MySQL or MariaDB database
- Sufficient storage space for file versions (at least 10 GB recommended)
Our web hosting meets these requirements by default.
Install Nextcloud
Download the latest Nextcloud version from nextcloud.com. Extract the archive and upload the contents via FTP to the desired directory on your hosting (e.g., /nextcloud). Then navigate to the domain with the path – the installation wizard will guide you through entering the database details and creating an admin account.
Enable File Versions
File versions are enabled by default in Nextcloud. You can adjust the number of versions and the retention period in the configuration file config.php. Add the following lines:
'versions_retention_obligation' => 'auto',
'versions_retention_max_age' => 30,This automatically deletes versions when storage space becomes scarce and retains them for a maximum of 30 days. This saves space on shared hosting.
Set Sharing Permissions for the Team
Nextcloud offers granular permissions. Create user accounts for your team and set up groups. Go to Settings > Administration > Sharing and enable the option "Allow sharing only within the group". This way, files can only be shared with team members. You can also enforce password protection and expiration dates for share links.
Optimization for Shared Hosting
To ensure Nextcloud runs smoothly on shared hosting, you should limit memory usage. Set in config.php:
'memcache.local' => '\OC\Memcache\APCu',
'memcache.locking' => '\OC\Memcache\Redis',If your hosting does not support Redis, use \OC\Memcache\FileLocking instead. Additionally, we recommend reducing the number of parallel processed jobs by setting 'job_max_execution_time' => 60 in config.php.
Backups and Updates
Regularly back up your Nextcloud database and the data directories. Many hosts offer automatic backups – use them. It is best to perform updates via the command line: sudo -u www-data php occ upgrade. On shared hosting without SSH access, you can perform the update manually by extracting the new version over the old one (except for the config.php and data folders).
Conclusion
Nextcloud on shared hosting is not only possible but also practical for small teams. With the right settings for file versions and sharing permissions, you have a secure and cost-effective cloud solution. If you are looking for suitable hosting, check out our web hosting packages – they are ideal for Nextcloud and many other applications.