A simple Docker image for quick-launching a NodeBB forum.
This repo contains the files for the automatic build of the Docker image
nilsramsperger/nodebb hosted on DockerHub.
The NodeBB comes with no plugins and the forum data is stored in a Redis within the container.
The Redis is configured for AOF persistence.
Not the fastest but the least chance for data loss on unexpected shutdowns.
Be advised, any other tags are for experimental purpose and might not be runnable.
Best stick to
latest or a specific version tag.
Create the container
docker create --name myNodeBB -p 4567:4567 -e url="http://127.0.0.1:4567" -v nodebb-data:/var/lib/redis -v nodebb-files:/opt/nodebb/public/uploads -v nodebb-config:/etc/nodebb nilsramsperger/nodebb
In this case the container named
myNodeBB and is bound to local port 4567.
The container's public url is set to
The three volumes are linked to the named volumes
Change things as you like.
Start the container
docker start myNodeBB
On first run, NodeBB will start it's web installer interface.
There you can create your admin account and set things up.
Just leave the database settings as they are.
config.json is created by the web installer and copied to
/etc/nodebb when you shutdown the container after installing.
So, restart the container after you completed the web installer (You'll have a button called "Launch NodeBB" on screen, when setup is done).
If you want to use the container on a public URL and an other port, you should edit the
The full hostname and port must be placed there to get all links within NodeBB working correctly.
/var/lib/rediscontains the Redis data
/opt/nodebb/public/uploadscontains NodeBB uploads like avatars
Update to latest version
From 1.2.2 to 1.4.4
Since I didn't get any NodeBB version of the 1.3.x running, the auto-update feature can't be used for this kind of update.
You will have to do it the manual way. Sorry for that.
- Backup the data volumes of your 1.2.2 container.
- Connect to the NodeBB container with a Bash by
docker exec -it nodebb bash.
If your container isn't named
nodebb, modify the command accordingly.
- You should be in
If not, do a
- Stop the NodeBB instance by
node nodebb stop.
Make sure all
nodeprocesses are stoped,
- Get the latest NodeBB sources by
- Check out the NodeBB 1.3.0 sources by
git checkout v1.3.0
- Let NodeBB upgrade the database by
node nodebb upgrade.
- Leave the container by
After these steps the container is at NodeBB 1.3.0 and you can do the automatic update to 1.4.4.
Just procede with the next section.
Any minor version increase by one
For example 1.4.4 to 1.5.0
If you want to update your NodeBB to the latest version, just stop and remove your current container.
Then recreate it with the
create command from the install section.
On startup, the container will run a
nodebb upgrade and thus prepare the database for the new version of NodeBB.
Backup and restore
Save the contents of the three volumes for creating a backup.
To restore, copy the contents back.
- On shutdown after finishing the web-installer the
config.jsonis not copied to
To compensate just stop and start the container once more.
The NodeBB web-client notifies about broken web socket connections and tries to reestablish infinitely.
The public URL and port in the
config.json are not set correctly.