NodeBB is built with nodejs, and is made to be fast and powerful. For your convenience, we currently offer CentOS and Ubuntu builds.
To get started with running NodeBB using Docker, you will want to run a redis instance.
docker run --name my-forum-redis -d -p 6379:6379 nodebb/docker:centos-redis docker run --name my-forum-redis -d -p 6379:6379 nodebb/docker:ubuntu-redis
Next, launch the NodeBB instance, so it links with the just-launched Redis instance.
docker run --name dockerdev-nodebb --link dockerdev-redis:redis -p 80:80 -p 443:443 -p 4567:4567 -P -t -i nodebb/docker:centos docker run --name dockerdev-nodebb --link dockerdev-redis:redis -p 80:80 -p 443:443 -p 4567:4567 -P -t -i nodebb/docker:ubuntu
You will be asked to configure your NodeBB instance, as no config file was found. Simply press enter for all settings except Redis hostname, which should be
redis as it is linked using the
--linked parameter to our Redis instance, and the administrator username, e-mail and password.
The default port of nodebb is 4567. Ports 80, and 443 have also been exposed for your convenience. You can keep the default nodebb port or change it.
NodeBB will launch the setup and automatically close. Next, simply start the instance again. It will this time find a config file and start as a daemon.
docker start my-forum-nodebb
Your NodeBB instance will be accessible on the port you selected during setup. Check
docker ps for more details.
Simply use the
/data volume inside your Redis instance. See the official guide on making backups.
Thank you for this! I am not using this specific image but the components you used to build it were helpful to me while trouble shooting.
Thanks for this repo. But if I understand right (I asked on the official NodeBB forum) this is not an official repo created by the official team ?
Whatever, it's very usefull ! But, can you put it up-to-date please ? :)
For some reason you need to specify the port of the host in the url parameter.
URL used to access this NodeBB (http://localhost:4567): http://myhost.com:80
When I run Nodebb:
docker run --name nodebb --link nodebb-redis:redis -p 80:80 -p 443:443 -p 4567:4567 -P -t -i nodebb/docker:ubuntu
docker run --name nodebb --link nodebb-redis:redis -p 80:80 -p 443:443 -p 4567:4567 -P -t -i nodebb/docker:ubuntu 3/5 15:28  - info: NodeBB v0.6.1 Copyright (C) 2013-2014 NodeBB Inc. 3/5 15:28  - info: This program comes with ABSOLUTELY NO WARRANTY. 3/5 15:28  - info: This is free software, and you are welcome to redistribute it under certain conditions. 3/5 15:28  - info: 3/5 15:28  - warn: Configuration not found, starting NodeBB setup 3/5 15:28  - info: Welcome to NodeBB! 3/5 15:28  - info: This looks like a new installation, so you'll have to answer a few questions about your environment before we can proceed. 3/5 15:28  - info: Press enter to accept the default setting (shown in brackets). URL used to access this NodeBB (http://localhost:4567) Please enter a NodeBB secret (03c99b8d-ff9f-4ae2-9b23-514426828b56) Which database to use (redis) redis 3/5 15:29  - info: Now configuring redis database: Host IP or address of your Redis instance (127.0.0.1) Host port of your Redis instance (6379) Password of your Redis database Which database to use (0..n) (0) 3/5 15:29  - info: Configuration Saved OK npm WARN package.json email@example.com No repository field. firstname.lastname@example.org node_modules/redis email@example.com node_modules/connect-redis └── firstname.lastname@example.org (email@example.com) 3/5 15:29  - info: Populating database with default configs, if not already set... 3/5 15:29  - error: Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED at RedisClient.flush_and_error (/opt/nodebb/node_modules/redis/index.js:142:13) at RedisClient.on_error (/opt/nodebb/node_modules/redis/index.js:180:10) at Socket.<anonymous> (/opt/nodebb/node_modules/redis/index.js:95:14) at Socket.EventEmitter.emit (events.js:95:17) at net.js:441:14 at process._tickCallback (node.js:415:13) 3/5 15:29  - warn: NodeBB Setup Aborted. Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
Just pushed out an update to the Dockerfile to grab from the 0.6.x branch.
Hi, I just ran NodeBB using Docker successfully and found it is NodeBB v0.5.4. How can I get a newer version of Dockerfile, such as v0.6.1 or v.0.7.X? Thanks~