How can I get vboxweb to start properly at boot

After some more googling and mucking about, I finally came up with a solution:

1) I concluded that the /etc/defaults/virtualbox file did not seem to have any effect on anything (just a remnant from the init.d days?). So the user and group settings in that file was wasted.

Solution: Added User=vbox and Group=vboxusers in the [Service] section of the vboxweb.service file.

2) Some of the problems I had was due to the vboxweb.config file referring to a pid-file in the /run folder, and vbox has no write access to that folder. First I tried to make a subfolder, owned by vbox, in which to store the pid file, but I learned that the /run folder gets wiped at boot time, including all subfolders.

Solution: Created a subfolder in vbox homedir, and updated vboxweb.config file with that location.

3) For some reason (which still eludes me), referring to the actual IP address, 192.168.1.12, in config.php (in the phpvirtualbox folder) and in the vboxweb.config file (as mentioned in the original post), did not work at boot time. (A later restart of the service would work though.)

Solution: Updated both config.php and vboxweb.config with IP address 127.0.0.1 instead of 192.168.1.12.

Case closed! :o) ...apart for all the questions about why things are the way they are, but I can live with that :o)

BR, Rolf