By using a reverse proxy... Like Nginx
Per0x
Posts
-
Issues with Nginx and Domain -
Issues with Nginx and Domain@Dan-Reyes Looks like it's yours according to your domain.
-
Issues with Nginx and Domain@Dan-Reyes Try with http://66.96.162.138:4567 as url in config.json
-
Issues with Nginx and Domain@Dan-Reyes And I advised you to check your redirection in your reverse proxy, which you didn't do because sampfive.me seems to be already redirected.
-
Issues with Nginx and Domain@Dan-Reyes Again, it's in the documentation. Read it carefully.
If it's https://sampfive.me then enter this.
But @PitaJ advised you to first test with IP before adding your domain. This parameter can be modified in config.json
-
Issues with Nginx and Domain@Dan-Reyes
In the documentation, it says that ./nodebb commands should not be run with root access... -
Issues with Nginx and Domain@Dan-Reyes said in Issues with Nginx and Domain:
what do you mean about sites-enabled thingy?
my mistake I meant sites-available.
Anyway, when you install nodebb, you have to set your domain name as url (you can change it in config.json).
And you have to make sure your reverse proxy (nginx) is not in conflict with others redirections as it seems. -
Issues with Nginx and Domain@Dan-Reyes You probably have another reverse proxy running or your not working on "sites-available".
And when you installed nodebb what was the domain you put in the wizard ? -
Issues with Nginx and DomainOh! There's already something to forum.sampfive.me
-
Issues with Nginx and Domain@Dan-Reyes I would create a sub-domain like forum.sampfive.me
nginx.conf
server_name forum.sampfive.me;
New DNS record, and new SSL certificate.
-
Issues with Nginx and Domain@Dan-Reyes The fact that it says "This site is under development" means it already redirect to something on your server and not to nodeBB service.
-
Issues with Nginx and DomainAre you sure NodeBB is up and listening on 4567 ?
I would check Firewall, open 80/443 and also listen on 443 in nginx.conf
Also, make sure your domain not already in use. Uses a sub-domain if it does. -
Issues with Nginx and DomainIt might also help: https://dnschecker.org/
-
Guide to install NodeBB on Docker with Synology NAS (DSM)@gotwf Thanks!
Personally, I can't do without Docker anymore. Whether in production or for testing.
Using it with synology DSM, that's yet another story (no docker-composer for eg), but I think it's a good start for beginners. -
Guide to install NodeBB on Docker with Synology NAS (DSM)
Here is a guide for those who want to install a small NodeBB forum on their Synology NAS using Docker.
This guide is designed for those with no knowledge in servers management in CLI (command line interface), all the installation described here can be carried out in the DSM interface from Synology.
For larger installations a Dedicated Server / VPS or hosting services like NodeBB Instant Hosting is probably preferable but for a small community or for testing purposes, this solution is functional.
Prerequisites:
-
A static IP address from your ISP or a Dynamic DNS configured from the NAS. (I would not detail this part, I consider that you already have it)
-
A Domain name that redirects to your NAS. (From Synology DDNS, GoDaddy, Bluehost, OVH, etc...)
-
Ports 80/443 open in your router and that redirect to your NAS
-
A compatible Synology NAS with DSM 6.2.x or later (see list below)
Applied Models:
20 series: FS6400, FS3400, RS820RP+, RS820+, DS620slim, SA3600, SA3400, SA3200D 19 series: RS1619xs+, RS1219+, DS2419+, DS1819+, DS1019+, DVA3219 18 series: FS1018, RS3618xs, RS2818RP+, RS2418RP+, RS2418+, RS818RP+, RS818+, DS3018xs, DS1618+, DS918+, DS718+, DS218+ 17 series: FS3017, FS2017, RS18017xs+, RS4017xs+, RS3617xs+, RS3617RPxs, RS3617xs, DS3617xs, DS1817+, DS1517+ 16 series: RS18016xs+, RS2416RP+, RS2416+, DS916+, DS716+, DS716+II, DS216+, DS216+II 15 series: RS815RP+, RS815+, RC18015xs+, DS3615xs, DS2415+, DS1815+, DS1515+, DS415+ 14 series: RS3614xs+, RS3614RPxs, RS3614xs, RS2414RP+, RS2414+, RS814RP+, RS814+ 13 series: RS10613xs+, RS3413xs+, DS2413+, DS1813+, DS1513+, DS713+ 12 series: RS3412RPxs, RS3412xs, RS2212RP+, RS2212+, RS812RP+, RS812+, DS3612xs, DS1812+, DS1512+, DS712+, DS412+ 11 series: RS3411RPxs, RS3411xs, RS2211RP+, RS2211+, DS3611xs, DS2411+, DS1511+, DS411+, DS411+II *10 series: RS810RP+, RS810+, DS1010+, DS710+
First Step: Docker and Database
(We choose a redis database here given that we want to set up a fast small forum)
- Install Docker on your Synology from the Package Center
- Go in Registry and search for Redis. Then we download the latest bitnamli/redis Image by double-clicking on it. We're not using official Redis image for ease because Bitnami's image allows us to add environment variables that will be useful in the Synology GUI (the redis password in our case).
- Once the image is downloaded, you can found it in the Image tab. Then launch it.
- Name the container as you want (redis-nodebb in my case) and click Advanced Settings
- Check Enable auto-restart
- Go to Port Settings and set local port to 6379.
- Go to Environment and add the variable REDIS_PASSWORD with a solid password by pressing the "+" button. (do not copy mypassword in my image example).
- Click Apply and you should see your container starting in Container tab
Second Step: NodeBB
- Return in Registry tab and search and download latest nodebb/docker image
- Go to Image tab. Launch nodebb/docker. Name it as you want, then go to Advanced Settings
- Enable auto-restart
- In Port Settings set local port to 4567 then Apply then Next and finally Apply again.
- You should now see your two containers with redis and nodebb started in Container tab
-
Configure NodeBB installer on http://your-nas-ip:4567 in your favorite browser (your-nas-ip should be the same from Synology DSM access. Something like 192.168.X.X)
-
Note that in "Web address" you must indicate the external url of your forum with your own domain name with HTTPS. I don't detail in this tutorial how to buy a domain name, but if you only want to use nodebb locally, just leave the default url.
-
Fill in your login details for the administrator.
-
Fill in the information for the database as shown below
-
Click Install
-
Third Step: Persistent Storage
Datas in Docker containers are not persistent by default. However, it is essential for a forum to have control over the data and be able to perform backups and restores. This is why Docker allows us to mount volumes to associate a folder on your NAS with folders inside the containers.
- In File Station > docker folder, create a new folder nodebb.
You should have something like: /volume1/docker/nodebb
Note: You have to identify the absolute path of your folder depending on your volumes on your NAS. In File Station, Right click on the folder > Properties > Location. For me, it's starting with /volume1.
- Go to Control Panel > Task Scheduler and create a new task script
- In General Settings let Root user and in Task Settings copy this example in Run command
docker cp nodebb-docker:/usr/src/app/public/uploads /volume1/docker/nodebb docker cp redis-nodebb:/bitnami/redis/data /volume1/docker/nodebb
if you've named your containers differently than I have, you have to change: nodebb-docker:/ and redis-nodebb:/ according to yours.
- Click OK, then select your script and Run it
- You should now have two new folders in /docker/nodebb. One /data and one /uploads. Check that they are present and not empty. You can then remove the script you created previously if it succeeded.
- Return in Docker > Container tab, and turn off the Redis and NodeBB containers
- Click Edit on your nodebb container turned off, and go to Volume tab > Add Folder
- Select: /docker/nodebb/uploads on your NAS, and mount it to: /usr/src/app/public/uploads. Then Apply
- Do the same procedure to your redis container by mounting /docker/nodebb/data to /bitnami/redis/data
- Restart the two containers and check that there is no fail. (if container can't start, there is a problem in the mounted folders or permissions)
Fourth Step: SSL and Reverse proxy
Your forum should already be operational at this stage, but we now want to be able to access it from the outside (internet) with a domain name and an SSL certificate
(the green padlock in the address bar of your browser).
- Go to Control Panel > Security > Certificate. And Click Add
- Add a new certificate with method Get a Certificate from Let's Encrypt (you have to open and redirect port 80/443 to your Synology to make it work)
- Set your domain name for your forum and your personnal email address.
- If the request is accepted, your certificate should appear here
- Go to Application Portal > Reverse proxy > Create
- Name your Rule. Set the hostname with your domain name, the same from your certificate. Fill port 443 and Destination.
- In Custom Header, select Create > Websocket. Then click OK to valid the Rule.
- Go to Control panel > Security > Certificate. And click Configure. You have to associate the NodeBB rule you just created in the reverse proxy with the certificate you created earlier. Then validate by clicking on OK.
- NodeBB should now be up and running and accessible locally at http://your-nas-IP:4567 as well as from the internet at https://forum.yourdomainname.com.
I hope this tutorial will help beginners. I think modern NAS can help everyone to get started for those who find it complicated to install NodeBB on their own. It's an easier introduction for them IMO compared to an installation from scratch on a CLI server.
If you have any questions or if I have made any mistakes in this tutorial, please let me know so that I can correct them.
-
-
Choose to install npm packages at startup on Docker.Yes I'm referring to the Dockerfile. I'm no expert with Docker either, but I must admit that it's extremely handy for creating forums on the fly with different versions at the same time, and saves a lot of time.
If you're not focused on this tool I completely understand and appreciate you already providing up-to-date docker images, so I'll try to see what I can do myself and share it if it works well. This is possible by manually modifying the dockerfile but I think it's also possible in a more elegant way and easy to use, with env variables
-
Choose to install npm packages at startup on Docker.On docker image, we might choose wich npm packages (plugins, themes, etc) we want to install during the first build (by environment variable for instance).
It would prevent restore issues when theme or plugins are not present on the new container and would speed up deployment time of docker containers for upgrades and restore.For example: I prepared the backup of my database, and I mounted the /uploads volumes and the config.json file but my docker container fails because it can't find the themes and displays errors for missing plugins.
But if upstream, I tell the docker container to install the right npm packages associated on my nodebb database, my nodebb forum is restored immediately. -
nodebb-plugin-composer-quill: WYSIWYG alternative to redactor@julian I do an update and what do I see? Fonts!
Nice! You were fast.
Thank you. -
nodebb-plugin-composer-quill: WYSIWYG alternative to redactor@julian I think so. I installed everything yesterday, under docker (pull tag latest on saturday 23rd may) and ran "npm i nodebb-plugin-composer-quill" the same day in version 1.2.1. However I see that a new docker image (latest) was added 7 hours ago on docker hub. I just need to point out that I've restored a redis backup for the database.
-
nodebb-plugin-composer-quill: WYSIWYG alternative to redactorI did notice a few bugs, but they are not very annoying though. (NodeBB docker: latest v1.13.3 / composer-quill: 1.2.1) Edit: composer-quill v1.2.8
-
When editing an existing post, if I undo the modification it suggests deleting the post instead of proposing "cancel" (it doesn't delete it) -
The chat mode doesn't work anymore (I wasn't using it, it's always disabled on my instance). -
Sometimes the emoji button does not appear for a new topic.
-
When the emoji button appears, emojis can only be added by drag and drop in the text. (I don't know if this is the normal behavior)
-
The hypertext urls links already present in posts before quill migration are no longer hypertext links. (not really a bug since it comes from Quill, I assume.)
-
I can't undo full screen mode without leaving the composer.
-
The text that proposes to write tags of a new topic is truncated in others languages.
-