Levelrail
Skip to content

Self-host Gitea with Docker ​

A lightweight, self-hosted Git service with issues, pull requests, and a package registry.

This page describes the Levelrail template for Gitea (Developer Tools). It deploys the services below as one Docker Compose app on your own server.

Project site: https://docs.gitea.com.

Recommended memory: about 512 MiB.

Services, ports and volumes ​

ServiceImageContainer portsVolumes
dbmariadb:11none
gitea_db_data -> /var/lib/mysql
giteagitea/gitea:1.23.13000, 22
gitea_data -> /data

Environment variables ​

ServiceVariableValue
dbMYSQL_DATABASEPreset in the template
dbMYSQL_PASSWORDGenerated at deploy
dbMYSQL_ROOT_PASSWORDGenerated at deploy
dbMYSQL_USERPreset in the template
giteaGITEA__database__DB_TYPEPreset in the template
giteaGITEA__database__HOSTPreset in the template
giteaGITEA__database__NAMEPreset in the template
giteaGITEA__database__PASSWDGenerated at deploy
giteaGITEA__database__USERPreset in the template

Passwords and keys marked as generated are created for you when the app is deployed and stored as secrets. Values are not shown here.

Deploy Gitea with Levelrail ​

In the dashboard, open Apps, choose New app, then Browse templates, and select Gitea. Review the Compose body and deploy.

With the CLI:

levelrail-cli templates deploy gitea --name my-gitea

See Service template catalog for how templates work, and Getting started if you have not installed Levelrail yet.

More Developer Tools templates ​

All templates are listed in the self-host gallery.

Released under the Apache 2.0 License.