Command not found / Cant install/setup nodebb

Technical Support
  • This is a new problem, I have recently had which I didnt have before on other installs.

    root@xxxx [/home/xxxx/nodebb]# ./nodebb setup
    ./nodebb: line 9: which: command not found
    ./nodebb: line 98: : command not found

    any clues on how to resolve this? looks like its an issue with the "npm install" command as it times out

    npm ERR! Command failed: git clone --template=/root/.npm/_git-remotes/_templates --mirror git:// /root/.npm/_git-remotes/git-github-com-wzrdtales-simple-recaptcha-git-d2b10e99
    npm ERR![0:]: errno=Connection timed out
    npm ERR! fatal: unable to connect a socket (Connection timed out)

    could this be the issue and if so how do I resolve it?


  • We moved away from a bash script in the latest versions of NodeBB, so you could give that a try.

    Otherwise, it seems the which command isn't leading to a program on your OS... what OS are you using?

  • Im on Centos, and what do you mean you moved away from Bash scripts, when your documentation instructs me so?

    or am i missing something here?

  • The nodeBB startup script used to be a bash script in 0.6, while 0.7 uses nodeJS for it.

    which returns the pathnames of the files (or links) which would be executed in the current environment. (from man page)

    ./nodebb: line 9: which: command not found indicates, that your system is missing this tool.

    Installing which by executing

    su -c 'yum install which' #asking for root password

    should solve your problem. 🙂

  • Hi @rbeer thanks for your reply, I tried the command you provided, but its already installed...

    However, what seem to help was making some changes to git due to a timeout issue or proxy issue.

    [url ""]
    insteadOf = [email protected]:
    [url "https://"]
    insteadOf = git://

    Once I done this, it installed properly and now runs.


Suggested Topics

  • 0 Votes
    5 Posts

    Thank you very much! I was able to use the Admin user that was created in this authentification

  • 0 Votes
    1 Posts

    I am running a nodebb 1.15.0 system on Ubuntu 20 on nginx. It's a newer install and we've had an occasional issue on both registration and login where folks will get a message denying their login or registration.

    2020-11-12T06:11:19.312Z [4567/17870] - error: /register
    invalid csrf token


    2020-11-12T06:11:13.910Z [4567/17870] - error: /login
    invalid csrf token

    Frequently a refresh on the browser will let a user login or sometimes just waiting a few minutes.

    Here's my config.json

    "url": "",
    "secret": "secret",
    "database": "mongo",
    "port": "4567",
    "mongo": {
    "host": "",
    "port": "27017",
    "username": "nodebb",
    "password": "secret",
    "database": "nodebb",
    "uri": ""


    Nginx config

    server {

    server_name; client_max_body_size 100M; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass; proxy_redirect off; # Socket.IO Support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

    server {
    if ($host = {
    return 301 https://$host$request_uri;
    } # managed by Certbot

    listen 80; server_name; return 404; # managed by Certbot


    Any help would be very much appreciated!

  • 0 Votes
    18 Posts

    @pitaj WHHAAAT? NEXT WEEK? 🍾 😅

  • 0 Votes
    5 Posts

    @julian Thank you 🙂

  • sudo nodebb help

    Technical Support
    0 Votes
    5 Posts

    ok got it working again i re-took ownership of the entire directory again... maybe a i did a sudo git pull by mistake or something silly

    opps xd