There are other options:
- you can run an
ExecStartPre
as root even with DynamicUser like this:ExecStartPre = "!/some/binary/somewhere";
- alternatively, create a separate
foo-config.service
that runs as root which is responsible for doing all the setup.