
Gitea
Lightweight self-hosted Git service
Deploy Gitea in 3 Steps
Connect Your VPS
Add your server credentials to Server Compass
Select Gitea
Choose from our template library
Deploy & Configure
Fill in settings and click Deploy
Deploy Gitea via Command Line
Prefer the command line? Follow this step-by-step guide to deploy Gitea manually on your VPS.
Connect to Your Remote Server
Begin by establishing a secure connection to your server through the terminal.
# Access your VPS
ssh root@YOUR_SERVER_IP
# With SSH key authentication
ssh -i ~/.ssh/your-private-key root@YOUR_SERVER_IPFirst time? Ensure Docker is installed first: curl -fsSL https://get.docker.com | sh
Set Up Your App Folder
Create a dedicated folder for your application files.
# Create and navigate to project directory
mkdir -p ~/apps/gitea
cd ~/apps/giteaSet Up Docker Compose
Create the following docker-compose.yml in your project directory:
services:
gitea:
image: gitea/gitea:latest
ports:
- "3000:3000"
- "2222:22"
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=db:5432
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=<your-db-password>
volumes:
- gitea_data:/data
restart: unless-stopped
depends_on:
db:
condition: service_healthy
db:
image: postgres:16-alpine
environment:
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=<your-db-password>
- POSTGRES_DB=gitea
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U gitea"]
interval: 10s
timeout: 5s
retries: 5
volumes:
gitea_data:
postgres_data:
PORTWeb port(default: 3000)SSH_PORTSSH port(default: 2222)DB_PASSWORDDB passwordSpin Up the Stack
Run Docker Compose to launch your application.
# Launch the stack
docker compose up -d
# Verify container status
docker compose ps
# Follow the logs
docker compose logs --followOpen the Application Port
Configure UFW to allow traffic to your application.
# Allow the application port through firewall
sudo ufw allow 3000/tcp
sudo ufw reload
# Access your app at:
# http://your-server-ip:3000Make it simple with Server Compass.
Deploy Gitea with a beautiful UI instead. No SSH, no YAML editing, no terminal commands. Just click, configure, and deploy in under 3 minutes.
- No terminal required
- Point-and-click setup
- Auto SSL certificates
- Rolling deployments
- Health monitoring
- Instant rollbacks
After Deployment
After deploying Gitea with Server Compass, complete these steps to finish setup
Complete installation wizard
Create admin account
Configure SSH key
Need help? Check out our documentation for detailed guides.
Gitea FAQ
Common questions about self-hosting Gitea
How do I deploy Gitea with Server Compass?
Simply download Server Compass, connect to your VPS, and select Gitea from the templates list. Fill in the required configuration and click Deploy. The entire process takes under 3 minutes.
What are the system requirements for Gitea?
Gitea requires a minimum of 256MB RAM. We recommend a VPS with at least 1024MB RAM for optimal performance. Any modern Linux server with Docker support will work.
Can I migrate my existing Gitea data?
Yes! Server Compass provides volume mapping that allows you to import existing data. You can also use standard Gitea backup and restore procedures.
How do I update Gitea to the latest version?
Server Compass makes updates easy. Simply click the Update button in your deployment dashboard, and the latest Gitea image will be pulled and deployed with zero downtime.
Is Gitea free to self-host?
Gitea is open-source software. You only pay for your VPS hosting (typically $5-20/month) and optionally Server Compass ($29 one-time). No subscription fees or per-seat pricing.
Related Templates
View all Development
PocketBase
Open-source backend in a single file with realtime database, auth, and file storage

Appwrite
Open-source backend-as-a-service - self-hosted Firebase alternative

Parse Server
Open-source backend framework with dashboard

Supabase
Full Supabase self-hosted with Kong, GoTrue Auth, Realtime, and Studio
Ready to Self-Host Gitea?
Download Server Compass and deploy Gitea to your VPS in under 3 minutes. No Docker expertise required.
Download Server Compass