Rocket.Chat Windows Installation Guide
How to install Rocket.Chat on Windows Server 2012 R2
The following guide will step through the various steps for installing Rocket.Chat on Windows Server 2012 R2.
Important: Production deployment using any client versions of Windows, such as Windows 7, 8, or 10 is not supported. However, beta deployment for Windows 10 Pro (or Enterprise or Education) version is available via Docker for Windows see Installing on Windows 10 Pro 64bit with Docker for Windows.
Mobile clients (iOS and Android) are currently not supported using this method of deployment. However, Windows 10 Pro 64bits with Docker for Windows based deployment should support mobile clients.
Note: The steps will include all dependencies. If a particular dependency has already been installed, please skip to any relevant configuration section.
Binary Dependencies
To start, go to Control Panel -> Programs and Features
and uninstall each of the following (if present):
- Microsoft Visual C++ 2010 x64 Redistributable
- Microsoft Visual C++ 2010 x86 Redistributable
Then, download and install each of the following in order:
- Python 2.7.3 (if you have Python 3.x already installed, just leave it, both can coexist)
- Visual C++ 2010 Express or Visual Studio 2010
- Windows SDK 7.1
- Visual Studio 2010 SP1
- Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1
- GraphicsMagick
- Ghostscript (Optional for PDF rendering)
MongoDB
- Download MongoDB. (Note: This can be done on a separate computer)
- Run the installer and choose
Custom
- Click the
Browse
button to select desired install path, such asC:\MongoDB
- Continue through the rest of the installer.
-
Now open NotePad and enter the following, replacing [Data Path] with where the database will be stored, such as
C:\MongoDB\data
systemLog: destination: file path: [Data Path]\logs\mongod.log storage: dbPath: [Data Path]\data replication: replSetName: rs1
- Save the file as
[Installation Path]\mongod.cfg
where [Installation Path] is the location you installed Mongo - Open the Command Prompt by pressing
Windows Key + R
and then enteringcmd
, right click on Command Prompt and selectRun as administrator
- Now enter the following:
> mkdir [Data Path]
> cd [Data Path]
> mkdir [Data Path]\db
> mkdir [Data Path]\logs
> cd [Installation Path]\bin
> mongod.exe --config "[Installation Path]\mongod.cfg" --install
> net start MongoDB
> mongo.exe
> rs.initiate()
> exit
Note: Do not include the >
Rocket.Chat files
- Download the latest Rocket.Chat Windows Release from the Rocket.Chat releases page
- Using an archive utility such as 7zip or tar for Windows, extract the tar.gz file
- Place the files in the desired install path, such as
C:\RocketChat
Node.js
Rocket.Chat is built on top of Node.js v4.8.4. So we need to install this first.
- Download Node.js v4.8.4
- Run the installer with all default option.
Node Packages
- Open the Windows SDK 7.1 Command Prompt by pressing Start, typing its name, and clicking on it in the search results (Note: It needs to be the SDK Command Prompt)
- Now enter the following, replacing:
- [Installation Path] with the location you placed the Rocket.Chat files
- [Port to Use] with the port for the Rocket.Chat server to use, such as
3000
- [Rocket.Chat URL] with the URL you will use for Rocket.Chat, such as
rocketchat.example.com
- [Address to MongoDB] with the IP Address of your MongoDB. (NOTE: If you didn’t install Mongo on another computer, use
localhost
) - [MongoDB Database] with the name of the database you would like to use, such as
rocketchat
> SetEnv /x86
> cd [Installation Path]
> npm install nave -g
> npm install node-windows
> npm config set python /Python27/python.exe --global
> npm config set msvs_version 2010 --global
> set PORT=[Port to Use]
> set ROOT_URL=[Rocket.Chat URL]
> set MONGO_URL=mongodb://[Address to Mongo]:27017/[MongoDB Database]
> set MONGO_OPLOG_URL=mongodb://[Address to Mongo]:27017/local
> set SCRIPT_PATH=[Installation Path]\main.js
> cd programs\server
> npm install
> cd ../..
> node rocket.service.js install
> net start Rocket.Chat
Note: If missing, rocket.service.js can be found here
Note: Do not include the >
Verifying the Install
- View the installed services by pressing
Windows Key + R
and then enteringservices.msc
- Find
Rocket.Chat
in the list. Its status should beRunning
- Open a browser and, in the address bar, enter
http://localhost:[Port Used]
- Rocket.Chat should load.
Mobile Support
In order to use Rocket.Chat on mobile devices, you must also configure your installation to support SSL with a valid certificate.
IIS Configuration (Optional)
The following steps will detail integrating Rocket.Chat with IIS.
Get UrlRewrite and ARR
- Open IIS, Click on your server, and then click on
Get New Web Platform Components
in the right hand menu - Install the Web Platform Installer if prompted
- Once open, search for
Routing
in the upper right search box - Click on the
Add
button for Application Request Routing 3.0 and thenInstall
- Once ARR and UrlRewrite are installed, close and reopen IIS
Adding the SSL Certificate
- Click on your server in the left menu and then click on
Server Certificates
- In the right hand menu, click on
Import...
- Find your SSL Certificate and enter your password
- Click
Ok
Setting up the Rocket.Chat site
- Create a new Web Site and bind it to the [Rocket.Chat Url] previously specified. NOTE: If you plan on using the Rocket.Chat mobile apps, you must use HTTPS. HTTP is optional only for PCs
- For the physical path, point it to an empty folder in your webroot. (Note: There will be no default document here, just the web.config.)
- Press
Ok
- Select the new Rocket.Chat site and click on
Url Rewrite
- In the upper right hand menu, select
Add Rule(s)...
and thenReverse Proxy
- Enter
http://localhost:[Port Used]
in the top box and hitOk
(Note: This must remain HTTP even if you are using HTTPS)
Troubleshooting
- If the Rocket.Chat service isn’t running, check the Event Viewer under
Windows Logs\Application
for errors from the Rocket.Chat service. - If the page didn’t load, check the log files in [Data Path]\logs for clues.
- If that doesn’t help, or if you had any other problems during the process, try searching our GitHub Issues
- If you are still having problems, visit the #support channel and we’ll be happy to help.