Role Detail


Gogs: Go Git Service
Type Ansible
Minimum Ansible Version 1.8
Installation $ ansible-galaxy install geerlingguy.gogs
Last Commit 2017-04-02 16:24:04 PM UTC
Last Imported 2017-09-24 12:12:12 PM UTC
Version History
Version Release Date
1.4.1 2017-04-02 16:24:04 PM
1.4.0 2016-11-23 17:42:05 PM
1.3.0 2016-09-03 01:42:01 AM
1.2.0 2016-02-16 05:03:05 AM
1.1.1 2015-09-27 04:40:04 AM
1.1.0 2015-01-21 16:50:04 PM
1.0.3 2014-11-11 16:35:04 PM
1.0.2 2014-04-30 14:19:02 PM
1.0.1 2014-04-30 14:15:02 PM
1.0.0 2014-04-30 14:13:02 PM
Supported Platforms
Platform Version
Debian etch
Debian jessie
Debian lenny
Debian sid
Debian squeeze
Debian stretch
Debian wheezy
EL 6
EL 7
Ubuntu artful
Ubuntu lucid
Ubuntu maverick
Ubuntu natty
Ubuntu oneiric
Ubuntu precise
Ubuntu quantal
Ubuntu raring
Ubuntu saucy
Ubuntu trusty
Ubuntu utopic
Ubuntu vivid
Ubuntu wily
Ubuntu xenial
Ubuntu yakkety
Ubuntu zesty
Last 10 Imports
Completed Status
2017-09-24 12:12:12 PM UTC SUCCESS
2017-07-23 10:07:10 AM UTC SUCCESS
2017-04-02 16:38:04 PM UTC SUCCESS
2017-04-02 16:33:04 PM UTC SUCCESS
2017-04-02 04:52:04 AM UTC SUCCESS
2017-01-22 02:48:02 AM UTC SUCCESS
2016-11-23 18:14:06 PM UTC SUCCESS
2016-11-23 17:58:05 PM UTC SUCCESS
2016-11-23 17:29:05 PM UTC SUCCESS
2016-11-23 15:38:03 PM UTC SUCCESS

Ansible Role: Gogs

Build Status

Installs Gogs, a Go-based front-end to Git, on RedHat or Debian-based linux systems.

After the playbook is finished, visit the gogs server (on port 3000 by default), and you will be redirected to the /install page, where you can configure an administrator account and other default options.


Requires git (via geerlingguy.git), and at least the Gogs HTTP port (3000 by default) open on your system's firewall. Install MySQL (e.g. via geerlingguy.mysql) prior to installing Gogs if you would like to use MySQL instead of built-in SQLite support.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

gogs_user: git
gogs_user_home: /home/git

The user and home under which Gogs will run and be installed.


Download URL for the Gogs binary.

gogs_http_port: "3000"

HTTP port over which Gogs will be accessed.

gogs_use_mysql: false
gogs_db_name: gogs
gogs_db_username: gogs
gogs_db_password: root

MySQL database support. Set gogs_use_mysql to true to configure MySQL for gogs, using the database name, username, and password defined by the respective variables.


  • geerlingguy.git

Example Playbook

- hosts: servers
    - vars/main.yml
    - geerlingguy.gogs

Inside vars/main.yml:

gogs_http_port: "8080"



Author Information

This role was created in 2014 by Jeff Geerling, author of Ansible for DevOps.