diff --git a/man/mosquitto.conf.5.xml b/man/mosquitto.conf.5.xml
index 3af551c5..38affc75 100644
--- a/man/mosquitto.conf.5.xml
+++ b/man/mosquitto.conf.5.xml
@@ -869,7 +869,7 @@ log_timestamp_format %Y-%m-%dT%H:%M:%S
If mosquitto is being automatically started by an
init script it will usually be required to write a pid
file. This should then be configured as e.g.
- /var/run/mosquitto.pid
+ /var/run/mosquitto/mosquitto.pid
Not reloaded on reload signal.
diff --git a/mosquitto.conf b/mosquitto.conf
index 216b8c7d..ef390cb5 100644
--- a/mosquitto.conf
+++ b/mosquitto.conf
@@ -145,7 +145,7 @@
# Write process id to a file. Default is a blank string which means
# a pid file shouldn't be written.
-# This should be set to /var/run/mosquitto.pid if mosquitto is
+# This should be set to /var/run/mosquitto/mosquitto.pid if mosquitto is
# being run automatically on boot with an init script and
# start-stop-daemon or similar.
#pid_file
diff --git a/service/systemd/mosquitto.service.notify b/service/systemd/mosquitto.service.notify
index 84b08f84..f4a15bbf 100644
--- a/service/systemd/mosquitto.service.notify
+++ b/service/systemd/mosquitto.service.notify
@@ -12,6 +12,8 @@ ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto
ExecStartPre=/bin/chown mosquitto: /var/log/mosquitto
+ExecStartPre=/bin/mkdir -m 740 -p /var/run/mosquitto
+ExecStartPre=/bin/chown mosquitto: /var/run/mosquitto
[Install]
WantedBy=multi-user.target
diff --git a/service/systemd/mosquitto.service.simple b/service/systemd/mosquitto.service.simple
index d0e657e6..ebdbeed2 100644
--- a/service/systemd/mosquitto.service.simple
+++ b/service/systemd/mosquitto.service.simple
@@ -10,6 +10,8 @@ ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto
ExecStartPre=/bin/chown mosquitto: /var/log/mosquitto
+ExecStartPre=/bin/mkdir -m 740 -p /var/run/mosquitto
+ExecStartPre=/bin/chown mosquitto: /var/run/mosquitto
[Install]
WantedBy=multi-user.target