-
Notifications
You must be signed in to change notification settings - Fork 0
Deploy Rocket.Chat without docker
Please only use this guide if you are comfortable with deploying applications to Ubuntu using the command line.
There are easier deployment options such as:
- Sandstorm, you can have a server for your family and friends running in 4 seconds.
- Heroku one click deploy, you can run and operate a small server instance on their FREE (or low cost) plans.
Another option, you can request for a beta of Rocket.Chat hosting service - you can have a server up and running, professionally managed, without installations, configuration, maintenance and management head-aches. Just send an email to [email protected] and request for "Hosting beta".
This guide explains how to deploy your own Rocket.Chat instance to a Ubuntu Linux machine using the command line.
Node.js
MongoDB
curl
graphicsmagick
# SYSTEM CONFIGURATION
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
sudo apt-get update
sudo apt-get install -y npm mongodb-org curl graphicsmagick
# Install a tool to let us change the node version.
sudo npm install -g n
# Meteor needs at least this version of node to work.
sudo n 0.10.40
Download Stable version of Rocket.Chat
curl -O https://s3.amazonaws.com/rocketchatbuild/rocket.chat-master.tgz
OR if you want the bleeding edge executable
Note: Things may not be fully functional. Use at your own risk
curl -O https://s3.amazonaws.com/rocketchatbuild/rocket.chat-develop.tgz
then (replace xxxx with your executable's name)
tar zxvf rocket.chat-xxxxxx.tgz
this will expand everything into a bundle
directory. Next, set environment variables and run the server:
mv bundle Rocket.Chat
cd Rocket.Chat/programs/server
npm install
cd ../..
export ROOT_URL=http://your-host-name.com-as-accessed-from-internet:3000/
export MONGO_URL=mongodb://localhost:27017/rocketchat
export PORT=3000
node main.js
You MUST set the ROOT_URL
environment variable to the Internet accessible URL to your server.
This will start the server running.
If you would like to start Rocket.Chat on an alternative port, use the environment variable PORT.
Note: If using port 80 you will have to run as root. This is because it is a privileged port.
If you choose to do this. You need to do something like this:
sudo ROOT_URL=http://your-host-name.com-as-accessed-from-internet/ \
MONGO_URL=mongodb://localhost:27017/rocketchat \
PORT=80 \
node main.js
# Or...
sudo su
export ROOT_URL=http://your-host-name.com-as-accessed-from-internet/
export MONGO_URL=mongodb://localhost:27017/rocketchat
export PORT=80
node main.js
NOTE: If you need to keep the server up and running across reboots, use a task manager such as forever, PM2 or write your own shell management scripts.
Rocket.Chat uses the MongoDB replica set OPTIONALLY to improve performance via Meteor Oplog tailing. To configure the replica set:
Append replSet=001-rs
into mongod.conf
file:
$ echo replSet=001-rs >> /etc/mongod.conf
And restart Mongo:
$ service mongod restart
$ mongo
Using YAML syntax add this section into mongod.conf
:
replication:
replSetName: "001-rs"
Restart Mongo:
$ service mongod restart
$ mongo
Start the MongoDB shell and initiate the replica set:
$ mongo
> rs.initiate()
The result should look like this
{
"info2" : "no configuration explicitly specified -- making one",
"me" : "localhost:27017",
"info" : "Config now saved locally. Should come online in about a minute.",
"ok" : 1
}
After a few seconds, you should see your prompt turn into 001-rs:PRIMARY>
, this indicates the replica set is being used. Type exit
to get back to your regular shell.
After you configured replica set, you MUST add the following environment variable before restarting Rocket.Chat server for it to take effect:
MONGO_OPLOG_URL=mongodb://localhost:27017/local
Rocket.Chat is installed and needs to be configured. Follow these guides to properly configure everything your instance needs:
In summary do the following:
- Make sure server is down
- Change into the directory where you have the
Rocket.Chat
directory - remove the old server executables
rm -rf Rocket.Chat
- Repeat Installation step
- Mobile app for iPhones, iPads, iPod Touch
- Firefox OS native app
- Using Face to face video conference (aka webrtc)
- Remote Video Monitoring
- LDAP Authentication
- Creating the First Admin
- How to Build Rocket.Chat for Android
- Build the Android Cordova Web App and connect to your own Rocket.Chat Server