Personal Git Server in a VPS

GitLab CE

Early last year I upgraded my vps box. The main reason: GitLab CE.

GitLab CE properly is one of the best open source, free, mature and actively maintained git server package. It is feature rich, come with beautiful user interface, and backed by commercial development team. You really cannot ask for more.

I was sold once I had it up and running. Except one issue, GitLab is a resource hog. It constantly push my then tiny vps' memory to the limit. That pushed me to upgrade my box.

I did not look back till a few months ago, when my development focus switched from AngularJS to Angular2, of which the development process is closely tie to node.js. And node.js, in turn, is closely tie to git. I started asking myself, wouldn't there be a node.js base git server out there, similar to GitLab, but using much less resource?

No! (suprise!?) ... But ...

Gogs - Go Git Server

I did not find a node.js one, but one written in GO Lang: Gogs.

Gogs interface closely resemble Github. I have no complain about the UI. As a younger project(>2yrs) than GitLab(>5yr), while feature complete, Gogs still have some rough edges. But as an open source project with an active development team, there is no worry about project continuation.

What make Gogs so attractive? Extremely low resource requirement! Following is quote from its website:

Gogs has low minimal requirements and can run on an inexpensive Raspberry Pi. Some users even run Gogs instances on their NAS devices.

Numbers Talk

Lets look at their resource consumption while idling in my vps.

GitLab CE

0 0.2 41.85Mb 2.10Mb /usr/bin/redis-server
1.9 25 646.73Mb 256.98Mb unicorn_rails master
0 24.4 646.73Mb 250.39Mb unicorn_rails worker[0]
0 0.4 131.12Mb 4.25Mb gitlab-workhorse
2 26.3 837.74Mb 269.65Mb sidekiq 4.0.1 gitlab [0 of 2 busy]

GitLab CE has 6 processes, and I already tuned them to the bare minimum. I excluded mySQL (which is required), as it is also used by WordPress.


0 2.4 641.65Mb 25.42Mb /home/git/gogs/gogs web

Gogs only has one process!

You already know my choice.