Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    1. Home
    2. AOKP
    A
    • Profile
    • Following 1
    • Followers 4
    • Topics 10
    • Posts 159
    • Best 49
    • Groups 0

    AOKP

    @AOKP

    Offering NodeBB installs at fixed rates.

    79
    Reputation
    2101
    Profile views
    159
    Posts
    4
    Followers
    1
    Following
    Joined Last Online
    Website koxha.de Location Germany

    AOKP Follow

    Best posts made by AOKP

    • NodeBB - Full Stack Setup

      Hello girls and boys,

      remember my last guide about a "High performance stack"? This time I got something better for you - a complete guide from picking a server until the actual setup with plenty of extras.

      Table of contents

      1. Server
      2. OS
      3. Preperation
      4. DNS
      5. Security
      6. Webserver
      7. Database
      8. PHP
      9. NodeJS
      10. Ads
      11. Bonus
      12. Notes

      Server

      Picking the right server is a difficuilt and quite sensitive task. If you pick a too underpowered system you will run out of resources fast. If its too expensive though, you will run out of cash.
      So what is enough and what is luxury?

      Most people will tell you to either try Linode, DigitalOcean or Vultr. However, for the 5$ you pay, you are getting some overpriced hipster box. If you are really low on cash I can recommend OVH's VPS boxes. In my opinion the performance offered there is fairly decent and way better compared to DO for example. Alternative you should check out Online.net's "ScaleWay" x86 boxes. While the CPU is not that great, the VPS's are just fine to kick of for a few bucks. For German/EU users I can also recommend using Netcup. Its pricey at times, however they often have great promotions and solid performances.

      Please note that this is just my personal opinion. In the end it depends on you, how much you are willed to spend and where. I personally would use a VPS/Server with at least 2GB of RAM for a small installation of NodeBB. The guide below has been optimized for a 32GB RAM and 8 core system.

      OS

      While you can use any OS, you are comfortable with, I will only provide the commands for Ubuntu here and so do recommend you to use it as well.
      Why? Because, if you are reading this guide I will assume you are a beginner.
      Furthermore Ubuntu Server has in general the greatest documentation as its quite popular.

      Good choices are also FreeBSD, CentOS, Arch Linux, Fedora and so on.
      Basically it doesn't really matters.

      Preperation

      Assuming you have installed Ubuntu Server 16.04LTS on your server, its time to get it running. If you are using Windows on your PC, I do recommend to install WinSCP and PuTTY. Instead of WinSCP you can of course use FileZilla. However, my personal experience confirmed that WinSCP is far more convenient to use. Maybe try both and decide which one you like more.

      Additionally I recommend using a text editor with syntax/highlighting, e.g. Sublime or Atom.
      Even though we will not really use them in this guide, its always recommended to have a proper text editor on your PC.

      DNS

      What has DNS to do with a stack? Not a lot, thats right, but as in my previous guide we will target the maximum possible performance. Therefore, we will also try to reduce the DNS resolving time.
      To achieve this we will route our domain through CloudFlare. Just sign up and follow the instructions. Once done be sure to have DISABLED CloudFlare in the DNS settings (grey clouds).

      But why? Due to the use of CloudFlare the server response time can be delayed around 0,7s, which is quite a lot, considering we want the maximum performance. Instead we will just make use of CloudFlare's fast DNS network.

      Security

      Open up PuTTY and enter your servers IP. By default the SSH port will be set to 22. Once you entered your password and successfully logged in, its recommended to change the SSH port.
      To achieve this I recommend running the following commands:

      apt-get update && apt-get upgrade
      apt-get install nano
      nano /etc/ssh/sshd_config
      

      Check out for the line writing:

      Port 22
      

      Change it to a number like 198 for example. Once edited hit Ctrl+X. Confirm with Y.
      Now you need to restart SSH:

      service ssh restart
      

      Thats the most basic security I do recommend. Of course there are more practices like Fail2Ban, Firewalls and so on. However, this guide is directed at beginners and covers the most basic commands to admin a server.

      Between, did you noticed how we updated our sources and upgraded our system with the first command? Neat.

      Webserver

      By default Ubuntu Server might have a couple of useless crap installed which will be blocking in our use case. To remove it run the following commands:

      apt-get remove httpd* apache* nginx* mysql* php*
      apt-get purge httpd* apache* nginx* mysql* php*
      

      All clean and ready to use. Now we can start setting up our own webserver.
      As you might have heard there are plenty webservers. The two most commonly used ones are NGINX and Apache.
      Unfortunately I have encountered webmasters still using Apache in 2017. NGINX is far more efficient and performant.
      Therefore, the choice is quite easy. However, we won't install NGINX over the apt repo. Instead we will build it from source.

      But why? Isn't it harder to setup? Sure it is, but at the same time we will add some goodies to our NGINX version.
      One of them will be Google PageSpeed. Yep, TLSv1.3 will be supported as well.
      Our goal is maximum performance at maximum stability and security. Lets go for it.
      Lets first clone some of the required modules and also install some libraries.
      Before doing so, we will install git, since we are going to need this later when installing NodeBB.

      apt-get install git
      

      General deps necessary for compiling:

      apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev unzip uuid-dev
      

      Now we can start compiling NGINX!

      NPS_VERSION=1.13.35.2-stable
      cd
      wget https://github.com/apache/incubator-pagespeed-ngx/archive/v${NPS_VERSION}.zip
      unzip v${NPS_VERSION}.zip
      nps_dir=$(find . -name "*pagespeed-ngx-${NPS_VERSION}" -type d)
      cd "$nps_dir"
      NPS_RELEASE_NUMBER=${NPS_VERSION/beta/}
      NPS_RELEASE_NUMBER=${NPS_VERSION/stable/}
      psol_url=https://dl.google.com/dl/page-speed/psol/${NPS_RELEASE_NUMBER}.tar.gz
      [ -e scripts/format_binary_url.sh ] && psol_url=$(scripts/format_binary_url.sh PSOL_BINARY_URL)
      wget ${psol_url}
      tar -xzvf $(basename ${psol_url})  # extracts to psol/
      
      OPENSSL_VERSION=1.1.1-pre8
      cd
      wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
      tar -xvzf openssl-${OPENSSL_VERSION}.tar.gz
      
      NGINX_VERSION=1.14.0
      cd
      wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
      tar -xvzf nginx-${NGINX_VERSION}.tar.gz
      cd nginx-${NGINX_VERSION}/
      ./configure --add-module=$HOME/$nps_dir ${PS_NGX_EXTRA_FLAGS} \
      --prefix=/usr/local/nginx \
      --sbin-path=/usr/local/sbin/nginx \
      --conf-path=/etc/nginx/nginx.conf \
      --error-log-path=/var/log/nginx/error.log \
      --http-log-path=/var/log/nginx/access.log \
      --pid-path=/run/nginx.pid \
      --lock-path=/run/lock/subsys/nginx \
      --with-openssl=/root/openssl-${OPENSSL_VERSION} \
      --with-http_ssl_module \
      --with-http_v2_module \
      --with-http_stub_status_module \
      --with-http_gzip_static_module \
      --without-mail_pop3_module \
      --without-mail_imap_module \
      --without-mail_smtp_module
      make
      make install
      

      Please note that Google PageSpeed, OpenSSL and NGINX might update from time to time. Therefore I recommend checking them for updates regularly.
      To update NGINX or any of the modules you just want to rerun the above commands with their respective version numbers. Afterwards you just restart NGINX.

      Well, thats it. Almost. Now we need to be able to start and stop NGINX and also let it auto boot.
      To achieve this we will create a script:

      nano /lib/systemd/system/nginx.service
      

      Paste this into it:

      [Unit]
      Description=The NGINX HTTP and reverse proxy server
      After=syslog.target network.target remote-fs.target nss-lookup.target
      
      [Service]
      Type=forking
      PIDFile=/run/nginx.pid
      ExecStartPre=/usr/local/sbin/nginx -t
      ExecStart=/usr/local/sbin/nginx
      ExecReload=/bin/kill -s HUP $MAINPID
      ExecStop=/bin/kill -s QUIT $MAINPID
      PrivateTmp=true
      
      [Install]
      WantedBy=multi-user.target
      

      Close with Ctrl+X, confirm with Y.
      Reload systemd services:

      systemctl daemon-reload
      

      Enable NGINX on boot:

      systemctl enable nginx
      

      You can now verify whether or not NGINX is running by entering:

      service nginx status
      

      Starting NGINX manually can be done with:

      service nginx start
      

      Congrats on your succesful setup. Next we will install a Database system.

      Database

      Before even thinking about NodeBB, we will install a classical SQL database server for later use, e.g. WordPress or Ghost.
      Lets pick MariaDB. Instead of posting the instructions here, I recommend checking out this link:

      MariaDB - Setting up MariaDB Repositories - MariaDB

      Everything is explained there.

      Now lets get onto NodeBB. Instead of MongoDB, we will skip into the future and go with Redis. Super fast, super simple.

      REDIS_VERSION=4.0.11
      wget http://download.redis.io/releases/redis-${REDIS_VERSION}.tar.gz
      tar xzf redis-${REDIS_VERSION}.tar.gz
      cd redis-${REDIS_VERSION}
      make
      make install
      cd utils
      sh install_server.sh
      

      Follow the on screen instructions and configure the vars to your desired option.
      By default the service name will be redis_6379.

      Assuming your redis.conf is in /etc/redis/redis.conf, you want to make sure its bound to 127.0.0.1.
      If not uncomment the line.
      Also be sure to use a password for authentication. Search for requirepass and replace the default password.
      Please be sure to give this article a quick read as well:

      Redis Security – Redis

      Especially the tipps with "renaming" should be considered to prevent data being manipulated by a 3rd party.

      You are done now.

      PHP

      Instead of old fashioned, RAM hungry PHP-FPM, we will go for HHVM. A drop-in PHP replacement.

      apt-get update
      apt-get install software-properties-common apt-transport-https
      apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xB4112585D386EB94
      add-apt-repository https://dl.hhvm.com/ubuntu
      apt-get update
      apt-get install hhvm
      sudo update-rc.d hhvm defaults
      

      Running HHVM in socket mode gives a little extra performance.
      Replace the entire content of /etc/hhvm/server.ini with this:

      ; php options
      expose_php = 0
      pid = /run/hhvm/pid
      
      ; hhvm specific
      
      # hhvm.server.port = 9000
      hhvm.server.file_socket=/run/hhvm/hhvm.sock
      hhvm.server.type = fastcgi
      hhvm.server.default_document = index.php
      hhvm.log.use_log_file = true
      hhvm.log.file = /var/log/hhvm/error.log
      hhvm.repo.central.path = /run/hhvm/hhvm.hhbc
      

      Restart hhvm:

      service hhvm restart
      

      To get HHVM running with NGINX, check out the configs attached.

      NodeJS

      Installing NodeJS will be even easier.
      All you need to run is:

      NODE_VERSION=8
      curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | sudo -E bash -
      sudo apt-get install -y nodejs
      

      Hardcore.

      NodeBB

      You can now start installing NodeBB after the docs. As seen in my configs, I have got my NodeBB install running in /home/web/mydomainname.tld/.
      Adjust it to wherever you feel comfortable with.

      Ads

      To use ads you need to have Google DFP. Once you entered all your ads and placed the ads on your site, you need to open up the public/src/ajaxify.js.
      Look out for this:

      function renderTemplate(url, tpl_url, data, callback) {
      

      Right before the function is about to close add this little piece of code:

      googletag.pubads().refresh();
      

      Don't forget to rebuild NodeBB.

      Bonus

      Notes

      PageSpeed can either be run by using Memcached or Redis. Since we do not want Redis to fed up, we will go for Memcache:

      apt-get install memcached
      

      Also be sure to raise its memory limit. To achieve this edit /etc/memcached.conf and change the given paramteres to your liking.
      Once completed be sure to restart memcached by using service memcached restart.

      Congrats to your stack.

      Sample NGINX configs

      https://github.com/ReyKoxha/sampleconfig

      posted in Tutorials
      A
      AOKP
    • NodeBB WebView App v3

      After more than 1 year its time to present the third version of the NodeBB WebView App.
      Down below you can see an old screenshot, however not much has changed since then (interface sided).

      NodeBB WebView

      Features

      • OneSignal push notifications
      • Upload/Download support
      • Analytics
      • AdMob
      • Full JavScript support
      • Multiple colors
      • Sidebar support

      Credits

      @CCob

      Download

      Sample APK
      Source code

      Documentation

      GitHub Wiki

      F.A.Q.

      Q.: I fail to compile the app, can you help me?
      A.: Open an issue ticket on GitHub. I will ignore ANY personal messages related to issues with the webview app here on the forum.

      Q.: Can you compile the app for me?
      A.: Not for free.

      Q.: Can I contribute to your code?
      A.: Of course, any contributions are welcome and will be credited!

      posted in NodeBB Plugins
      A
      AOKP
    • RE: The future of Nodebb

      @wojciech-lisik while I do agree that some things aren't done "properly" (the way I would like them to be done), I only can wonder where you got all this blatant bullshit from.

      Reading your previous posts and topics lets me assume that you have either been dropped by your parents while you still were a baby or your IQ is simply as low as the pavement.

      Back to topic though.
      About NodeBB and its future.
      NodeBB is actively developed and the team does their best to keep it up. Just give the GitHub repo a shot and you will see the amount and frequency of commits.

      Personally I think that NodeBB has a few downsides, when it comes to monetization. However, its not impossible (check the tutorial section) to get ads running and let it NodeBB run as any other forum software.

      Regarding plugins I also do agree with you. The ecosystem isn't that good, however, with some basic knowledge you can easily fix broken plugins and adjust them the way you need.

      posted in General Discussion
      A
      AOKP
    • RE: Hosting information?

      @teh_g if you have a problem to dedicate 5 minutes a week to your infrastructure you shouldn't be running a website.

      The reason why the price is so high was explained by @julian to me some while ago. The NodeBB team itself is not directly targeted towards profit and therefore prefers to have a "smaller pool" of customers. They help to bring the project forward, while leaving the team enough spare time to execute their main task and thats to develop.

      Imagine if the hosting would cost just 20$ a month. Many people would use it and then you would have to deal with all these customers and as soon as you hire someone you basically could have saved yourself a lot of stress, because then you make 0 profit at all.

      posted in NodeBB Development
      A
      AOKP
    • RE: PHP doesnt work

      Getting something straight. I told you from the begining that you will have to manage the system on your own.
      However, here a few quick fixes:

      1. You do not have PHP, but HHVM installed.
      2. Make sure each config file has this:
      	# HHVM
      	include /etc/nginx/hhvm.conf;
      
      1. Restart HHVM (in case fix 2 doesn't helps):
      service hhvm restart
      

      P.S.: I only do this for my reputation, not because I feel bad with you.

      posted in General Discussion
      A
      AOKP
    • RE: Zenith - Preview

      To be honest it is not my intention to rework the theme on my own. First of all I have no actual demand for it. I am doing it because I liked the basic idea of the theme. Sure I will see what I can fix, but only if I want to. Yes, I wrote if I want to. I better say how it is before making any promises or giving false hope to someone.

      posted in NodeBB Themes
      A
      AOKP
    • NodeBB and ads - A never ending story

      A few days ago I opened up an issue on GitHub and the forum related to problems with JavaScript and NodeBB.
      To be more specific DFP, and an Anti-AdBlock script. However, @julian closed the issue, with the following argument:

      Showing advertising via DFP is not a core functionality of NodeBB, and so it would be up to whoever implements the script to debug it. There's no plugin for DFP as far as I know, let me know if I am wrong.

      I agree, this is correct. DFP support might not be a core functionality of NodeBB, but what else we can do? Use the non working AdSense plugin for example, which supports only 1 ad network? Despite that something is more than wrong if 2 scripts which work elsewhere just fine do not work with NodeBB.

      However, lets focus on the ads. As mentioned earlier DFP support is not a core feature - I agree on that. But a forum software which has no ad features at all? How can this comply to the goal of the devs? Don't you want your software broadly used? If I would have known that NodeBB would be so ad unfriendly I would have never chosen it. Even though I really do enjoy its UX and performance, just like the spirit and work behind it. Webmasters like me have to look how to pay server bills, ourselves and other stuff.

      I know no forum which has no ads by the way. Except the few product ones like Microsoft or Steam.

      It will be annoying and stressful for the developers to identify the issue, but at the same time it should be rewarding as well as they know that such a fix could mean potentially more users and so a bigger reach for the project. And yes, this fix would allow a 100% perfect integration of ads (a few lines in the Custom HTML is needed as well).

      Not only to mention that this would finally allow a "professional" use case for NodeBB, instead of some LEET kiddies having issues with a shitty hoster.

      posted in General Discussion
      A
      AOKP
    • RE: Zenith - Preview

      Repo now available.
      I also updated the Persona theme trevor based on.
      https://github.com/ReyKoxha/nodebb-theme-zenith-v2

      Bugs left:

      • Cannot open groups
      • Reputation system (up and downvoting)
      • Bookmarks are getting confirmed twice (low priority)
      • First post cannot be edited
      posted in NodeBB Themes
      A
      AOKP
    • RE: Run two nodebb ionsame server

      @kenygamer why is it stupid to run 2 instances on ome server? Unlike you I can afford big enough systems to handle this on my own. Buying a VPS/creating a VM everytime would be foolish instead as it takes more money and time.

      For everyone reading this:
      Already got the hookers and cocaine?

      posted in General Discussion
      A
      AOKP
    • NodeBB and ads - A never ending story (Part 2)

      A long time ago I cried about NodeBB's JavaScript unfriendlieness. Today after updating to the latest stable release I went nuts.
      NodeBB now stopped supporting any DFP code at all. Yes, you have read right. If you are a webmaster who is monetizing its content, you no longer have any possibility to do so. As seen with previous issues (when NodeBB stopped supporting sync rendering or an AdBlocker for example) it now stopped doing anything at all. I know what the developers said the last time, but come on. Are you serious?

      I do not want to call NodeBB shit, but to be honest I am very close before doing so and the worst of all is that I have no chance to go back to the software I initially came from.

      And this time please try to fix the issue! I have put my site like it always was and therefore invite the devs to take a look at it.

      I know that I may sound cocky, especially if you consider this to be an open source project for which I never paid anything. But you should either do a thing right or leave it entirely.

      posted in Technical Support
      A
      AOKP

    Latest posts made by AOKP

    • RE: [nodebb-theme-pewter] Pewter Theme

      @Paladin you saw how old this theme is?

      posted in NodeBB Themes
      A
      AOKP
    • RE: NodeBB Android App

      @Rootzilla be more precise.

      posted in NodeBB Plugins
      A
      AOKP
    • RE: Quick question

      @kirayagami not without SSH.
      Besides that you will also need a MongoDB or Redis database.

      Cutting it short - no.

      posted in General Discussion
      A
      AOKP
    • RE: NodeBB WebView App v3

      @Imgbi as of now I have no time to do that. But I could do this later though.

      posted in NodeBB Plugins
      A
      AOKP
    • RE: min. age to register.

      @gremek that was a spam bot.

      posted in Plugin Requests
      A
      AOKP
    • RE: [nodebb-plugin-import-phpbb] phpBB2 to NodeBB converter

      Giving this a huge bump.
      Currently struggeling to get a phpBB 3.0.X version migrated.

      1. Which plugin shall I use actually? There are so many versions of the phpBB importer available.
        Personally I have tested this and the 3.1 one.

      2. These two returnt the following

      2018-07-07T10:17:11.049Z [7323] - error:  message=Cannot find module '/home/web/nodebb/nodebb-plugin-import-phpbb'
      &
      Cannot find module './build/index.js', stack=Error: Cannot find module '/home/web/nodebb/nodebb-plugin-import-phpbb'
      &
      Cannot find module './build/index.js'
          at nodebbRequire (/home/web/nodebb/node_modules/nodebb-plugin-require/index.js:72:10)
          at safeRequire (/home/web/nodebb/node_modules/nodebb-plugin-import/server/exporter/index.js:41:9)
          at searchModulesCache (/home/web/nodebb/node_modules/nodebb-plugin-import/server/exporter/index.js:24:13)
          at reloadModule (/home/web/nodebb/node_modules/nodebb-plugin-import/server/exporter/index.js:47:3)
          at /home/web/nodebb/node_modules/nodebb-plugin-import/server/exporter/index.js:556:24
          at cb (/home/web/nodebb/node_modules/npm/lib/install.js:253:18)
          at /home/web/nodebb/node_modules/npm/lib/install.js:351:7
          at LOOP (/home/web/nodebb/node_modules/npm/node_modules/slide/lib/chain.js:7:26)
          at /home/web/nodebb/node_modules/npm/node_modules/slide/lib/chain.js:18:7
          at tryCatcher (/home/web/nodebb/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
          at Promise.successAdapter [as _fulfillmentHandler0] (/home/web/nodebb/node_modules/npm/node_modules/bluebird/js/release/nodeify.js:22:30)
          at Promise._settlePromise (/home/web/nodebb/node_modules/npm/node_modules/bluebird/js/release/promise.js:566:21)
          at Promise._settlePromise0 (/home/web/nodebb/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
          at Promise._settlePromises (/home/web/nodebb/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
          at Async._drainQueue (/home/web/nodebb/node_modules/npm/node_modules/bluebird/js/release/async.js:133:16)
          at Async._drainQueues (/home/web/nodebb/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10)
          at Immediate.Async.drainQueues [as _onImmediate] (/home/web/nodebb/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
          at runCallback (timers.js:810:20)
          at tryOnImmediate (timers.js:768:5)
          at processImmediate [as _immediateCallback] (timers.js:745:5)
      

      It seems like both versions are heavily outdated. Would be great, if I could be spared a conversion from phpBB to SMF to NodeBB.

      1. Shall I use an older version of NodeBB maybe to perform the import?
        What was the last one known to be working with this plugin? 0.6 or 0.7?
      posted in NodeBB Plugins
      A
      AOKP
    • RE: NodeBB - Full Stack Setup

      @omega I actually meant "according to the docs".
      I am sorry for my crappy English as I am not a native speaker.

      @Shard ok.

      posted in Tutorials
      A
      AOKP
    • RE: Animated profiles don’t work!

      @whimpers I'd recommend opening a ticket on GitHub instead.

      posted in General Discussion
      A
      AOKP
    • RE: NodeBB WebView App v3

      @exodo might do this later. Thanks for the idea.

      Edit:
      Added.

      posted in NodeBB Plugins
      A
      AOKP
    • RE: NodeBB WebView App v3

      @yapne how about checking the first post.

      posted in NodeBB Plugins
      A
      AOKP