upsd[1234]: Can't chdir to /run/nut: No such file or directory

The Ubuntu package for the Raspberry Pi doesn't create the /run/nut directory in time for the package to start up. However after the first attempt to run the server the directory is created and the second attempt (usually manual) succeeds.

The fix is related to the tmp file system starting up. Essentially the fix comes from adding a config file to the tmp filesystem startup directory /etc/tmpfiles.d. Create a file named /etc/tmpfiles.d/nut-run.conf and in that file put the following text:

# Manually created to ensure the /run/nut directory is created when the tmp filesystem starts up.
# reference: https://bugzilla.redhat.com/show_bug.cgi?id=1187286
D    /run/nut 0770 root nut -

Change the ownership and permissions to:

-rw-r--r--   1 root root   193 Mar 18 12:10 nut-run.conf

That's it. Now simply reboot and everything will just work.