Gitea on Synology NAS

Info

Diskstation: DS216+II, 8GB RAM
Version: DSM7.2.1

Synology Apps: Container Manager

Docker image: gitea/gitea

Container Manager

  • Register the image in the container manager (download)
  • Create a new container
    • General Settings:
    • Advanced Settings:
    • run after creation

Gitea

  • Open: http://<synology-ip>:3000
  • Select SQLite3 for easiest configuration
  • Select a page title
  • Keep everything default except server/port settings
    • Fill in the port settings of the container.
    • Fill in the synology-ip (or the external IP if you want to connect from outside)
    • This settings are taken to build the clone links (cannot be changed later on by UI, only via file modifications)
  • Install Gitea
  • Wait for installation (~3-5min, the page will refresh  on its own)
  • Register a new user
    • Note: The 1st user will automatically be the admin (this can be changed later on in the UI)

Router

  • Create new port forwarding settings to the synology NAS.

Next Steps

HTTPS Setup

  • Open the app.ini file within the shared directory: /docker/gitea/gitea/conf/app.ini and fill in the following under the [server] section
    • [server]
      PROTOCOL = https
      CERT_FILE = cert.pem
      KEY_FILE = key.pem
      APP_DATA_PATH = /data/gitea
      ROOT_URL = https://<synology-ip>:3000/
  • Copy an existing certificate and key file to /docker/gitea/gitea
  • Restart the container

Note: port redirection to be checked, see here.

Account Registration

  • Open the app.ini file within the shared directory: /docker/gitea/gitea/conf/app.ini and fill in:
    • [service]
      DISABLE_REGISTRATION = true
  • Restart the container

Note: the admin can add new users via the UI

First GIT Repostory

Repository Template

Leave a Reply

Your email address will not be published. Required fields are marked *