How to Install Gitea on Your UGREEN NAS

How to Install Gitea on Your UGREEN NAS

Gitea is a free, open-source, self-hosted Git service designed as a lightweight and user-friendly alternative to platforms like GitHub or GitLab. It provides a platform for hosting Git repositories, along with features for code review, team collaboration, and CI/CD. Essentially, it’s a complete DevOps platform for managing software development projects. In this step by step guide I will show you how to install Gitea on your UGREEN NAS using Docker and Portainer.

💡Note: This guide works perfectly with the latest Gitea v1.24.2 release.

💡Note: Check out my guide on how to Install Gitea on Your Synology NAS.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Install Portainer using my step by step guide. If you already have Portainer installed on your UGREEN NAS, skip this STEP. Attention: Make sure you have installed the latest Portainer version.

  • STEP 3

⚠️Mandatory: Enable HTTPS on your UGREEN NAS.

  • STEP 4

Create a new hostname on the noip website using your noip account. For example, I have created mariusgitea as hostname and I use the free ddns.net domain. In the IP Address area, type in your own IPV4 IP address from your ISP, then click Create/Add Hostname. Follow the instructions in the image below.

Gitea UGREEN NAS Set up 1

  • STEP 5

Go to Files and open the docker folder. Inside the docker folder, create one new folder and name it gitea. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Gitea UGREEN NAS Set up 2

  • STEP 6

Now create two new folders inside the gitea folder that you have previously created at STEP 5 and name them data and db. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Gitea UGREEN NAS Set up 3

  • STEP 7

Log into Portainer using your username and password. On the left sidebar in Portainer, click on Stacks then + Add stack. Follow the instructions in the image below.

UGREEN NAS Portainer Add Stack

  • STEP 8

In the Name field type in gitea. Follow the instructions in the image below.

Note: Copy Paste the code below in the Portainer Stacks Web editor.

services:
  db:
    image: postgres:17
    container_name: Gitea-DB
    hostname: gitea-db
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: ["CMD", "pg_isready", "-q", "-d", "gitea", "-U", "giteauser"]
      timeout: 45s
      interval: 10s
      retries: 10
    volumes:
      - /volume1/docker/gitea/db:/var/lib/postgresql/data:rw
    environment:
      - POSTGRES_DB=gitea
      - POSTGRES_USER=giteauser
      - POSTGRES_PASSWORD=giteapass
    restart: on-failure:5

  web:
    image: gitea/gitea:latest
    container_name: Gitea
    hostname: gitea
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: wget --no-verbose --tries=1 --spider http://localhost:3000/ || exit 1
    ports:
      - 3052:3000
      - 2222:22
    volumes:
      - /volume1/docker/gitea/data:/data:rw
      - /volume1/docker/gitea/data:/data/git/repositories:rw
      - /etc/TZ:/etc/TZ:ro
      - /etc/localtime:/etc/localtime:ro
    environment:
      - USER_UID=999
      - USER_GID=10
      - GITEA__database__DB_TYPE=postgres
      - GITEA__database__HOST=gitea-db:5432
      - GITEA__database__NAME=gitea
      - GITEA__database__USER=giteauser
      - GITEA__database__PASSWD=giteapass
      - ROOT_URL=https://mariusgitea.ddns.net
    restart: on-failure:5

Note: Before you paste the code above in the Web editor area below, change the value numbers for USER_UID and USER_GID with your own values. (Follow my step by step guide on how to do this.) 999 is my personal USER_UID value and 10 is my personal USER_GID value. You have to type in your own values.
Note: Before you paste the code above in the Web editor area below, change the value for ROOT_URL and type in your own NO IP DDNS with https:// at the beginning that you have previously created at STEP 4.

Gitea UGREEN NAS Set up 4

  • STEP 9

Scroll down on the page until you see a button named Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.

Gitea UGREEN NAS Set up 5 new 2026

  • STEP 10

If everything goes right, you will see the following message at the top right of your screen: “Success Stack successfully deployed“.

Gitea UGREEN NAS Set up 6

  • STEP 11

Open your Nginx Proxy Manager container that you have previously installed at STEP 3. Click Add Proxy Host. A new pop up window will open. Add the following details:

Domain Names: Type in your own noip domain name that you have previously created at STEP 4.
Scheme: http
Forward Hostname/IP: Type in the local NAS IP of your UGREEN NAS.
Forward Port: Type in the Gitea local Port that is 3052
Check Block Common Exploits
Check Websockets Support
Click the SSL tab. Follow the instructions in the image below.

