Fresh install of NodeBB 1.11.1 on Debian GNU/Linux 9 (stretch) issues

Technical Support
  • Hi Guys!
    First of all thank you for all your work & sharing NodeBB with us!

    It is my "first ever install" of NodeBB therefore I might have done some elementary mistakes. I was following steps from the documentation below, unfortunately I did not managed to get to the point of "working setup NodeBB screen".

    https://github.com/nodesource/distributions
    https://docs.nodebb.org/installing/os/debian/

    Debian & installed software versions

    ---------------------------------
    
    root@s01:~#  uname -a 
    Linux s01 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux
    
    ---------------------------------
    
    root@s01:~# cat /etc/os-release 
    PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
    NAME="Debian GNU/Linux"
    VERSION_ID="9"
    VERSION="9 (stretch)"
    ID=debian
    HOME_URL="https://www.debian.org/"
    SUPPORT_URL="https://www.debian.org/support"
    BUG_REPORT_URL="https://bugs.debian.org/"
    
    ---------------------------------
    
    root@s01:~# nodejs --version
    v11.4.0
    root@s01:~# npm --version
    6.4.1
    
    ---------------------------------
    
    root@s01:~# aptitude show build-essential                                                                                                                                                                
    Package: build-essential                 
    Version: 12.3
    State: installed
    
    (...)
    
    ---------------------------------
    

    Installation & setup of NodeBB

    ---------------------------------
    
    root@s01:/home/webservices/domains/example.com# git clone -b v1.11.x https://github.com/NodeBB/NodeBB.git nodebb
    Cloning into 'nodebb'...
    remote: Enumerating objects: 24, done.
    remote: Counting objects: 100% (24/24), done.
    remote: Compressing objects: 100% (19/19), done.
    remote: Total 163377 (delta 6), reused 11 (delta 5), pack-reused 163353
    Receiving objects: 100% (163377/163377), 48.73 MiB | 10.97 MiB/s, done.
    Resolving deltas: 100% (124771/124771), done.
    root@s01:/home/webservices/domains/example.com# cd nodebb/
    root@s01:/home/webservices/domains/example.com/nodebb# ./nodebb setup
    package.json not found.
    Populating package.json...
    OK
    Dependencies outdated or not yet installed.
    Installing them now...
    
    npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
    npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
    npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
    npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
    
    > [email protected] install /home/webservices/domains/example.com/nodebb/node_modules/benchpressjs
    > cd rust/benchpress-rs && npm install
    
    npm WARN lifecycle [email protected]~install: cannot run in wd [email protected] neon build >> build.log 2>&1 || exit 0 (wd=/home/webservices/domains/example.com/nodebb/node_modules/benchpressjs/rust/benchpress-rs)
    npm notice created a lockfile as package-lock.json. You should commit this file.
    added 86 packages from 84 contributors and audited 123 packages in 15.229s
    found 0 vulnerabilities
    
    
    > [email protected] install /home/webservices/domains/example.com/nodebb/node_modules/sharp
    > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
    
    info sharp Using cached /root/.npm/_libvips/libvips-8.7.0-linux-x64.tar.gz
    prebuild-install WARN install No prebuilt binaries found (target=11.4.0 runtime=node arch=x64 platform=linux)
    make: Entering directory '/home/webservices/domains/example.com/nodebb/node_modules/sharp/build'
      TOUCH Release/obj.target/libvips-cpp.stamp
      CXX(target) Release/obj.target/sharp/src/common.o
    In file included from ../src/common.cc:24:0:
    ../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
    ../../nan/nan.h:1064:78: warning: ‘v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
           v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
                                                                                  ^
    In file included from /root/.node-gyp/11.4.0/include/node/v8.h:26:0,
                     from /root/.node-gyp/11.4.0/include/node/node.h:63,
                     from ../src/common.cc:22:
    /root/.node-gyp/11.4.0/include/node/v8.h:2538:31: note: declared here
                     Local<String> ToString(Isolate* isolate) const);
                                   ^
    /root/.node-gyp/11.4.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
       declarator __attribute__((deprecated(message)))
       ^~~~~~~~~~
      CXX(target) Release/obj.target/sharp/src/metadata.o
    In file included from ../src/metadata.cc:19:0:
    ../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
    ../../nan/nan.h:1064:78: warning: ‘v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
           v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
                                                                                  ^
    In file included from /root/.node-gyp/11.4.0/include/node/v8.h:26:0,
                     from /root/.node-gyp/11.4.0/include/node/node.h:63,
                     from ../src/metadata.cc:18:
    /root/.node-gyp/11.4.0/include/node/v8.h:2538:31: note: declared here
                     Local<String> ToString(Isolate* isolate) const);
                                   ^
    /root/.node-gyp/11.4.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
       declarator __attribute__((deprecated(message)))
       ^~~~~~~~~~
      CXX(target) Release/obj.target/sharp/src/stats.o
    In file included from ../src/stats.cc:20:0:
    ../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
    ../../nan/nan.h:1064:78: warning: ‘v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
           v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
                                                                                  ^
    In file included from /root/.node-gyp/11.4.0/include/node/v8.h:26:0,
                     from /root/.node-gyp/11.4.0/include/node/node.h:63,
                     from ../src/stats.cc:19:
    /root/.node-gyp/11.4.0/include/node/v8.h:2538:31: note: declared here
                     Local<String> ToString(Isolate* isolate) const);
                                   ^
    /root/.node-gyp/11.4.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
       declarator __attribute__((deprecated(message)))
       ^~~~~~~~~~
      CXX(target) Release/obj.target/sharp/src/operations.o
    In file included from ../src/common.h:23:0,
                     from ../src/operations.cc:23:
    ../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
    ../../nan/nan.h:1064:78: warning: ‘v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
           v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
                                                                                  ^
    In file included from /root/.node-gyp/11.4.0/include/node/v8.h:26:0,
                     from /root/.node-gyp/11.4.0/include/node/node.h:63,
                     from ../src/common.h:22,
                     from ../src/operations.cc:23:
    /root/.node-gyp/11.4.0/include/node/v8.h:2538:31: note: declared here
                     Local<String> ToString(Isolate* isolate) const);
                                   ^
    /root/.node-gyp/11.4.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
       declarator __attribute__((deprecated(message)))
       ^~~~~~~~~~
      CXX(target) Release/obj.target/sharp/src/pipeline.o
    In file included from ../src/pipeline.cc:27:0:
    ../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
    ../../nan/nan.h:1064:78: warning: ‘v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
           v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
                                                                                  ^
    In file included from /root/.node-gyp/11.4.0/include/node/v8.h:26:0,
                     from /root/.node-gyp/11.4.0/include/node/node.h:63,
                     from ../src/pipeline.cc:26:
    /root/.node-gyp/11.4.0/include/node/v8.h:2538:31: note: declared here
                     Local<String> ToString(Isolate* isolate) const);
                                   ^
    /root/.node-gyp/11.4.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
       declarator __attribute__((deprecated(message)))
       ^~~~~~~~~~
      CXX(target) Release/obj.target/sharp/src/sharp.o
    In file included from ../src/sharp.cc:16:0:
    ../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
    ../../nan/nan.h:1064:78: warning: ‘v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
           v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
                                                                                  ^
    In file included from /root/.node-gyp/11.4.0/include/node/v8.h:26:0,
                     from /root/.node-gyp/11.4.0/include/node/node.h:63,
                     from ../src/sharp.cc:15:
    /root/.node-gyp/11.4.0/include/node/v8.h:2538:31: note: declared here
                     Local<String> ToString(Isolate* isolate) const);
                                   ^
    /root/.node-gyp/11.4.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
       declarator __attribute__((deprecated(message)))
       ^~~~~~~~~~
      CXX(target) Release/obj.target/sharp/src/utilities.o
    In file included from ../src/utilities.cc:19:0:
    ../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
    ../../nan/nan.h:1064:78: warning: ‘v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
           v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
                                                                                  ^
    In file included from /root/.node-gyp/11.4.0/include/node/v8.h:26:0,
                     from /root/.node-gyp/11.4.0/include/node/node.h:63,
                     from ../src/utilities.cc:18:
    /root/.node-gyp/11.4.0/include/node/v8.h:2538:31: note: declared here
                     Local<String> ToString(Isolate* isolate) const);
                                   ^
    /root/.node-gyp/11.4.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
       declarator __attribute__((deprecated(message)))
       ^~~~~~~~~~
      SOLINK_MODULE(target) Release/obj.target/sharp.node
      COPY Release/sharp.node
    make: Leaving directory '/home/webservices/domains/example.com/nodebb/node_modules/sharp/build'
    
    > [email protected] postinstall /home/webservices/domains/example.com/nodebb/node_modules/preact
    > node -e "console.log('\u001b[35m\u001b[1mLove Preact? You can now donate to our open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/preact/donate\u001b[0m')"
    
    Love Preact? You can now donate to our open collective:
     > https://opencollective.com/preact/donate
    npm notice created a lockfile as package-lock.json. You should commit this file.
    added 624 packages from 747 contributors and audited 4314 packages in 165.443s
    found 5 vulnerabilities (1 low, 4 moderate)
      run `npm audit fix` to fix them, or `npm audit` for details
    OK
    
    [benchpressjs] Unable to build or find a suitable native module, falling back to JS version
    2018-12-15T16:36:25.746Z [2912] - info: NodeBB Setup Triggered via Command Line
    
    Welcome to NodeBB v1.11.1!
    
    This looks like a new installation, so you'll have to answer a few questions about your environment before we can proceed.
    Press enter to accept the default setting (shown in brackets).
    URL used to access this NodeBB (http://localhost:4567) 
    
    ---------------------------------
    

    Access to setup

    ---------------------------------
    
    root@s01:~# curl http://localhost:4567
    curl: (7) Failed to connect to localhost port 4567: Connection refused
    
    ---------------------------------
    
    root@s01:~# iptables -L
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination         
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination         
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination         
    root@s01:~# 
    
    ---------------------------------
    

    Questions

    1.) Why there are so many warnings & deprecated notices? Is that normal? Should I use different version of nodejs?
    2.) Is that secure "found 5 vulnerabilities (1 low, 4 moderate)"?
    3.) Why I am not able to access "http://localhost:4567" using curl from the same machine ... what is necessary to improve in my installation process?
    4.) As in the future I will be using Nginx to reverse proxy to "http://localhost:4567" ... which user should I use to start NodeBB? www-data? root? other?

    Thank you very much for your help!

    Cheers!

  • I recommend two things:

    • Use the Ubuntu installation docs, they're the most maintained. It's essentially the same as Debian
    • Use Node 10
  • @PitaJ thank you very much for the reply!

    1.) Can you advice me which user should I use to go through the installation process? www-data? root? other?

    2.) Does it matter which user runs the command "./nodebb start" after successful setup?

    Does user mentioned in points nr (1) and (2) really matter as the service will be available anyway on http://localhost:4567?

    Thank you for your help!

  • @squre said in Fresh install of NodeBB 1.11.1 on Debian GNU/Linux 9 (stretch) issues:

    @PitaJ thank you very much for the reply!

    1.) Can you advice me which user should I use to go through the installation process? www-data? root? other?

    I suggest creating a new nodebb user with a home directory and installing NodeBB into a folder in nodebb's home directory.

    Please don't install or run NodeBB as root.

    2.) Does it matter which user runs the command "./nodebb start" after successful setup?

    Yes, due to file system ownership and permissions. You should run ./nodebb start as the nodebb user if you follow my previous suggestions.

    Does user mentioned in points nr (1) and (2) really matter as the service will be available anyway on http://localhost:4567?

    Only in the "don't use root" sense. Otherwise it doesn't really matter.

  • @PitaJ Got it, thanks a lot for your suggestions. I will try the installation process once again today.


