Docker compose setup for
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.
Jeffery Yeary ab301f6bf6 whoops 10 months ago
volumes renamed gitea container and volume, moved volumes from default path to subfolder 1 year ago
.env.dist change to postgres 10 months ago
.gitignore added systemd service template 1 year ago blah 10 months ago
docker-compose.yml whoops 10 months ago
docker-gitea.service.dist change to postgres 10 months ago


A Docker Compose file for Gitea - Git with a cup of tea (

Data will be saved in separate docker volumes to enable easy upgrades!


  • docker
  • docker-compose

Getting Started

  1. Copy .env.dist to .env and make your modifications
  2. Start docker containers: $ docker-compose up -d

After that open gitea installer via browser: http://localhost:3333 and fill the form according your .env settings.

Set gitea-db:3306 in Host field and complete setup.

After setup is completed register a new user (use link from the navigation bar).

The first registered user has admin privileges.

Environment Configuration

GITEA_VERSION Docker-Image-Version latest
GITEA_HOSTNAME Hostname for Gitea Application localhost
GITEA_WEB_PORT GUI-Port for accessing Gitea 3333
GITEA_SSH_PORT Port for accessing Gitea via SSH 22
DATABASE Database name for gitea gitea
DB_USER Database user for gitea gitea
DB_PASSWORD Password for MySQL user gitea

Create systemd unit

  1. Copy docker-gitea.service.dist to docker-gitea.service
  2. Adjust WorkingDirectory in service file if needed
  3. Create symbolic link: ln -s docker-gitea.service /etc/systemd/system/docker-gitea.service
  4. Start service: systemctl start docker-gitea
  5. (optional) Enable autostart at boot: systemctl enable docker-gitea