I’ve gotten an instance of GitLab set up and running at emily.st/code, and I’m going to begin migrating anything of mine away from GitHub and the like and hosting it myself.
I’m not going to go into how I did all this (yet). For those curious, mostly, I was able to follow the recipe laid out here. I recall it didn’t work 100% as given for me, but it was damn close. I seem to recall the PUIAS repository neither existed, worked, nor was needed. Also, PostgreSQL auth didn’t work right away as expected (but it was a small change to
pg_hba.conf to use “md5” for authentication). I also modified the environment to serve from a subdirectory on my primary domain (to use my existing SSL certificate), and my
nginx configuration is a bit funky as a result. Aside from these things, that was a really good recipe, better than most I’ve seen, and it works swimmingly on an Amazon Linux EC2 instance.
Okay, now, why did I do this?
- It falls under my ongoing project of managing my services myself in fully open source ways. GitHub is not open source!
- I can have private repositories for free, with a fully featured interface.
- I can avoid the questionable ethics of GitHub and the ethical apathy of Atlassian’s BitBucket as well.
This was pretty easy to me, but I can imagine this kind of setup, as outlined in the recipe up there, to be challenging for those not use to setting up servers, especially ones that serve multiple jobs. I’m sympathetic. GitLab has done a cool thing, making Omnibus packages available (and virtual server images!) for quick setup. These are reasonable if you’re dedicating an entire server to this task, as I imagine some of you might do at work. Otherwise, I recommend muscling through a recipe, if you’re going to do this yourself.