Suggested Topics


  • 0 Votes
    4 Posts
    332 Views

    with the update to 1.13.1 this error appears, guest renames chat infinitely
    the chat is obsolete, cannot be used
    any ideas?

    86c1c08f-ee5d-491e-bba6-ce1049851402-image.png

  • 0 Votes
    7 Posts
    1k Views

    So, with this configuration, it's ok !

    <VirtualHost *:80> ServerName mydomain.com ServerAdmin [email protected] DocumentRoot /var/www/html # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^[^\/]*\/(.*) https://mydomain.com/$1 [R=301,L] </IfModule> RewriteCond %{SERVER_NAME} =mydomain.com RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] </VirtualHost> <VirtualHost *:4567> ServerName subdomain.mydomain.com # Basic security headers Header always set X-Content-Type-Options "nosniff" Header always set X-Xss-Protection "1; mode=block" # NodeBB header RequestHeader set X-Forwarded-Proto "https" # Static file cache <FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css)$"> <IfModule mod_expires.c> ExpiresActive on ExpiresDefault "access plus 14 days" Header set Cache-Control "public" </IfModule> </FilesMatch> ProxyRequests off <Proxy *> Order deny,allow Allow from all </Proxy> # Custom Error Document when NodeBB is offline ProxyPass /error-documents ! ErrorDocument 503 /error-documents/503.html Alias /error-documents path/to/nodebb/public # Websocket passthrough RewriteEngine On RewriteCond %{REQUEST_URI} ^/socket.io [NC] RewriteCond %{QUERY_STRING} transport=websocket [NC] RewriteRule /(.*) ws://localhost:4567/$1 [P,L] ProxyPass / http://localhost:4567/ ProxyPassReverse / http://localhost:4567/ # Log stuff ErrorLog ${APACHE_LOG_DIR}/nodebb-error.log CustomLog ${APACHE_LOG_DIR}/nodebb-access.log combined RewriteCond %{SERVER_NAME} =subdomain.mydomain.com RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] </VirtualHost>

    The problem is that I had not put 2 different ServerName in the config, so all traffic was redirected and rewritten in HTTPS on the same ServerName : subdomain.mydomain.com

  • 0 Votes
    2 Posts
    712 Views

    Persona version is a little different from other plugins, it is fixed to your version of NodeBB. If you update your NodeBB, you should also get the newer Persona version.

  • 1 Votes
    6 Posts
    3k Views

    @julian said in How to install letsencrypt on nodebb?:

    Wow, I've been wanting to develop a LetsEncrypt plugin for NodeBB for quite some time so if there is one now I will definitely take a look soon
    @julian julian please develop a LetsEncrypt plugin for NodeBB, it will solve lots of problems. Thanks man.

  • 0 Votes
    2 Posts
    1k Views

    Okay, so I fixed it.

    Put the tags in the header as usual, then upload the smallest (16x16 as ico) to the general section. This will be the one that nodebb overrides the others with.

    The others will still work for other systems like android and such.