Host Your Own GitHub Alternative with Gitea in Docker @i12bretro
Host Your Own GitHub Alternative with Gitea in Docker  @i12bretro
Uploaded July 2023 | Updated September 2026, 2 weeks ago
#Gitea #Git #Docker

Full steps can be found at i12bretro.github.io/tutorials/0520.html

--------------------------------------------------------------------
What is Gitea
--------------------------------------------------------------------
Gitea is a community managed lightweight code hosting solution written in Go. - gitea.io
 
--------------------------------------------------------------------
Installing Docker
--------------------------------------------------------------------
   01. Log into the Linux based device
   02. Run the following commands in the terminal
         # install prerequisites
         sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y
         # add docker gpg key
         curl -fsSL download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | sudo apt-key add -
         # add docker software repository
         sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release) $(lsb_release -cs) stable"
         # install docker
         sudo apt install docker-ce docker-compose containerd.io -y
         # enable and start docker service
         sudo systemctl enable docker && sudo systemctl start docker
         # add the current user to the docker group
         sudo usermod -aG docker $USER
         # reauthenticate for the new group membership to take effect
         su - $USER
 
--------------------------------------------------------------------
Running Gitea
--------------------------------------------------------------------
   01. Now that Docker is installed, run the following commands to setup the Gitea Docker container and run it
         # create working directory
         sudo mkdir /home/$USER/docker/gitea -p && sudo mkdir /home/$USER/docker/mariadb -p
         # run the mariadb docker container
         docker run --name mariadb -e MYSQL_ROOT_PASSWORD=p@$$word -e MYSQL_USER=gitea_rw -e MYSQL_PASSWORD=G1te@ -e MYSQL_DATABASE=gitea -v /home/$USER/docker/mariadb:/var/lib/mysql -p 3306:3306 -d mariadb
         # run the Gitea docker container
         docker run --name gitea -d -p 3000:3000 -p 222:22 -v /home/$USER/docker/gitea:/data -v /etc/timezone:/etc/timezone:ro -v /etc/localtime:/etc/localtime:ro -e USER_UID=1000 -e USER_GID=1000 -e GITEA__database__DB_TYPE=mysql -e GITEA__database__HOST=DNSorIP:3306 -e GITEA__database__NAME=gitea -e GITEA__database__USER=gitea_rw -e GITEA__database__PASSWD=G1te@ --restart=unless-stopped gitea/gitea:latest
   02. Open a web browser and navigate to http://DNSorIP:3000
   03. Confirm the settings on the Initial Configuration screen ≫ Click the Install Gitea button
   04. Click the Register Now link
   05. Enter a username, email and password ≫ Click the Register Account button
   06. Welcome to Gitea running in a Docker container
 
Documentation:  hub.docker.com/r/gitea/gitea
 


### Connect with me and others ###
★ Discord: discord.com/invite/EzenvmSHW8
★ Reddit: reddit.com/r/i12bretro
★ Twitter: twitter.com/i12bretro
Host Your Own GitHub Alternative with Gitea in DockerBackup ProxMox VE Node Configuration with Simple ScriptRun miniPaint - Browser Based Image Editor - on WindowsInstall MyBB - Open Source Forum Software - on LinuxIn-Place Upgrade Debian 11 Bullseye to 12 BookwormInstall Actual Budget - Open Source Finance Management - on WindowsRoll Your Own Asset Management System with Snipe-ITRaspberry Pi 4 vs Raspberry Pi 5Installing phpBB Forum/Bulletin Board on WindowsInstall Invoice Plane - Invoice and Payment Manager - On WindowsInstalling RedMine Project Management Software on LinuxSetting up LDAP Authentication for OPNSense
i12bretro |

Host Your Own GitHub Alternative with Gitea in Docker

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER