- AUR - Release package
masterbranch package GitHub master branch
AUR - Git
devbranch package GitHub dev branch AUR - Git
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).
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 Gogs it on the same machine as the database:
- SQLite: #SQLite. - For configuration of Gogs with SQLite see
- PostgreSQL: PostgreSQL#Installing PostgreSQL to set it up and start the daemon and for configuration of Gogs with PostgreSQL see #PostgreSQL. - Read
- MariaDB: MariaDB#Installation to set it up and start the daemon and for configuration of Gogs with MariaDB see #MariaDB. - Read
If you plan to use SSH to interact with your repositories, make sure to add the
gogs user to the
AllowUsers entry in
After starting of the Gogs service (
systemctl start gogs.service), you can access the running service over the url
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).
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/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.
Installand select SQLite on the installation page.
Installand select Postgresql on the installation page.
# su - postgres -c "initdb --locale en_US.UTF-8 -D '/var/lib/postgres/data'" # su - postgres -c "createuser --interactive" # name: gogs # su - postgres -c "createdb -U gogs gogs"
The current package (gogs-git* and gogs>=0.4.2) support custom themes. The location for Gogs themes is
/usr/share/themes/gogs/. 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
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.
Restart after Upgrade
To automate this the following pacman hook can be inserted to
[Trigger] Type = File Operation = Upgrade Target = usr/share/gogs/gogs [Action] Description = Restart gogs... When = PostTransaction Exec = /usr/bin/systemctl try-restart gogs.service