SEC.01

The playbook

The run starts read-only: the recon probes decide what happens next. The steps that follow are adapted to the distribution and state found — a real machine is rarely clean.

  1. 01recondistro and version: apt (Debian/Ubuntu) or dnf (RHEL/Fedora/Rocky/Alma)?
  2. 02reconDocker Engine + compose plugin present and service active? (podman-docker or snap Docker: report it, do not mix)
  3. 03recongitea already deployed (container, volumes, /opt/gitea)? healthy → verify and skip; never overwrite or delete
  4. 04reconport 3000 (or the one from the port variable) already taken, and by what? empty = free; taken → ask for another port (ask_user)
  5. 05reconport 222 (Git SSH, or the one from the ssh_port variable) already taken, and by what? empty = free; taken → ask for another port (ask_user)
  6. 06recononly if a domain is provided: is a reverse proxy already on 80/443? (reuse it rather than installing a second one)
  7. 07reconis a firewall (ufw or firewalld) active?
  8. 08actInstall Docker Engine + Compose (only if missing)verify
  9. 09actWrite /opt/gitea (compose + .env)verify
  10. 10actDeclare the public URL (only if a domain is provided)verify
  11. 11actStart the stackverify
  12. 12actResponds over HTTPverify
  13. 13actOpen the Git SSH port (only if a firewall is active)verify
  14. 14actInstall Caddy (only if a domain is provided and no reverse proxy)verify
  15. 15actHTTPS reverse proxy (only if a domain is provided)verify
  16. 16actOpen 80/443 (only if a domain is provided and a firewall is active)verify

SEC.02

What it verifies

Each step ships its own check. The run only moves on when the check passes, so what the recipe reports as done is what is actually on the server.

  1. 01Install Docker Engine + Compose (only if missing)Verified bydocker compose version && systemctl is-active docker
  2. 02Write /opt/gitea (compose + .env)Verified bycd /opt/gitea && docker compose config --quiet && echo ok
  3. 03Declare the public URL (only if a domain is provided)Verified bygrep -c "^GITEA__server__" /opt/gitea/.env
  4. 04Start the stackVerified bydocker inspect -f '{{.State.Status}}' gitea
  5. 05Responds over HTTPVerified bycurl -s -o /dev/null -w '%{http_code}' --retry 20 --retry-delay 5 --retry-connrefused http://127.0.0.1:${port}/api/healthz
  6. 06Open the Git SSH port (only if a firewall is active)Verified byufw status 2>/dev/null | grep ALLOW; firewall-cmd --list-ports 2>/dev/null; true
  7. 07Install Caddy (only if a domain is provided and no reverse proxy)Verified bycaddy version && systemctl is-active caddy
  8. 08HTTPS reverse proxy (only if a domain is provided)Verified bycurl -s -o /dev/null -w '%{http_code}' --retry 6 --retry-delay 5 https://${domain}/
  9. 09Open 80/443 (only if a domain is provided and a firewall is active)Verified byufw status 2>/dev/null | grep ALLOW; firewall-cmd --list-ports 2>/dev/null; true

SEC.03

Guardrails

Non-negotiable instructions the run must respect, whatever it finds on the server.

Gitea already running → verify and report, recreate nothing. Never touch the host sshd (port 22): Gitea uses its own SSH port. The web UI stays on 127.0.0.1. Finish the installation wizard right away and create the admin account in it: otherwise the first user to sign up becomes admin. Never delete /opt/gitea/gitea.

SEC.04

Variables

What you choose before launching — the recipe fills in the rest.

NameMeaning
${domain}Domain (optional, enables HTTPS)
${port}Local port (127.0.0.1)
${ssh_port}Git SSH port (public)

SEC.05

How a recipe runs in Servor

Servor is zero-knowledge: the platform cannot execute anything on its own. When you launch this recipe, a run reads the reconnaissance, plans the steps and asks for your approval. Each approved command is signed by your browser — with a key the server never sees — then relayed verbatim to the agent, which verifies the signature locally before executing.

recipe — fail2ban_setup150+ in catalogue
security4 steps · low risk · idempotentrun
reconsshd present? ufw active? existing jails?✓
actinstall fail2ban · write default jails✓
actenable service · restart sshd (safe)✓
verifytest ban 60s · jails active · sshd alive✓

search by intent — type “firewall”, get ufw

  • 01Read-only reconnaissance before any change
  • 02Every command signed by your browser, approved by you
  • 03Each step verified before the run moves on, every run kept in the history

SEC.06

Deploy on Servor button

Maintain Gitea or a project that needs it? Put this button in your README or on your site: one click and your users install it on their own server.

Deploy on ServorDark background
Deploy on ServorLight background
[![Deploy on Servor](https://servor.app/badges/deploy-on-servor.svg)](https://servor.app/deploy/install-gitea)

SEC.07

Verified recipe

Run this recipe on your server

Connect a server, launch the recipe, and approve each step as Servor executes and verifies it. Free plan, no card required.