5 Free Self Hosted GitHub Alternatives

0 Comments
Editor Ratings:
User Ratings:
[Total: 0 Average: 0]




This post contains 5 free self hosted GitHub alternatives. If you want to set up your own platform to store all your programming work then you can try these. Here these tools offer you features similar to GitHub and you will like them. Here on these GitHub alternatives, you can easily manage all your repositories and access them using GIT command line just like you do in case of GitHub. Also, one of them even supports other version control system too.

In these, you can create unlimited public and private repositories and then access them over HTTP or SSH. Features like commits, pull requests, issues tracker, cloning, gists, wikis, public branches, private branches, code review, etc., are same in all these and you can easily install them.

GitHub is free for individuals for storing their programming work online. And if you want to do the same but on your own server then you can try the following alternatives which you can host on your own. All the GitHub alternatives that I have added in the following list are open source and can be easily installed locally or on a VPS if you own one.

Free Self Hosted GitHub Alternatives

5 Free Self Hosted GitHub Alternatives:

GitLab

GitLab free GitHub alternative open source self hosted

GitLab is one of the best free self hosted GitHub alternatives that you can use. Here it uses Git as a version control system and you can install it on Linux PC locally or on a VPS. It is written in Ruby and you can either install it via scripts or using a Debian binary. Here you will find almost all the features that you see in GitHub. It offers a clean and intuitive interface to show you repositories and files that you create here. You can create public and private repositories, track issues, track bugs, create public branches, create private branches, manage pull requests, and it even has a build system in it.

The repositories that you create here can be initialized with a readme file and you can get the Git URL to clone it on a remote PC over HTTP or SSH. However, for SSH, you will have to add SSH key in it during its setup. Also, what makes it a perfect replacement of GitHub is that it has a system to draft binary releases that other Git services in the following list lack.

The installation process of GitLab is simple but takes a fair amount of time. And you cannot run it on a Windows machine. It only works on Linux computer, preferably running on Ubuntu. You can download the free community version of GitLab(.deb file) from above and then simply use it for the installation. You will also have to configure a few things and then you can reach the web UI where you can create the repositories and host them. The final interface of GitLab looks as I have shown in the screenshot above.

How to Install GitLab?

Installing GitLab is very simple. You just need a Linux machine with any Debian based distro installed on it. I will recommend you to use Ubuntu. I will tell you the installation process using Debian binary file on Ubuntu 16.10 to install GitLab but there is another process for the same through scripts that you can see here.

Step 1: Double click on the .deb file that you have already downloaded. After that, a window will open and then you just have to click on the “Install” button. It will take a few minutes and when it has installed, you will have to do a little configuration.

GitLab installing via DEB file

Step 2: Type the following command in terminal and a file in text editor(Gedit) will open up.  Now, you just need to the change a line “external_url” in it and add your own hostname there. If you have domain then simply add it or if you want to run it locally then enter your current IP address. And I will also suggest you to add a desired port number(I chose 9000) as well.

sudo gedit /etc/gitlab/gitlab.rb

GitLab edit gitlab.rb file

Step 3: Now, run this command and it will take up a few minutes to configure GitLab. After it is done, just open whatever browser is installed on your PC and type the socket address (IP address with port) you have specified in the address bar and the welcome page will open where it will ask you to change the default password.

sudo gitlab-ctl reconfigure

GitLab reconfigure command

Step 4: Now you can sign in using the password that you just set. Do note that the username for the default account is “root“. And after signing in, set the SSH keys and create your first repository.

GitLab welcome page and create repository

Step 5: After all set, your repository page will look like one I have shown in the beginning. Also, you can test it out if the cloning is working. Use the git clone command and then see if it is able to retrieve objects from the repository that you just created. In my case, it didn’t work as the Linux distro I used became too slow after installing it but it shouldn’t be the problem with you.

GitLab git clone command

This way, you can use easily install and use GitLab right on your PC. As I mentioned that it slows down PC if you are on low RAM. In that case, you can shut down the GitLab completely by running the “sudo gitlab-ctl stop” command and if you need to start it again then just run “sudo gitlab-ctl start” and then again access web UI using the address that you have added in the configuration file.

