Back to all templates
Gitea logo

Gitea

Development256MB+ RAM

Lightweight self-hosted Git service

gitversion-controlgithub-alternative

Deploy Gitea in 3 Steps

1

Connect Your VPS

Add your server credentials to Server Compass

2

Select Gitea

Choose from our template library

3

Deploy & Configure

Fill in settings and click Deploy

No Docker knowledge required
Step-by-step deployment guide

Deploy Gitea on a VPS with Server Compass

Use the Gitea template in Server Compass to deploy a self-hosted Git service with PostgreSQL on your VPS, then verify the Gitea initial configuration screen in a browser.

About 10 minutesBrowser verified
1
Step 1

Open the server Apps tab

Select the tutorial-vps VPS, open the Apps tab, and start a new app deployment. Keep sensitive server details hidden before capturing or sharing screenshots.

Server Compass Apps tab before creating a Gitea app
2
Step 2

Choose an app template

Click New App and choose the template deployment path so Server Compass can load the built-in catalog.

Choosing to deploy an app from a Server Compass template
3
Step 3

Search for Gitea

Use the template picker search to find Gitea in the Server Compass template catalog.

Searching for Gitea in the Server Compass template picker
4
Step 4

Select the Gitea template

Choose the Gitea template. Server Compass fills the Gitea service, PostgreSQL service, persistent Git data and database volumes, and the required database password.

Gitea template selected in Server Compass
5
Step 5

Review the Gitea settings

Confirm the app name and compose services. In this run, the app was named gitea-demo and used host port 3000.

Reviewing Gitea project settings and compose services
6
Step 6

Deploy Gitea

Review the generated environment values, keep the database password masked, confirm the web and SSH ports are available, and click Deploy Now.

Reviewing Gitea environment variables and port before deployment
7
Step 7

Watch the deployment progress

Keep the deployment modal open while Server Compass uploads the compose file, pulls the Gitea and PostgreSQL images, starts the containers, and verifies the stack.

Server Compass deploying the Gitea template on the VPS
8
Step 8

Confirm Gitea is running

After deployment finishes, return to the Apps tab and confirm the Gitea app is marked Running with its application URL available.

Gitea template running in the Server Compass Apps tab
9
Step 9

Open Gitea in the browser

Click Open Application or open the application URL in a browser. The Gitea initial configuration screen confirms the deployed Git service is reachable and ready for final setup.

The deployed Gitea initial configuration screen loaded in a browser

After Gitea Opens

  • Complete the Gitea installation wizard and create the first administrator account.
  • Store the administrator credentials in a secure password manager.
  • Keep the database password masked in screenshots and docs.
  • Add a domain and HTTPS before inviting users or pushing repositories over the public internet.
  • Configure SSH clone URLs and user SSH keys before using Git over SSH.
  • Back up both the Gitea data volume and the PostgreSQL data volume before hosting production repositories.

Verified Result

The Gitea app loaded successfully in a browser and displayed the initial configuration screen.

Gitea deployment questions

What does the Gitea template deploy?

It deploys the official Gitea container with PostgreSQL 16, a persistent Gitea data volume, a persistent database volume, web access on port 3000, and Git SSH access on port 2222 by default.

Which port did the tutorial use?

The tutorial used host port 3000, which maps to the Gitea web UI on container port 3000.

Why does the browser verification stop at the initial configuration screen?

A fresh Gitea deployment is considered reachable when the initial configuration screen loads. Completing the wizard creates real administrator credentials, so the public guide stops before account creation.

Should this become a blog post?

No. The deployment guide should live on the Gitea template detail page and be linked from the reusable template deployment docs page.

Do It Yourself

Deploy Gitea via Command Line

Prefer the command line? Follow this step-by-step guide to deploy Gitea manually on your VPS.

1

Connect to Your Remote Server

Begin by establishing a secure connection to your server through the terminal.

terminal
# Access your VPS
ssh root@YOUR_SERVER_IP

# With SSH key authentication
ssh -i ~/.ssh/your-private-key root@YOUR_SERVER_IP

First time? Ensure Docker is installed first: curl -fsSL https://get.docker.com | sh

2

Set Up Your App Folder

Create a dedicated folder for your application files.

terminal
# Create and navigate to project directory
mkdir -p ~/apps/gitea
cd ~/apps/gitea
3

Set Up Docker Compose

Create the following docker-compose.yml in your project directory:

docker-compose.yml
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:
Configuration Variables
PORTWeb port(default: 3000)
SSH_PORTSSH port(default: 2222)
DB_PASSWORDDB password
4

Spin Up the Stack

Run Docker Compose to launch your application.

terminal
# Launch the stack
docker compose up -d

# Verify container status
docker compose ps

# Follow the logs
docker compose logs --follow
5

Open the Application Port

Configure UFW to allow traffic to your application.

terminal
# Allow the application port through firewall
sudo ufw allow 3000/tcp
sudo ufw reload

# Access your app at:
# http://your-server-ip:3000
Skip the Terminal

Make 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
Download Server Compass$29 one-time • Lifetime license

After Deployment

After deploying Gitea with Server Compass, complete these steps to finish setup

1

Complete installation wizard

2

Create admin account

3

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.

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