$ docker run -it -p 1883:1883 -v "$PWD/mosquitto/config:/mosquitto/config" -v "$PWD/mosquitto/data:/mosquitto/data" -v "$PWD/mosquitto/log:/mosquitto/log" eclipse-mosquitto When running the image, the default configuration values are used. To use a custom configuration file, create your mosquitto.conf in $PWD/mosquitto/config/mosquitto.conf, then mount the config directory to /mosquitto/config. $ docker run -it -p 1883:1883 -v "$PWD/mosquitto/config:/mosquitto/config" eclipse-mosquitto Configuration can be changed to: persist data to /mosquitto/data log to /mosquitto/log/mosquitto.log i.e. add the following to mosquitto.conf: persistence true persistence_location /mosquitto/data/ log_dest file /mosquitto/log/mosquitto.log