Gogs

Gogs free github alternative

Gogs is another free GitHub alternative which is open source and self hosted. Its tagline, “A painless self-hosted Git service” says it all itself. With minimum effort, you can get this Git service running locally or on a production server. It supports all major platform including Windows. The interface is very much similar to GitHub and the repository structure is almost same as well. It shows cloning, forking, starring, and watching options on the main repository page and you can create unlimited private and public repositories here. It allows you to access the repository over HTTP and SSH just like GitHub and GitLab and do much more than that. Setup your profile and then start creating and managing repositories.

Installing and using this Git service is super simple. In just one click, you can get it running on whatever platform you are using, it just requires a database, preferably MySQL. I ran it on Windows by downloading its EXE file from the above link. After getting the binary file open the command prompt in the folder where you have downloaded and make sure that database server is running and you know the credentials. Also, you will have to create a blank “gogs” schema in the database. Enter the following command then add open your browser and write “localhost:9000”. The web interface of “Gogs” will open up.

gogs web

Gogs web command to start the UI

You will have to sign up for an account here and then you can start using it. Log in with the account that you just created and create your first repository. It lets you initialize your repository with some random files that it generates automatically. You can specify the programming language that you will use in your code.

Gogs create account and create repository

Now, when you have set up the service, simply start creating unlimited public and private repositories and then simply access them over HTTP or SSH. For SSH access, you will have to add an SSH key in the admin panel.

Gogs cloning in action

That is all about installing and using this self hosted GitHub alternative, Gogs. The interface is pretty good and if you have sued GitHub then you will feel completely at home with this. The above method for installing was for Windows but the steps are same for other platforms as well.

Gitea

Gitea free GitHub alternative self hosted

Gitea is yet another free Git service which is a very good alternative to GitHub. The main UI of the final repository page is very similar to GitHub and other alternatives that I have mentioned above. However, the best part that I liked about this Git services is that here using heavy database servers like PostgreSQL, MySQL is optional. If you don’t want to set up a database server then it is okay, here you can use SQLite as a database which requires nothing extra to be installed or configured.

On the main respiratory page, there is options to see the issues, pull requests, starts, forks, and cloning. Other features of this Git service include private and public branches, code review, bug tracking, etc. And there is a separate Activity section as well which is missing in the above GitHub alternatives. In a few seconds, you can configure it and get it running locally or on a VPS or other online server.

Just like Gogs above, you can run this Git service on any platform. There are binaries available for this already and you can use download them using the link above. After downloading the EXE file simply open it by double clicking on it and then access the web UI by typing “localhost:3000” in the browser. At first, it will ask you to connect to database. So, based on the database you want to use, specify that there and proceed.

Gitea create database configuration

After database configuration, it will take you to the sign up page. Create a free account there and then sign in. After that, sign in and see the main UI where your repositories will appear.

gitea create repository

Now, the next part is to start creating the repositories. You can create unlimited public and private repositories here and initialize with a readme.md file. Specify the programming language of the repository and then start adding files in it. You can set up a SSH key and then start retrieving the objects over SSH or HTTP.

GITEAE receive objects over http

In this way, you can set up this simple Git service which is a very powerful open source alternative to GitHub as well. But do note that, after using, don’t place the EXE file to some other place. That is because, it saves the configuration file in the current folder. If you move the EXE file then you will lose the configuration. And you will eventually have to start from the scratch.

GitBucket

GitBucket free self hosted github alternative

GitBucket is yet another free GitHub alternative that you can use. Here it is a simple self hosted Git service which you can host on your own server. It is written in Java and that is why you will need it when you want to deploy it on your server. It has a simple interface and you can easily create unlimited public and private repositories in it. The interface looks a bit older and there is no option to star a repository.

From the main UI can you can watch a repo and you can fork it. There is an issues tracker that can be used by programmers, developer, and testers. The overall repository page of this service is different from others. In other GitHub alternatives, they have made the interface look like GitHub but in this service, you will find options like issues tracker, pull requests, creating wikis in the sidebar.

