Parallel OSMC and ownCloud on Raspberry pi 3

I have installed Nextcloud (a new fork of owncloud) using the guide here: Simple Nextcloud Installation on Raspberry Pi | Unix etc. and I can access it fine from within my own LAN.

But I run into problems when I try to secure it - ie. setup HTTPS and use a dynamic domain to access it from the internet. Any guide I find ends up having something incompatible with OSMC (a config file will be missing or somewhere else, certain configs don’t work, etc.)

Does anyone have an idiot’s guide to hardening/securing Nextcloud on OSMC?