If you are like my, and like to play around with #occ on #Nextcloud with #OpenBSD That will survive upgrades. Thank me later.
with #httpd you probably want to create an include config file for your path, like:# pwd
/var/www/nextcloud/config
# cat datadirectory.config.php
<?php
$CONFIG['datadirectory'] = ((php_sapi_name() == 'cli') ? '/var/www' : '') . '/nextcloud-data';