← All templates · Developer tools
Deploy Gitea in one click
Git hosting with pull requests and issues
A self-hosted alternative to GitHub, GitLab, and Bitbucket.
What is Gitea?
Gitea is an open-source Git server, a lightweight alternative to GitHub that you run yourself. Each repository gets pull requests with code review, issues with labels, milestones and time tracking, kanban project boards and its own wiki. Gitea Actions runs CI/CD from YAML workflow files, and a built-in registry holds more than 20 kinds of packages, container images, npm, PyPI and Maven among them.
People self-host Gitea to keep code, issues and builds on a server they control, with no fee per user. It is built to be lightweight and fast, and it suits one developer's private repositories as well as a whole team's workflow. The catch is for companies: SAML single sign-on comes only with the paid Enterprise edition, while the free one signs people in through LDAP, OAuth 2.0 or OpenID Connect.
Hosting Gitea on Pethost
- You sign in to Pethost with a passkey, GitHub or Google. No machine yet? You pick a plan, and the link waits until it is ready.
- New project opens at Gitea. You fill in what it asks for and click Create project: Username, Email, Admin password.
- In a minute or two Gitea is live at its own address with HTTPS. Its secrets are made at random, and its data is in the nightly backup.
- It is a project like any other: you or your agent can change it, roll it back or restore it.
Questions about Gitea
Is Gitea free and open source?
Yes. Gitea is MIT-licensed and free to run on your own server. CommitGo, the company that leads the project, also sells Gitea Cloud, a managed service, and Gitea Enterprise, which adds audit logs and support under an SLA.
Gitea vs GitLab: what is the difference?
GitLab CE does more, and Gitea is lighter. Gitea's own comparison lists subgroups, confidential issues, a service desk and resolving merge conflicts in the browser as GitLab features it lacks, and marks low RAM and CPU use for Gitea alone.
Does Gitea have CI/CD like GitHub Actions?
Yes. Gitea Actions is built in and, as its docs put it, mostly compatible with GitHub Actions. Jobs run on Gitea Runner, a separate program that this template does not include: you deploy it and register it with your server.
How do I migrate a repository from GitHub to Gitea?
Choose New Migration, pick GitHub and paste the repository's URL; enter at least your username to bring its issues and pull requests too. Gitea can also keep the repository as a mirror that syncs periodically.
Can I use Git over SSH with Gitea on Pethost?
Yes. The template starts Gitea's built-in SSH server on port 2222 at the app's own address. Add your public key under Settings, SSH / GPG Keys, and each repository shows its SSH clone URL.
How much memory and disk does Gitea need?
Gitea is light: about 100 MB of memory, and the disk holds your repositories, a few gigabytes for most teams. On Pethost the Starter plan is enough for it, with room for other apps beside it.
Gitea Docker Compose file
The template is this compose.yaml and the variables written into the project’s .env as it is created. Pethost runs the file as it is written.
Containers: gitea (gitea/gitea:28-rootless).
Volumes, in the nightly backup: data, config.
services:
gitea:
image: gitea/gitea:28-rootless
restart: unless-stopped
environment:
GITEA__server__ROOT_URL: ${APP_URL}/
GITEA__server__SSH_DOMAIN: ${APP_HOST}
GITEA__server__SSH_PORT: "2222"
GITEA__server__SSH_LISTEN_PORT: "2222"
GITEA__server__START_SSH_SERVER: "true"
GITEA__database__DB_TYPE: sqlite3
GITEA__security__INSTALL_LOCK: "true"
GITEA__security__SECRET_KEY: ${GITEA_SECRET_KEY}
GITEA__security__REVERSE_PROXY_TRUSTED_PROXIES: "*"
GITEA__service__DISABLE_REGISTRATION: "true"
ADMIN_USERNAME: ${ADMIN_USERNAME}
ADMIN_EMAIL: ${ADMIN_EMAIL}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
# The image's entrypoint writes app.ini, then runs this: the administrator is made from
# the project's .env once, before the web server answers anyone.
command:
- sh
- -c
- |
set -e
gitea -c "$$GITEA_APP_INI" migrate
if ! gitea -c "$$GITEA_APP_INI" admin user list --admin | tail -n +2 | grep -q .; then
gitea -c "$$GITEA_APP_INI" admin user create --admin --must-change-password=false \
--username "$$ADMIN_USERNAME" --email "$$ADMIN_EMAIL" --password "$$ADMIN_PASSWORD"
fi
exec gitea -c "$$GITEA_APP_INI" web
ports:
- "2222:2222"
volumes:
- data:/var/lib/gitea
- config:/etc/gitea
volumes:
data:
config:
More in Developer tools
- code-serverVS Code in the browser
- KrokiDiagrams from text: PlantUML, Mermaid, Graphviz and more
- CoderRemote development environments from Terraform templates, opened in VS Code, JetBrains, a browser or over SSH
- HasuraInstant GraphQL and REST APIs over a Postgres database, with permissions, events and a web console
- InsForgeA backend for apps that coding agents build: Postgres, auth, storage and edge functions
- LibreDB StudioA SQL IDE in the browser for PostgreSQL, MySQL, SQLite, MongoDB, Redis and more