For this guide I am running the NextCloud AIO on a stock install of ubuntu server 20.04. LINK

After you get Ubuntu installed and setup make sure to update the server running the following command.

sudo apt update && apt upgrade -y

Once the updates are done we now need to install docker, run the following command as root.

curl -fsSL https://get.docker.com | sudo sh

Now we need to install nextcloud AIO for reverse proxy, this is a slightly different command than the normal guide without a reverse proxy.

sudo docker run \
--sig-proxy=false \
--name nextcloud-aio-mastercontainer \
--restart always \
--publish 8080:8080 \
-e APACHE_PORT=11000 \
-e APACHE_IP_BINDING=0.0.0.0 \
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
nextcloud/all-in-one:latest

Now you can follow the normal Nextcloud AIO install guide. IMPORTANT, Start at step 4. LINK

First you need to create the NextCloud Service. This is under Traffic Management > Services > Add

Give the service a unique name, enter in the local IP address of your NextCloud AIO instance, make the Protocol HTTP, and the Port Number 11000

Now we need to create a Virtual Server. This is under Traffic Management > Virtual Servers > Add

Give the Virtual Server a unique Name, Putting LB in the name makes it easier to identify later. Change the protocol to HTTP and the IP Address Type to Non Addressable.

We now need to bind the Service to the Virtual Server. Click the Bindings section under Services and Service Groups on the Virtual Server.

Click into the Select Service.

Select your Service from the list, then press Select.

Select Bind.

Now we will create the Content Switching Action. This is under Traffic Management > Content Switching > Actions > Add

Create a Unique name for the CS Action, I would recommend adding a CS_Action in the name to make it easier later on. Make sure the Choose Virtual Server or Expression is set to Loadbalancing Virtual Server. Click into the Target Load Balancing Virtual Server section.

Select your LB Nextcloud from the Virtual Servers List and press select. Press Bind.

Now we need to create a Content Switching Policy. This is under Traffic Management > Content Switching > Policies > Add.

Create a Unique name for the Content Switching Policy, I recommend adding a CS_Policy in the name to make it easier later. In the Action Section, Select your CS_Action from the list and then in the Expression area add what is shown below. Substitute nextcloud.yourdomain.com for what you want the reverse DNS to look for.

HTTP.REQ.HOSTNAME.CONTAINS("nextcloud.yourdomain.com")

Now we need to add the CS_Policy to the Content Switching Virtual Server. This is under Traffic Management > Virtual Servers. You will select your Content Switching Virtual Server from the list and press Edit.

Select the Content Switching Policies under the Content Switching Policy Binding.

Click Add Binding.

Click into the Policy section.

Click your CS_Policy from the list and press select and then Bind.

Leave a Reply

Your email address will not be published. Required fields are marked *