Habitica is the new software I’ve been looking for to help me level up in real life!
With the world in the state that it is we’re all spending a lot more time at home and, most likely, developing some bad habits along the way. I recently decided to try to get myself in gear and try to develop some new habits, bring back some of my old habits, and get rid of some bad habits along the way. The problem, for me anyway, is accountability.
More than that, I want something that will keep me engaged with my progress.
I wanted a game to play that would help me do all of this.
This is when I found Habitica. They’ve got a website you can go join and do everything there and that’s great, but we here at DB Tech like to self-host as much as possible.
I spent some time over-complicating the install process before I finally broke down and read their tutorial on the web. This post and video will hopefully make it even easier for you.
This whole process assumes that you have Docker and Portainer installed.
Habitica Installation
There are just a few steps to make this work, so let’s jump in:
- SSH into your server as root.
- Run the following commands:
git clone https://github.com/HabitRPG/habitica.git
cd habitica
cp config.json.example config.json
Next, you’ll want to open the docker-compose.dev.yml file to make any changes to the setup that you need for volumes or ports. Once you’re satisfied with the new settings, save and exit the file.
- Next you’ll run this command:
docker-compose -f docker-compose.dev.yml up -d
We’re using the docker-compose.dev.yml file because the docker-compose.yml is older and doesn’t include the mongo database that we’ll need for the application.
This process will take a while to complete, so give it some time. Once you see that the 3 containers are up and running, you are ready to move on to the next step.
Go into Portainer and you may see that the server container has stopped. If you look at the logs for that container, you may see an error that looks like this:
npm ERR! code ELIFECYCLE
That’s fine. We’ll fix it. This error is likely to be because nodemon requires more file watchers than inotify provides. Increase the number of file watchers.
On Ubuntu and similar Linux distributions, you can do that using this command in your SSH window:
echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/50-max-user-watches.conf && sudo sysctl --system
Once that is done, you can go back to Portainer and restart the Habitica Server container and you should be good to go!
Links:
- https://habitica.com/static/home
- https://habitica.fandom.com/wiki/Setting_up_Habitica_Locally_on_Docker
- https://github.com/HabitRPG/habitica
More Reading
For more Docker content, click here!
Join this channel to get access to perks:
https://www.youtube.com/channel/UCVy16RS5eEDh8anP8j94G2A/join
/=========================================/
Remember to leave a like on this video and subscribe if you want to see more!
/=========================================/
Like what I do? Want to be generous and help support my channel? Here are some ways to support:
Patreon: https://dbte.ch/patreon
Ko-fi: https://dbte.ch/kofi
/=========================================/
Here’s my YouTube Merch Store:
https://dbte.ch/ytstore
/=========================================/
Here’s my Amazon Influencer Shop Link:
Amazon: https://dbte.ch/amazonshop
/=========================================/
Follow Me:
Twitter: https://dbte.ch/tw
Facebook: https://dbte.ch/fb
Subscribe: https://dbte.ch/ytsub