Self-hosted chat app for small teams
Let’s Chat is a pretty cool piece of software (no, it’s actually fucking awesome). The ability to run the app on Heroku just makes it that much nicer.
Setting it up on Heroku is quite easy. You can see it running on Heroku at http://yell.longren.io. There’s no admin user, so anyone can register and create their own rooms.
Files can also be posted to rooms, but an Amazon S3 bucket is required for that feature to work. Although, other file storage options are being looked into. Another neat feature is automatic transcript creation. There’s a transcript screenshot in the gallery below.
Prepare Let’s Chat
Open up a terminal and clone the Let’s Chat Git repository:
git clone https://github.com/sdelements/lets-chat.git
That will make a local clone of Let’s Chat in the
lets-chat folder. Go into that folder, with cd lets-chat.
1. Copy settings.js.sample to settings.js, like so:
cp settings.js.sample settings.js
settings.js from the
.gitignore file. Just open
.gitignore in your favorite text editor and remove the line containing
3. Make any changes to
settings.js that you’d like. This is where you’d specify your Amazon S3 credentials to allow storing files in a bucket.
Deploy To Heroku
We’ll be using
heroku-app-name as the name of our Heroku app. So you’ll obviously need to change instances of
heroku-app-name in the commands that follow.
1. Add a Heroku remote to your newly cloned repository:
heroku git:remote -a heroku-app-name
2. Add the MongoLab Heroku addon:
heroku addons:add mongolab -a heroku-app-name
3. Get the Mongo URL. Executing the following will give you the Mongo URL, which you’ll need below.
heroku config:set DATABASE_URL=`heroku config:get MONGOLAB_URI -a heroku-app-name` -a heroku-app-name
You’ll see some output similar to this:
Setting config vars and restarting heroku-app-name... done, v7 DATABASE_URL: mongodb://heroku_app11111111:[email protected]:39707/heroku_app11111
The Mongo URL is the part that starts with
4. Now, we need to set the Mongo URL:
heroku config:set DATABASE_URL=mongodb://heroku_app11111111:[email protected]:39707/heroku_app11111 -a heroku-app-name
You’ll want to change the DATABASE_URL variable to the Mongo URL specific to your app.
6. All that’s left is to commit and push to Heroku. You should still be in the lets-chat folder, so, make a git commit! You’ll have to anyway, before you can push to Heroku.
git commit -am "Initial commit."
7. Now we can finally push this to Heroku!
git push heroku master
Visit your Heroku app URL in your web browser and you should be greeted with a screen that looks similar to the featured image for this post. Some basic screenshots can be seen below!
If you run into any issues or find something I have incorrect, please let me know. You could also see if your problem has already been addressed on GitHub.
This is the steps I took to get Let’s Chat working on Heroku. It’s possible that the project developers will streamline this process in the future. But for now, this is a very easy solution to hosting on Heroku.
Well, now what?
Work with Me
I'm available for hire and always taking new clients, big and small. Got a project or an idea you'd like to discuss? Startup plan but no developer to make it happen? Just get in touch, I'd love to see if I can help you out!