How to Install Nextcloud on PrivateRouter OpenWRT

PrivateRouter custom VPN routers provide an easy one click method to deploy popular self hosted apps directly on your router. When combined with TorGuard's Private VPN Cloud service users can easily self host applications securely behind WireGuard. Nextcloud is a popular self hosted cloud storage platform that puts you in control of file hosting and cloud storage. Nextcloud also offers many other features like built in calandar, contacts management, chat, video conference, email and more.

1.) To install Nextcloud first login to your PrivateRouter and click the System menu. Select Custom Commands then locate Nextcloud and click the RUN button.


2.) Wait a few minutes for Docker to complete the app install. Scroll to the bottom and you will see output similar to the commands below when the install has been completed. (If you receive an error instead of docker output this can happen if the install takes longer. The app will still be installed so be patient and proceed to the next step.)

3.) To access Nextcloud after it's been installed click the Docker menu then select Containers. You should see the newly created Nextcloud container with a green UP status. This means Nextcloud is up and running. Next click the port link by "Nextcloud_app" to access Nextcloud via your local router IP address and port. With default settings this will load at the local URL: http://192.168.0.1:8531



Enter your admin username and password for access to your Nextcloud instance and click the Install button.


Nextcloud comes with many extra features, click the install button to take advantage of them.


Your Nextcloud instance is now installed and ready to use via local IP:port.


If you only want local access to Nextcloud and do not wish to access via domain name then you are all set. If you wish to point a public domain name to Nextcloud for easy access then proceed to the next step.

To use Nextcloud via domain name instead of local IP address we must first update the Nextcloud config file and add your domain address. The fastest way to update the Nextcloud config file is through the Filebrowser app as Filebrowser is mapped to the PrivateRouter docker folder. If you have not yet installed Filebrowser you can install it with this tutorial. First login to Filebrowser:

Click the Nextcloud folder:


Next, click the config folder:


Then click the config.php file and select the code editor icon in the top right corner:


Finally, locate the local Nextcloud IP address 192.168.0.1:8531 and replace with your desired Nextcloud domain name. (example: cloud.yourdomain.com)

Click the save icon in the top right corner.


4.) For this next step you must have already installed the Nginx Proxy Manager app to handle domain and SSL. If you have not yet installed Nginx Proxy Manager please follow the tutorial here to complete the install.

Login to Nginx Proxy Manager at http://192.168.0.1:81. If you have not setup a password the default username is [email protected] and default password is changeme.

Once you are logged in click the Hosts menu option then select "Proxy Hosts".

5.)  Click the Add Proxy Host button.

6. Before proceeding first make sure you have pointed an A record or A Wildcard record with your domain's registrar at your Private VPN Cloud VPN IP address and setup external/internal port forwarding 80/8080 and 443/4443. Then enter the domain name or subdomain under Domain Names. (example: cloud.yourdomain.com) Select "https" under Scheme and the enter your Router's IP address (192.168.0.1). For the port enter Nextcloud's port number 192.168.0.1:8531.  Click the SSL tab next.

**For Nextcloud make sure to set the Websockets Support switch to ON**

7. Under the SSL tab now proceed with obtaining a free Let's Encrypt SSL certificate. Under the SSL Certificate dropdown select "Request a new SSL Certificate with Let's Encrypt". Click the "Force SSL" option switch and enter an email address to register your SSL cert by with Let's Encrypt. Finally, click the "I Agree" switch on Let's Encrypt Terms and Conditions and click the save button. After a few moments you should see your new proxy host on the Nginx Proxy Manager dashboard with a green "online" status. To verify things are working open a new browser window and enter in your domain name. You should see Nextcloud is now loading through your domain instead of the local IP address.

Was this answer helpful? 0 Users Found This Useful (0 Votes)