Apart from the common features related to manage repositories there are some other features as well. The best part about this GitHub alternative is that it supports plugins. There are some plugins already available to enhance its functionality. To meet GitHub’s full feature list, you install some useful plugins it for adding support for pages, gists, emojis, and notifications. Also, you are welcomed to create your plugin as well to for adding any feature in it that you like.

To install GitBucket, you only need Java installed on your server or PC if you want to run it locally. There is a very simple command to use it. Just get its WAR file from URL above and then simply save it in a folder. After that, you can just open a command prompt or terminal windows in the folder where you have save dit and then simply run the below command to run it.

java -jar gitbucket.war --hostname localhost

Gitbucket launch

After the server starts running. type “localhost:8080” in the address bar of the browser and then it will take you the login windows. From there, you can log in to the main UI and start creating the repositories. You can make a repository public or private based on your choices. The default user ID and password to gain access to the UI is “root/root”.

GitBucket create repo and sign in

You can use this GitHub alternative in this way whenever you want. You can create unlimited repository and manage them. When you logout there is shows the activity logs on its interface. For more advanced options, yo can explore the admin panel and see some useful tools like data exports that you can sue to export all you GitBucket data. And there are other tools to generate application tokens and some more. You can read all the technical aspects of this Git service on its GitHub page.

Kallithea

Kallithea free GitHub alternative self hosted

Kallithea is the last free self hosted GitHub alternative in my list that you can use. Here you can use in place of GitHub use if you want. However, it has an old interface. If you want simplicity in looks then you can use it. This Git service is different from others in various ways. It is written in Python and then you will have to build it from source to run it. However, it has almost all the features and tools that you need to manage and host your repositories. The repository page is simple and it offers you code editor as well that you can use to create different source code files. Features like issues tracker, change log viewer, code review, gists, private branches, and some other Git features that above tool also have. Here it supports two version control system; Git and Mercurial.

To install it on your own server you just need some tools to be installed on your computer. it works with Python2.7 so make sure that you it installed on your server or PC. And along with the Python, you have to install pywin32 extensionsMicrosoft Visual C++ Compiler for Python 2.7, and virtualenv(pip2.7 install virtualenv). After making sure you have these installed, you can follow these steps.

Step 1: Create the following directory structure on your PC. For this post, I will be using Windows to install and run Kallithea. There are some directories structure creators which you can use.

C:\Kallithea
C:\Kallithea\Bin
C:\Kallithea\Env
C:\Kallithea\Repos

Step 2: Now, activate virtual environment and install Kallithea. Execute the following commands one after another.

cd C:\Kallithea\Env\Scripts
activate
pip2.7 install kallithea

kallithea install

Step 3: Now, you have to configure the admin username and password. For that, run these commands one after another. The second command will ask you various questions in the process which include admin username and password.

cd C:\Kallithea\Bin
paster make-config Kallithea production.ini
paster setup-db production.ini

Kallithea configuration

Step 4: Now, it’s time to start Kallithea to start creating and saving repositories. Run this final command and it will start the Kallithea instance at “http://127.0.0.1:5000/”. Just paste this into the address bar of your browser and you are done.

serve production.ini

kallithea running

That’s it. Now, when the web UI appears, you can log in using the username and password that you set during step 3 and start creating repositories. You can create unlimited repositories here and then add files in the. To create files, you can use the built-in code editor or you can upload files from your PC. For more details on installing instructions, see the online documentation of Kallithea here.

You may also like: 4 Free GitHub Alternatives to Host Private Open Source projects

Final thoughts

These are the best free self hosted GitHub alternatives that you can use. You can easily run them locally or on a production server in a few seconds. In some of them, it may take a long time for setup but it’s worth it. All the Git services that I have mentioned above can easily replace GitHub for personal and professional use. According to me, I will recommend you to use GitLab and Kallithea if you can handle the installation process which is a bit typical. If you want simple Git services that you can install and run on your server then you use Gogs and Gitea. And if you want a GitHub alternative which is simple and customizable then I will suggest you to go with GitBucket due to its plugin based architecture.

Editor Ratings:
User Ratings:
[Total: 0 Average: 0]

Leave A Reply

 

Get 100 GB FREE

Provide details to get this offer