Gitea UGREEN NAS Set up 7

  • STEP 12

After you click the SSL tab, add the following details:

SSL Certificate: Request a new SSL Certificate
Check: Force SSL
Check: HSTS Enabled
Check: HTTP/2 Support
Email Address for Let’s Encrypt: Type in your own Email Address.
Check: I Agree to the Let’s Encrypt Terms of Service.
Click Save. Follow the instructions in the image below.

Gitea UGREEN NAS Set up 8

  • STEP 13

In the Proxy Hosts area, if everything goes right, you will see that your gitea hostname has been generated. Click on it. Follow the instructions in the image below.

Gitea UGREEN NAS Set up 9

  • STEP 14

🟢Please Support My work by Making a Donation. Almost 99,9% of the people that install something using my guides forget to support my work, or just ignore STEP 1. I’ve been very honest about this aspect of my work since the beginning: I don’t run any ADS, I don’t require subscriptions, paid or otherwise, I don’t collect IPs, emails, and I don’t have any referral links from Amazon or other merchants. I also don’t have any POP-UPs or COOKIES. I have repeatedly been told over the years how much I have contributed to the community. It’s something I love doing and have been honest about my passion since the beginning. But I also Need The Community to Support me Back to be able to continue doing this work.

  • STEP 15

Now open your browser and type in your HTTPS/SSL certificate like this https://yourname.ddns.net In my case it’s https://mariusgitea.ddns.net If everything goes right, you will see the Gitea configuration page. Type in your Company Name, then scroll down on the page. Follow the instructions in the image below.

Gitea UGREEN NAS Set up 10

  • STEP 16

On the SSH Server Port, type in 2222 instead of 22. Click Email Settings. Follow the instructions in the image below.

Gitea UGREEN NAS Set up 11

  • STEP 17

Follow my step by step guide on how to activate SMTP for your Gmail account. This step is mandatory. Note: If you don’t want to use the easiest way for SMTP with Google and you already have SMTP details from your own Mail Server, you can just skip this STEP and use your personalized email SMTP details instead.

  • STEP 18

Add your own SMTP details. Follow the instructions in the image below.

SMTP Host: smtp.gmail.com
SMTP Port: 465
Send Email As: Type in your own Gmail address.
SMTP Username: Type in your own Gmail address.
SMTP Password: Type in your own Gmail App Password / STEP 17.

Click Install Gitea.

Gitea UGREEN NAS Set up 12

  • STEP 19

At the top right of the page, click Register. Type in your own details. Click Register Account. Follow the instructions in the image below.

Gitea UGREEN NAS Set up 13

  • STEP 20

At the top right of the page, click on the user icon, then Settings. In this area, you can change different parameters on your Gitea installation. For example, you can switch the theme to Dark Mode. Select gitea-dark under Appearance, then Update Theme. Follow the instructions in the image below.

Gitea UGREEN NAS Set up 14

  • STEP 21

Your Gitea Dashboard at a glance!

Gitea UGREEN NAS Set up 15

  • STEP 22

Install TextEdit via UGREEN “App Center”. (Mandatory STEP.) If you already have TextEdit installed on your UGREEN NAS, skip this STEP.

Gitea-UGREEN-NAS-TextEdit

  • STEP 23

If you want to modify some settings in Gitea, for example disable user registration, continue to follow the instructions. Make sure you have installed TextEdit as per the instructions at STEP 22. In Files, go to docker / gitea / data / gitea / conf and double click on the app.ini file. Scroll down until you find DISABLE_REGISTRATION and type in true instead of false. Click X to save the file. Follow the instructions in the image below.

Gitea UGREEN NAS Set up 16

  • STEP 24

To apply the settings, you have to restart the Gitea container. On the left sidebar in Portainer, click Containers. Identify your Gitea instance, select it then click Restart. Follow the instructions in the image below.

Gitea UGREEN NAS Set up 17

Enjoy Gitea on your UGREEEN NAS!

🆘TROUBLESHOOTING

🆙Note/Update/Container: How to Update Your Docker Containers on UGREEN NAS Using Portainer.
🐳Note: How to Create Docker Shortcuts on Desktop.
🆕Note: How to Update Portainer to the latest version.

This post was updated on Thursday / July 10th, 2025 at 5:30 PM