From the MongoDB manual:
To start the server as a daemon listening on port 5586 and sending all output to mongodb.log, we can do:
mongod --port 5586 --fork --logpath mongodb.log
What is the benefit to run an application as a daemon and when I should do so?