Pulseaudio "Connection refused!"

I am trying to get Libretime 4 running on a new server (not in a container). Everything is working, except for system audio output, which I need.
I’ve tried the following so far:

  • Enabled system audio in the config file, with “pulseaudio” as the kind.
  • Verified that pulseaudio is working with my sound card by playing a file from the command line with aplay.
  • Added the libretime and liquidsoap users to the pulse and pulse-access groups.
  • Found the name of the audio device using pacmd list-sinks and added it to the device field in the config file.
    No matter what I do though, liquidsoap just keeps reporting this error:
[clock.wallclock_pulse:2] Error when starting output pulseaudio:1: Pulseaudio error: Connection refused!
[clock.wallclock_pulse:3] Raised by primitive operation at file "pulseaudio.ml" (inlined), line 47, characters 6-67
[clock.wallclock_pulse:3] Called from file "io/pulseaudio_io.ml", line 82, characters 10-120
[clock.wallclock_pulse:3] Called from file "tools/start_stop.ml", line 108, characters 8-18
[clock.wallclock_pulse:3] Called from file "clock.ml", line 245, characters 20-38