Installation with Podman Quadlet
Similarly to Docker, Podman can be used to deploy Gitea.
This reference setup guides users through the setup based on Podman Quadlet. Podman Quadlet is the native integration of Podman through systemd.
To learn more about Podman Quadlet, see systemd units using Podman Quadlet.
This setup installs the quadlets in ~/.config/containers/systemd/, the directory for rootless quadlets, and uses the rootless images.
If you install them in a rootful directory such as /etc/containers/systemd/, use the rootful images instead.
Basics
Section titled “Basics”Since Podman v6.0 a single gitea.quadlets file can hold multiple quadlets separated by the --- delimiter.
Paste the following content into a file named gitea.quadlets
# FileName=gitea-data[Volume]VolumeName=gitea-data---# FileName=gitea-config[Volume]VolumeName=gitea-config---# FileName=gitea[Container]PublishPort=2222:2222PublishPort=3000:3000Image=docker.gitea.com/gitea:nightly-rootlessContainerName=giteaMount=type=volume,src=gitea-data.volume,destination=/var/lib/giteaMount=type=volume,src=gitea-config.volume,destination=/etc/gitea
[Service]Restart=always
[Install]# Start with the user sessionWantedBy=default.targetYou can run the installation command
$ podman quadlet install ./gitea.quadlets --application=gitea/home/user/.config/containers/systemd/gitea/gitea-data.volume/home/user/.config/containers/systemd/gitea/gitea-config.volume/home/user/.config/containers/systemd/gitea/gitea.containerThe --application=gitea flag allows us to tell podman to group the quadlets together, this can help for managing and organizing the quadlets files.
You can validate the quadlets are properly installed by looking at the list command
$ podman quadlet listNAME UNIT NAME PATH ON DISK STATUS APPLICATION PODgitea-config.volume gitea-config-volume.service /home/user/.config/containers/systemd/gitea/gitea-config.volume active/exited giteagitea-data.volume gitea-data-volume.service /home/user/.config/containers/systemd/gitea/gitea-data.volume active/exited giteagitea.container gitea.service /home/user/.config/containers/systemd/gitea/gitea.container failed/failed giteaYou can start the application by running systemctl --user start gitea command.
WantedBy=default.target starts the service when the user session starts.
Rootless user services do not run without a session, so to start Gitea at boot, enable lingering for the user with loginctl enable-linger $USER.
Databases
Section titled “Databases”PostgreSQL database
Section titled “PostgreSQL database”To start Gitea in combination with a PostgreSQL database, apply these changes to the
gitea.quadlets file created above.
To start Gitea with a database, we need to create a network, so the database and Gitea container can communicate.
# FileName=gitea-data[Volume]VolumeName=gitea-data---# FileName=gitea-config[Volume]VolumeName=gitea-config--- # FileName=gitea-postgres-data [Volume] VolumeName=gitea-postgres-data --- # FileName=gitea [Network] NetworkName=gitea --- # FileName=gitea-postgres [Container] Image=docker.io/library/postgres:18 ContainerName=gitea-postgres Network=gitea.network Mount=type=volume,src=gitea-postgres-data.volume,destination=/var/lib/postgresql Environment=POSTGRES_USER=gitea Environment=POSTGRES_PASSWORD=gitea Environment=POSTGRES_DB=gitea
[Service] Restart=always
[Install] # Start with the user session WantedBy=default.target ---# FileName=gitea [Unit] Requires=gitea-postgres.service After=gitea-postgres.service
[Container]PublishPort=2222:2222PublishPort=3000:3000Image=docker.gitea.com/gitea:nightly-rootlessContainerName=giteaMount=type=volume,src=gitea-data.volume,destination=/var/lib/giteaMount=type=volume,src=gitea-config.volume,destination=/etc/gitea Network=gitea.network Environment=GITEA__database__DB_TYPE=postgres Environment=GITEA__database__HOST=gitea-postgres:5432 Environment=GITEA__database__NAME=gitea Environment=GITEA__database__USER=gitea Environment=GITEA__database__PASSWD=gitea
[Service]Restart=always
[Install]# Start with the user sessionWantedBy=default.targetAs systemd manages the container we can use journalctl to access the logs
$ journalctl --user --follow --unit=gitea.servicegitea[5967]: 2026/09/03 14:50:42 cmd/web.go:263:runWeb() [I] Starting Gitea on PID: 2gitea[5967]: 2026/09/03 14:50:42 cmd/web.go:115:showWebStartupMessage() [I] Gitea version: 1.27.3 built with go1.26.7-X:jsonv2 : bindata, timetzdata,gitea[5967]: 2026/09/03 14:50:42 cmd/web.go:116:showWebStartupMessage() [I] * RunMode: prodgitea[5967]: 2026/09/03 14:50:42 cmd/web.go:117:showWebStartupMessage() [I] * AppPath: /usr/local/bin/giteagitea[5967]: 2026/09/03 14:50:42 cmd/web.go:118:showWebStartupMessage() [I] * WorkPath: /var/lib/giteagitea[5967]: 2026/09/03 14:50:42 cmd/web.go:119:showWebStartupMessage() [I] * CustomPath: /var/lib/gitea/customgitea[5967]: 2026/09/03 14:50:42 cmd/web.go:120:showWebStartupMessage() [I] * ConfigFile: /etc/gitea/app.inigitea[5967]: 2026/09/03 14:50:42 cmd/web.go:121:showWebStartupMessage() [I] Prepare to run install pagegitea[5967]: 2026/09/03 14:50:42 cmd/web.go:329:listen() [I] Listen: http://0.0.0.0:3000gitea[5967]: 2026/09/03 14:50:42 cmd/web.go:333:listen() [I] AppURL(ROOT_URL): http://localhost:3000/gitea[5967]: 2026/09/03 14:50:42 modules/graceful/server.go:52:NewServer() [I] Starting new Web server: tcp:0.0.0.0:3000 on PID: 2