So this is how i got green flags again.
first I added a user lets call him kamin-user
sudo adduser --home /var/www/joomla --shell /bin/bash --no-create-home --ingroup www-data --ingroup ssh kamin-user
second I made a ownership with kamin-user and www-data important is only the www-data on second place (try and error) you can do root:www-data
sudo chown -...
That's a very unorthodox method of configuring your site.
Once you have a system generated configuration.php file from the install, you would be best simply moving that around and adjusting it rather than creating one from scratch.
When you say "automatic install" do you mean via a hosting tool like softaculous in cPanel, or do you mean by ...