The easiest way to deploy Owncloud server on ubuntu 17.10

I want to know how to setup Owncloud 10 on a ubuntu 17.10 desktop or server in the easiest and free way.
I also wanna know how to setup the Owncloud server so you can reach it outside my home-LAN in an easy way.

Thanks for answers

  1. How to install owncloud:

You also can sum up all the different commands into a script and just run the script.

  1. You need dynamic DNS and a static IPv4. For dyn DNS you have different providers, this is one of them