
Installing Nextcloud on Unraid is a great way to create a secure and private cloud storage solution. Nextcloud is a self-hosted cloud storage platform that allows you to store and share files securely.
Unraid is a popular operating system for NAS devices that provides a user-friendly interface for managing storage and applications. It's an excellent choice for hosting Nextcloud due to its flexibility and scalability.
To get started, you'll need to install Unraid on your NAS device and configure it to meet your storage needs. A 4-bay NAS device with 8TB drives is a good starting point for most users.
Nextcloud requires a minimum of 2GB of RAM to run smoothly, but 4GB or more is recommended for optimal performance.
Installing on Unraid
Installing Nextcloud on Unraid is a straightforward process that can be completed in a few steps. You can configure Nextcloud using the Apps section in Unraid, but you must also configure a database.
The recommended approach is to use Portainer, which allows you to create one container configuration that holds the application and database needed to run Nextcloud. This simplifies the installation process and ensures that your Nextcloud data is properly backed up.
To install Nextcloud, you'll need to use the MariaDB Docker from "Linuxserver". Click on the Install button to begin the installation process. The port and PUID/PGID can be left at the default, but be sure to store a root password securely.
Nextcloud also uses the Docker from "Linuxserver", which you'll need to configure to store data in the correct directory. You can enter the path to the directory in the "Host Path 2" field under the settings.
After completing the installation, you can access the Nextcloud web interface by opening your server IP followed by port 443 in your browser. This will guide you through the process of creating an administrator account and setting up the database.
To make your local Nextcloud installation available worldwide, you'll need to set up port sharing for Nextcloud, which requires the NginxProxyManager Proxy Manager.
Additional reading: Installing Nextcloud
Configuring Nextcloud

To configure Nextcloud on Unraid, you'll need to create a new stack and add the Nextcloud container and database.
First, navigate to your Unraid server's IP address and port 8080 to set up a username and password at the first screen, then select Install.
You'll also need to install the recommended apps, which may take a few minutes.
To access Nextcloud, you can use the default appdata path in Unraid with the Linuxserver Nextcloud container, which is /mnt/user/appdata/nextcloud/www/nextcloud/config/config.php.
If you want to use Redis for cache, you'll need to modify the config.php file to point to your Redis instance. You can find the necessary information on the docker list page within Unraid.
Here's an example of what the modified config.php file might look like:
Remember to restart the Nextcloud container after making these changes to ensure they take effect.
Remote Access and Redis
To set up remote access for Nextcloud on Unraid, you'll need to configure your Redis instance. This involves modifying the config.php file to point to your Redis instance.

The config.php file is located at /mnt/user/appdata/nextcloud/www/nextcloud/config/config.php if you're using the default appdata path in Unraid with the Linuxserver Nextcloud container.
To add Redis to Nextcloud, you'll need to add lines to the $CONFIG array in the config.php file. Make sure to change the host and port to match your Redis instance, which can be found on the docker list page within Unraid.
Take a look at this: How to Add Https to Nextcloud
Remote Access
Remote Access is a game-changer for Nextcloud users. To access Nextcloud remotely, you can use a VPN, which allows you to access and use Nextcloud, Unraid, and other services as if you're on your local network.
You can configure a VPN using WireGuard on Unraid, which is a great option if your router can't handle it. This will give you secure and encrypted access to Nextcloud.
If you don't have a router capable of setting up a VPN, WireGuard is a great alternative. With WireGuard, you can access Nextcloud remotely and use it just like you would on your local network.
Suggestion: Alternative to Nextcloud

To set up remote access, you'll need to configure a port share on your router, which will forward requests to your Nextcloud Docker. You can set up a port share on most common routers, and it's a crucial step for accessing Nextcloud remotely.
You can also use the NginxProxyManager to forward requests to your Nextcloud Docker and create a Let's Encrypt SSL certificate to encrypt the connection. This will give you a secure and encrypted connection to your Nextcloud instance.
You might like: Nextcloud Port
Configuring Redis Usage
Installing Redis in Unraid is super easy if you have Community Applications installed.
To get Nextcloud to use your new Redis instance, you need to modify the config.php file. Open your config.php file, located at /mnt/user/appdata/nextcloud/www/nextcloud/config/config.php if using the default appdata path.
Make sure to change the host and port to match your Redis instance, which can be found on the docker list page within Unraid.
Add these lines to the $CONFIG array in the config.php file:
Restart the Nextcloud container and it will be using your Redis instance for cache.
Performance Optimization

To achieve optimal performance with Nextcloud on Unraid, consider upgrading your server's RAM to at least 16GB. This will help improve performance, especially for large file sharing and collaboration.
A 2.5-inch hard drive is recommended for storing your Nextcloud data, as it offers better performance and reliability compared to 3.5-inch drives.
Unraid's caching feature can significantly boost performance by storing frequently accessed files in a faster drive. This is particularly useful for users who frequently access and share large files.
Sources
- https://www.wundertech.net/how-to-install-nextcloud-on-unraid/
- https://cybertalk.io/en/nextcloud-install-on-unraid/
- https://skylar.tech/reduce-nextcloud-mysql-usage-using-redis-for-cache/
- https://stackoverflow.com/questions/54269990/nextcloud-in-docker-behind-traefik-on-unraid
- https://najigram.com/2024/01/how-to-increase-upload-size-on-nextcloud-in-unraid/
Featured Images: pexels.com