There is probably no good reason why I should have to type out this tutorial, but here it is. I migrated from a dedicated LXC container running NGINX as the front-end because I got tired of administering the server after every OS or Nextcloud update broke it. I figure…. the Docker image will have this figured out right? Time will tell.
The Docker image, however, comes with its own set of shortcomings.
First, let’s fire up Portainer and make a new custom image. If you use the stock image, it comes without SMB support. If you don’t need this, ignore this section and just pull the “nextcloud:apache” image instead.
Go to “Images”, then hit “Build a new image”. Paste the following into the builder:
FROM nextcloud:apache
RUN apt-get update && apt-get install -y procps smbclient && rm -rf /var/lib/apt/lists/*
Build and deploy that sucker.
Next, enter your new Nextcloud instance and finish the initial setup.
Now let’s set up our existing NGINX Proxy Manager install. First, edit the Nextcloud config.php to reflect the new domain name and force SSL:
'trusted_domains' =>
array (
0 => '192.168.1.25',
1 => 'example.domain.com',
),
'overwriteprotocol' => 'https',
The ‘overwriteprotocol’ line will likely not be there. Add it.
Then add it to NGINX Proxy Manager, force SSL and HSTS, and grab a new cert.
Last, reconnect to the server using the domain, and give your Android client a try. And oh, look! SMB support once you enable the External Storage addon!