How would I be able to run a second instance of Rocket Chat (Chat+) for a second site on same server? Would I need to create a second run.sh file with variables for second site, or do I need to completely setup another Rocket Chat server?
How would I be able to run a second instance of Rocket Chat (Chat+) for a second site on same server? Would I need to create a second run.sh file with variables for second site, or do I need to completely setup another Rocket Chat server? caredesign.net |
Very easy. Just change these values:
export ROOT_URL=http://your-domain.com:3000/ export MONGO_URL=mongodb://localhost:27017/rocketchat export PORT=3000
Before initializing the new instance for the first time.
Edit: To be clear, this requires a second copy under its own directory (like /opt/chat2). BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
thanks bud - will try it when i get home. caredesign.net |
oh, another question. I am going to be working on a project that will be 3 or 4 separate sites. Would I do a second and third "Account" (in Chat+) for the other Dolphin sites? Would I need to make any changes to any code for the Chat+? caredesign.net |
oh, another question. I am going to be working on a project that will be 3 or 4 separate sites. Would I do a second and third "Account" (in Chat+) for the other Dolphin sites? Would I need to make any changes to any code for the Chat+? For 3/4 sites, you'd create 3/4 instances of Chat+. BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
sorry - let me clarify - for this particular project - all members of all 3 0r 4 sites will be on the same chat. caredesign.net |
sorry - let me clarify - for this particular project - all members of all 3 0r 4 sites will be on the same chat. This might work, but I can see issues if users sign up with the same details on separate sites. One way to work around this would be to have all accounts made on one site, and then use Dolphin Connect to login and create accounts on all the other sites. Then users would login with the main account credentials for Chat+. BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
sorry for the delay - had to drive home from work. OK, maybe I should give a bit more info. First off I am looking at 3 separate sites to start. All 3 sites are mental health related, but each site deals with different aspects regarding mental health. I want to have 1 "community" site where users from all 3 sites can chat in one place. At first thought - if you sign up on site A - you would not sign up on site B or C, and vice versa. caredesign.net |
sorry for the delay - had to drive home from work. OK, maybe I should give a bit more info. First off I am looking at 3 separate sites to start. All 3 sites are mental health related, but each site deals with different aspects regarding mental health. I want to have 1 "community" site where users from all 3 sites can chat in one place. At first thought - if you sign up on site A - you would not sign up on site B or C, and vice versa. If the accounts are made on Site A and then used on Site B and Site C, then it shouldn't be a problem to have all three use the same Chat+ instance - since it's connected via Site A, where all the accounts are. BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
OK, not sure if I am explaining myself well. But I do not want all users having memberships on multiple sites. I jsut want them to be able to log into 1 single chat even though they have accounts on different Dolphin sites.
After spending some time on this - I have gotten it to work. So, for anyone else wondering how to get multiple dolphin sites on one chat, this is what I Have:
Site 1 is set up as normal.
For site 2 and on, In the OAuth2 module - Title = whatever you want URL = url to chat
In the Chat+ Admin - Accounts section, Click Add Custom OAuth (all the way at the bottom on the right)
For your new OAuth Enable = Yes Url = url of site (site 2 and such) Token path = /m/oauth2/token/ Identity Path = /m/oauth2/api/me/ Authorize path = /m/oauth2/auth/ Id = Client Key from Site 2 OAuth module Secret = Client Secret from Site 2 OAuth module The remaining fields you can label as you like.
After saving, go to Chat+ ADmin Settings - General section and click Restart Server (this does not actually restart the server, but will stop it.) Open up an SSH connection and navigate to where you placed the run.sh file for the Chat+ server and run ./run.sh - this will start the server and is dependent on the fact that you should have followed all of the original instructions to get Site 1 working properly.
To test - I have 2 sites: cvp71.com and caredesign.org. These sites are both on the same server, but in 2 different directories. caredesign.net |
OK, so I tried this using port 3100 as well as 3000 and rocketchat2 in a completely folder /opt2 - not working for me. I did open firewall ports Very easy. Just change these values:
export ROOT_URL=http://your-domain.com:3000/ export MONGO_URL=mongodb://localhost:27017/rocketchat export PORT=3000
Before initializing the new instance for the first time.
Edit: To be clear, this requires a second copy under its own directory (like /opt/chat2).
caredesign.net |
OK, so I tried this using port 3100 as well as 3000 and rocketchat2 in a completely folder /opt2 - not working for me. I did open firewall ports Did you also change the database name in the MONGO_URL line? 'rocketchat' needs to be renamed to something else. BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
yes - called it rocketchat2 caredesign.net |
#!/bin/sh
with this error: Error: failed to connect to [localhost:27018] caredesign.net |
ok, i have no clue what I did, but it is working now. caredesign.net |
After wiping and reinstalling CentOs 7 and RocketChat again, I have found out what my problem was. For some reason, I have to manually start the mongodb server - and start a new mongodb instance (specifying port) for each chat server I want to run. Currently have 3 running at once on the same server. caredesign.net |
After wiping and reinstalling CentOs 7 and RocketChat again, I have found out what my problem was. For some reason, I have to manually start the mongodb server - and start a new mongodb instance (specifying port) for each chat server I want to run. Currently have 3 running at once on the same server. I've setup a few multiple instances of both Chat+ and RocketChat on servers, and I've never needed to run more than one instance of MongoDB. You should only need to specify a new database name (as well as the RocketChat port and URL). As for starting mongod, this is indeed needed after a new install, but you can use systemctl to enable it to run on boot. BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
systemctl is not working for me for some reason when attempting to get mongodb to run at startup caredesign.net |
did another fresh install and same results - i get an error that cant connect to port for second instance - but it seems this is because mongodb is not running on specified port - thus i have to run a new mongodb instance specifying the new port. caredesign.net |