You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Nirmal Almara 879f267e81 increase latest commit width + update all styles 1 month ago
cmd remove syscall getpassword 3 months ago
config template path config 3 months ago
internal header style tweaks + commit message bug fix 1 month ago
middleware Implement idiomatic folder structure based on Golang suggestions 4 months ago
models Implement idiomatic folder structure based on Golang suggestions 4 months ago
pkg header style tweaks + commit message bug fix 1 month ago
public increase latest commit width + update all styles 1 month ago
routes public folder absolute path fix 3 months ago
scripts delete sorcia_ssh_config 4 months ago
.gitignore repo tree style tweaks 1 month ago
LICENSE update year in the license 5 months ago tree border tweak + README style tweaks 1 month ago
go.mod update vendor dependencies 4 months ago
go.sum update vendor dependencies 4 months ago
gulpfile.js basic workaround for css dark mode + bug fix on js 4 months ago
package.json basic workaround for css dark mode + bug fix on js 4 months ago
sorcia.go Implement idiomatic folder structure based on Golang suggestions 4 months ago


Sorcia is a self-hosted web frontend for git repositories which is written in Golang

license information

Sorcia has a dual license, a commercial one suitable for closed source projects and an AGPL license that can be used in open source softwares.

You can make a private repository in Sorcia. But if the source code that your are developing and publishing is a proprietary one, you must buy a commercial license.

Depending on your needs, you must choose one of them and follow its policies. A detail of the policies and agreements for each license type are available in the LICENSE.COMMERCIAL and LICENSE.AGPL files.

When you purchase a license, you will get rid of the footer mentioning about Sorcia and instead you could be able to add a custom footer in the meta section.

The way to load your license is through config/app.ini, for example:

[email protected]



  • Ubuntu 18.04 LTS
  • SQLite3


At this moment, this documentation assumes that you are using a freshly installed Ubuntu 18.04 LTS box for the Sorcia installation. This will get updated to the platforms that Go can compile for as soon as possible. If you had installed Sorcia on a different OS or Architecture successfully, please feel free to send patches and update this README section.

SSH into your server as a root user or a user who has root privleges. For commands that needs root privileges, this documentation will prefix the command with sudo.

First, update and upgrade your OS utilities and packages.

sudo apt update
sudo apt upgrade

Install the necessary packages in order to run the Sorcia binary on your server.

sudo apt -y install software-properties-common build-essential git-core sqlite3 wget vim nginx

Now create a git user on your machine.

sudo adduser --disabled-login --gecos 'sorcia' git
sudo su - git

Install from binary

mkdir sorcia
tar -C sorcia -xzf sorcia.linux-amd64.tar.gz
cd sorcia
chmod +x sorcia

(or) Install from source Download Go 1.14 from using wget.

mkdir go local
tar -C local -xzf <go.tar.gz>

Open .bashrc using your favorite editor and add these lines at the bottom of the file.

export PATH=$PATH:$HOME/local/go/bin
export GOPATH=$HOME/go
source ~/.bashrc

Now download the latest or appropriate Sorcia version in tar.gz or zip formats from and build from source. Example below

mkdir sorcia
tar -C sorcia -xzf sorcia-0.3.1.tar.gz
cd sorcia
go build sorcia.go
chmod +x sorcia

When you are in the project root directory,

cp config/app.ini.sample config/app.ini

and change the app.ini config file if you only prefer. Otherwise the default config is fine to go with.

Move back to the root user or user with root privileges with exit command. Change the SSH port from 22 to something else. Sorcia by default config which is in config/app.ini will run the Git SSH server on port 22. You can change this in the config file if you need. Anyway, For example: in order to change the SSH port

sudo vim /etc/ssh/sshd_config

Look for Port section and change from 22 to whatever port your want. And restart SSH server.

sudo systemctl restart sshd
sudo systemctl restart ssh

Then go to the sorcia directory which is under the git user.

cd /home/git/sorcia

Now, let’s start the sorcia server.

sudo ./sorcia web

That’s it, sorcia will run on port 1937.

Systemd, Nginx and Let’s Encrypt configuration

If you want to move further and setup your systemd service with your domain configured with Nginx, please follow

sudo cp /home/git/sorcia/scripts/sorcia-web.service /etc/systemd/system/
sudo systemctl start sorcia-web.service
sudo systemctl enable sorcia-web.service

Let’s configure Nginx now. Note: Change the to your domain address.

sudo mv /etc/nginx/sites-available/default /etc/nginx/sites-available/default.backup
sudo rm /etc/nginx/sites-enabled/default
sudo cp /home/git/sorcia/scripts/nginx.conf /etc/nginx/sites-available/
sudo ln -s /etc/nginx/sites-available/ /etc/nginx/sites-enabled/

Now open the Nginx config file as shown below in order to mention your domain address.

sudo vim /etc/nginx/sites-available/

and change the to your domain address.

Now check if there is any problem with your Nginx config by

sudo nginx -t

if your Nginx config is correct. It will show you:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Reload the Nginx service.

sudo systemctl reload nginx

Now you can go to your domain and see the Sorcia software running. AND if you want to configure https certificate with Let’s Encrypt, follow below commands.

Change the to your domain address in the below certbot command. Follow the Let’s Encrypt prompt and obtain the certificate.

sudo add-apt-repository ppa:certbot/certbot
sudo apt install python-certbot-nginx
sudo certbot --nginx -d

Once you had successfully obtained the Let’s Encrypt certificate. You have to go to the Nginx config file and uncomment these lines. Again, change the to your domain address.

# ssl on;
# ssl_certificate /etc/letsencrypt/live/; # managed by Certbot
# ssl_certificate_key /etc/letsencrypt/live/; # managed by Certbot
# include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

And check and reload Nginx.

sudo nginx -t
sudo systemctl reload nginx

You can now see your domain with https served by Let’s Encrypt.

post installation

There is this important CLI utility from Sorcia which I need to mention. As Sorcia doesn’t rely on SMTP settings, this CLI utility can be used to change:

  • Reset username of any user
  • Reset password of any user
  • Delete any user except the admin user
  • Delete any repository

Remember, this can only be done by the server/sys administrator who can SSH into the sorcia instance.

With the root user or user with root privileges, do cd /home/git/sorcia and enter the following command

sudo ./sorcia usermod

The command will prompt you for each of those above lists and by selecting one and following the further prompts, you can do those changes.