Deploy Gitea on Pethost in one click
Git hosting with pull requests and issues
What happens
- You sign in to Pethost or make an account, with a passkey, GitHub or Google.
- No machine yet? You pick a plan, and we prepare one for you. The link waits in your browser until it is ready.
- New project opens at the app, and you click Create project.
- In a minute or two the app is live at its own address with HTTPS. Its secrets are made for it at random, and its data is in the nightly backup.
- It is a project like any other: its compose.yaml, its .env, its logs and a terminal are in the panel, and your agent can change it, roll it back or restore it.
First steps
Open the address and register: the first account becomes the administrator, and later ones wait for its approval. Do it right away: until then the page is open to whoever has the address. To close registration add GITEA_DISABLE_REGISTRATION=true to the project’s .env and deploy again. Git over SSH is at gitea.sam.pethost.app, port 2222.
What it runs
The template is this compose.yaml and the variables it writes into the project’s .env. Pethost runs the file as it is written.
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: ${GITEA_DISABLE_REGISTRATION:-false}
GITEA__service__REGISTER_MANUAL_CONFIRM: "true"
ports:
- "2222:2222"
volumes:
- data:/var/lib/gitea
- config:/etc/gitea
volumes:
data:
config: