I wanted to have an IRC bouncer for free, but I didn't trust the many free IRC bouncer services available out there. After some search, I discovered Shout, a Node.js IRC client for the browser. Shout has some really interesting features; among them, there were two I was particularly interested in:

  • Always connected. I could be online 24/7.
  • Cross platform. I could connect to my IRC client using any platform where a web browser is available.

On top of that, it looks pretty nifty and it's themeable via CSS.

Now I needed some kind of service that kept my Shout instance running 24/7 and allowed me to connect to it. Oh, and I wanted this for free.

This is where OpenShift comes into play. Their free account should be enough for this. Also, since they provide SSL, it should be possible to connect to Shout securely. The question then is: How do I deploy my Shout instance to OpenShift? (AKA, how do I get a secure, always-online IRC bouncer for free?)

  1. Create an OpenShift Free account. The most basic account should suffice for our purposes.
  2. Log in to your OpenShift account.
  3. Create a new Node.js application.
    1. Go to the "Add Application" button in the "Applications" tab in OpenShift's console.
    2. Choose the Node.js cartridge from "Other types".
    3. Fill in appropriate fields, including the Public URL field. This URL will be the one you'll have to point your browser to when you wanted to connect to Shout.
  4. Go to the "Applications" tab, and select your newly created application.
  5. Copy the URL under the "Source Code" title. This is the URL you'll clone from. OpenShift is based on Git.
  6. Go to a terminal and run git clone <URL>, where <URL> is the URL you just copied from the page. This will clone an already cooked repository for your application.
  7. Get rid of all the files in that repository running rm -rf . while in the repository's directory. While the files there are a good starting point for your own application, we're not going to use them, since all we need is in Shout's repository.
  8. Clone Shout's repository somewhere else in your filesystem, with git clone https://github.com/erming/shout.
  9. From your application's directory, run git pull <Shout's dir>. This should populate your application's repository with all the files in Shout's repository.
  10. Change the package.json file. Make the start member under the scripts attribute look like this:

    "start": "node index --private --home $OPENSHIFT_DATA_DIR/shout/ --host $OPENSHIFT_NODEJS_IP --port $OPENSHIFT_NODEJS_PORT",
  11. Tell OpenShift it has to use npm start to run our application. For this, while in your application's directory, run mkdir -p .openshift/markers and then run touch .openshift/markers/use_npm.

  12. Commit with all the changes, and then do a git push origin master.

After deployment finishes, you should be able to go to your application's Public URL and see Shout right there.

Important: If you want to be on the safe side, access your Public URL with https rather than http. Changing the protocol prefix should be enough for this to work, since OpenShift provides an *.rhcloud.com wildcard certificate that allows you to connect securely using your application's OpenShift-provided hostname URL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.