

You’ll need to replace the ServerName parameters with your Nextcloud and Collabora FQDNs. Put the following in /etc/apache2/sites-available/nf and make the highlighted changes for your setup. Sudo a2enmod ssl proxy proxy_http proxy_wstunnel rewrite headers
#QOWNNOTES NEXTCLOUD DOCKER INSTALL#
Install Apache from the Ubuntu repository and enable some modules. And finally, this Apache instance will also handle all of our encryption. Nextcloud and Collabora will also talk to each other through this proxy. Unless I explicitly say otherwise, when I refer to Apache, I’m talking about the reverse proxy running on the host having nothing to do with Docker or any of its containers.īasically what’s going to happen here is this Apache instance will receive web requests for both Nextcloud and Collabora and forward them back to the correct Docker containers. The Nextcloud container includes its own Apache instance which will actually be running Nextcloud. We will be installing Apache on the server, and this will be our reverse proxy.

We will be dealing with multiple instances of Apache in this setup. Sudo chmod +x /usr/local/bin/docker-composeĤ.Install Apache 4.1.Apache Reverse Proxy OverviewĪ quick note about Apache. Sudo curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose Sudo add-apt-repository "deb bionic stable" I recommend going through the official setup instructions, but here is the short version: sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

Install Docker and Docker-Compose as outlined here: Docker Documentation – 6 Nov 20 The first thing we’ll do is set up Docker. The end result is that, no matter where you are, your device can find your Nextcloud server without doing something silly like hairpin routing through your firewall to come back to it. When you are on your LAN, your local DNS server responds to the same query with the local IP address of your Nextcloud server. So for example, when you are off-network, your device will query from a public DNS server and receive your external IP address. What this means is that you have a DNS zone, in this example domain.name, and that you have this zone available in both public DNS and local DNS where the records differ. Replace these with yours.Īlthough I won’t go into great detail here, I also want to briefly explain the concept of split-horizon DNS since a lot of people who aren’t network admins aren’t familiar with it. In the below examples, I’ve used for Nextcloud’s FQDN, and for Collabora’s. Freshly-installed and up-to-date Ubuntu 18.04 server.Access to your local and public DNS records.Fully Qualified Domain Name (FQDN) for Nextcloud.Most of this will be outside the scope of this document. You’ll need to have some info ready that we’ll use throughout the process. I’ve installed several small Nextcloud instances using this method with good results, and I wanted to compile my setup notes in a format that’s easy to follow and reproduce. I know a lot of people are trying to get on board with Nextcloud right now during this COVID-19 pandemic with so many struggling to work from home. I will do my best to plainly emphasize things that you will need to change, but it will mainly be three things: FQDNs, IP addresses, and passwords.
#QOWNNOTES NEXTCLOUD DOCKER HOW TO#
I will also cover how to update everything. By the end (and as of writing), this setup will have an A+ rating on Nextcloud Security Scan and Qualys SSL Server Test and a valid, self-updating certificate from Let’s Encrypt. This is a general guide to setting up a functional Nextcloud instance using Ubuntu Server 18.04.3, Docker CE, Docker-Compose, Collabora CODE, and an Apache reverse proxy.
