Should I install vpn after I install nextcloud or before?

I want to install nextcloud on ubuntu server 18.04 LTS but I also want to install openvpn on ubuntu.
What should I do first?

don’t care. that is totally independent.

unless you want to share the same url, letsencrypt certs and/or port 443. then i woud start with nextcloud.

commercial: if you didn’t decide yet which how to to follow:

based on

the playbook should be used only on machine where you didn’t install webserver and/or databases before.