ansible role gogs: GitHub File Free Download

Ansible Role: Gogs

DEPRECATED: This project is no longer actively maintained. I recommend using an alternative like Gitea.


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.

Go to GitHub File