# Gogs

Gogs (Go Git Service) is a Self Hosted Git service, which was written in the Go programming language.

## Packages

- gogs - Release package
- gogs-git - Git `master` branch package GitHub master branch
- gogs-git-dev - Git `dev` branch package GitHub dev branch

In all three package is sqlite, redis and memcache activate for compile. To use it, you need to edit the configuration file `app.ini` (see #Configuration).

## Installation

Installing Gogs from the AUR instead of manually has the added benefit that lots of steps have been taken care of for you (e.g. permissions and ownership for files, etc).

Make sure you perform a system upgrade (`pacman -Syu`) before installing Gogs from AUR and that you have installed the `base-devel` group, or you may face problems installing Gogs because base-devel packages are not required to be listed as dependencies in PKGBUILD files.

Also before installing the Gogs package from the AUR, you need to choose a database backend if you're planning to host GitLab it on the same machine as the database:

- SQLite: sqlite - For configuration of Gogs with SQLite see #SQLite.
- PostgreSQL: postgresql - Read PostgreSQL#Installing_PostgreSQL to set it up and start the daemon and for configuration of Gogs with PostgreSQL see #PostgreSQL.
- MariaDB: mariadb - Read MariaDB#Installation to set it up and start the daemon and for configuration of Gogs with MariaDB see #MariaDB.

## First start

After starting of the Gogs service (`systemctl start gogs.service`), you can access the running service over the url [http://[server]:3000 http://[server]:3000]. At the first execute, you will redirect to the installation page. Here you can configure some minor configuration options. In the configuration file `/srv/gogs/conf/app.ini`, you can change more values (for example the port number).

## Configuration

After the first start, Gogs created a own configuration file in the directory `/srv/gogs/config`. When you want to edit a configuration option, you need to edit this file.

### .gitignore and license files

Add the files into the directory `/srv/gogs/conf/gitignore` or `/srv/gogs/conf/license`. When the directory not exist, you need to created it in the first step.

You can get or create own .gitignore files on this page.

### Database

#### SQLite

#### PostgreSQL

#### MariaDB

### SMTP

### oAuth

### Logging

### Caching

## Theme

The current package (gogs-git* and gogs>=0.4.2) support custom themes. The location for Gogs themes is `/usr/share/themes/goges/`. Gogs comes with one default theme, but you can easily create a own theme. Just copy the default `theme` directory and change what every you want. In the `public` directory is every javascript, stylesheet and font file and in the `template` directory are the HTML templates. The current selected theme can be changed over the `app.ini` configuration parameter `STATIC_ROOT_PATH`. Changed it with the absolute path to the new theme.

## See also

- Official Documentation

Category:

- Version Control System