Just to clear some confusion here, redis is NOT required for the session store it is required for socket.io & pubsub to work properly when using more than 1 nodebb process. So if you want you can use psql or mongodb for session store. Below is a config.json that uses mongodb as data/session store and redis for socket.io/pubsub.
{
"url": "myforum",
"port": [4567, 4568],
"database": "mongo",
"mongo": {
"host": "127.0.0.1",
"port": "27017",
"password": "",
"database": "datastore"
},
"session_store": {
"name": "mongo",
"host": "127.0.0.1",
"port": "27017",
"password": "",
"database": "sessionstore"
},
"redis": {
"host": "127.0.0.1",
"port": "6379",
"password": "",
"database": "0"
}
}
If you remove the session_store
block from the above config. Redis will be preferred for the session store. session_store
block let's you explicitly define the database to use for sessions.
If you are just running a single nodebb instance you can just have a single "mongo" or "postgress" block and it will be used for everything.