MENU:   HOME  ·  SERVER  ·  APPLICATION  ·  CONSOLE


Vimeo Video Tutorials ( HD )      Twitter Follow Updates @socketbug_dev      Support Support & Feature Requests


Socketbug Logo

License Socketbug is licensed under the LGPL v3 license.

Socketbug Server Installation Video

Vimeo Watch our Video Tutorial on How to do a Socketbug Server Installation

Then you can follow along below ;)

Installing Socketbug - The Server

Please Note: We are assuming with the following instructions, that you want to build a local copy of the Socketbug Server. If this is the case, then we are also going to assume that you have working knowledge of how to use git. Git will be used for almost every part of setting up the Socketbug server. If you need more information on how to use git, please check out the following sites for your Operating System:

#1 Build and Install Node.js

FOLLOW ORIGINAL INSTRUCTIONS FOUND HERE, OR…

We preferred the following setup for our Linux installation:

First, change to a temp directory where you can download the source code for building. We like /usr/local/src as it is available on most Unix based machines. So lets make a temp folder here:

cd /usr/local/src
sudo mkdir /usr/local/src/socketbug
sudo chmod 777 /usr/local/src/socketbug
cd /usr/local/src/socketbug

Now that we are in the temp folder, download and install Node.js

git clone --depth 1 https://github.com/joyent/node.git
cd node
git checkout origin/v0.4
export JOBS=2
sudo ./configure --prefix=/usr/local
sudo make
sudo make install

Then Install the Node.js Package Manager (NPM):

curl http://npmjs.org/install.sh | sudo sh

Let’s verify that everything was installed correctly before removing the Node.js source code folder. Run the following commands to verify the installations were successful:

which node

This should return a path to where Node.js is installed. If it returns nothing, then Node.js was not installed correctly. Now verify the NPM installed correctly:

which npm

This should also return a path to where NPM is installed. If it returns nothing, then NPM was not installed correctly.

Once you have verified that everything is installed correctly, you can remove the source code we downloaded to install everything:

cd /usr/local/src/socketbug
sudo rm -fr /usr/local/src/socketbug/node

#2 Setup Socketbug to use Node.js

Pick a place on your server where you want to install the Socketbug Server. For this writeup, we will use /usr/local/socketbug. You can use whatever directory you wish.

sudo mkdir /usr/local/socketbug/
sudo chmod 777 /usr/local/socketbug

#3 Download Socketbug

For the Socketbug Server, we really only need a few files, so let’s change back to our temp directory before downloading Socketbug.

cd /usr/local/src/socketbug

If are using git, you can just run the following command from the directory you already setup for Socketbug:

git clone https://github.com/manifestinteractive/socketbug.git .

Notice the ‘.’ at the end of the git command. This will check it out in your current directory, rather than creating a new directory for you.

Now you can copy the server files over into where you will run your Socketbug server.

cp -R /usr/local/src/socketbug/server/* /usr/local/socketbug

If you are going to use Socketbug as a service, you will need to set permissions to the log folder:

sudo chmod 777 /usr/local/socketbug/logs

#4 Install Socket.IO Packages into Socketbug Server Folder

Change into the Socketbug Server directory

cd /usr/local/socketbug

While still in the /usr/local/socketbug directory, run the following commands

Install Node.js Package socket.io:

sudo npm install socket.io

Install Node.js Package forever ( to run Socketbug as a service ):

sudo npm install forever -g

You will need this if you want to use our bash scripts.

#5 Configure Socketbug Server

Before you can start Socketbug you will need to open the server file and make a few changes:

nano socketbug_server.js

Look for var _socketbug to find the configuration variable for the Socketbug Server.

Here is a breakdown of settings:

#6 Start Socketbug Server

If you would prefer to just run Socketbug in your Terminal Window and not as a Service:

node socketbug_server.js

If you would like to run it as a service, you can just use the supplied BASH files in the Socketbug Server directory.