Gitea Docker Install

Let's look at the two different ways to install Gitea with Docker. One of the easiest ways to install Gitea is by using Docker. Gitea is a self-hosted Git service that is popular among developers for its lightweight and easy-to-use interface. Docker is a popular containerization platform that makes it easy to run applications in isolated environments.

The Gitea team provide great support for Docker out of the box. They have automatically updated images in their Docker Hub organization and you can use the latest stable tag to get the freshest version.

Let's take a look at the two methods for installing Gitea with Docker: with root and rootless.

Gitea on Docker logo

Installing Gitea with Docker (root)

The first method is installing Gitea with Docker using root privileges. Gitea provides automatically updated Docker images that can be accessed from the Docker Hub organization. To install Gitea with Docker, you need to follow the official installation instructions and install docker-compose. Once you have installed docker-compose, you can create a volume and a network and start the gitea/gitea:latest image as a service. The setup will guide you through the process, and you can customize the installation by configuring environment variables. Find more details here:

Installing Gitea with Docker (rootless)

The second method is installing Gitea with Docker using rootless privileges. This method is similar to the first method, but it uses Gitea internal SSH to provide Git protocol and doesn’t support OpenSSH. To install Gitea with Docker (rootless), you need to create a directory for data and config and touch a docker-compose.yml file. Then, you can create a volume and a network and start the gitea/gitea:latest-rootless image as a service. Again, the setup will guide you through the process, and you can customize the installation by configuring environment variables. Find more details here:

Both methods use docker-compose, so make sure you have that installed. You will also have to work out a way to get the site live on the web once it's installed.

Hosted Gitea offers an all-in-one solution for getting Gitea online. It doesn't use Docker because Gitea is deployed directly to a VPS for you. It is run "bare metal" and installation, maintainance, backups and upgrades are taken care of for you. If you are looking for a fully managed Gitea solution then Hosted Gitea might be the solution for you.

Hosted Gitea is a fully managed Gitea hosting service. If you're looking for a private alternative to GitHub or Gitlab check out our service.

Get your Gitea server