Lion Cipher Lab
Self-host your own Git server with Gitea and Docker
- Cyber / Security Engineer
- Beginner
- ~45 min
- Free · no account required
Why it matters
Knowing Git is one thing; understanding where your repositories actually live is another. Self-hosting a Git server strips the mystery out of "the remote" — you see with your own eyes that a remote is just a service on a machine, reachable over HTTPS or SSH, that stores your commits. That mental model pays off everywhere: debugging push and clone errors, setting up private repositories for work you can't put on a public host, and reasoning about who can reach a service you expose. Gitea makes it approachable because the entire server is one small open-source program that runs from a single…
What you'll learn
- self-hosting a Git server
- running Gitea in Docker
- Docker volumes and port mapping
- Git remotes over HTTPS and SSH
- SSH keys
- basic service hardening and backups
Steps in this lab
- Why self-host your code at all
- What you need before you start
- Launch Gitea in a container
- Finish setup and create your first user
- Create a repository and push to it over HTTPS
- Switch to SSH keys — the safer, password-free way to push
- Security basics: do not expose it unhardened, and back it up
- What you actually built — and why it matters