Files
silverlinux-infra/gitea

Gitea

Overview

Gitea is the self-hosted Git platform used by Silver Solutions.

It provides:

  • Git repository hosting
  • Pull requests
  • Issue tracking
  • Wiki support
  • Releases
  • CI/CD integration
  • Package registry support

Gitea serves as the central source control platform for SilverLinux infrastructure and application development.


Service Information

URL

https://git.silveressence.net

Container Name

gitea

Image

gitea/gitea:latest

Docker Networks

proxy
internal

Purpose

Gitea is used for:

  • Source control
  • Infrastructure repositories
  • Application repositories
  • Pull requests
  • Issue management
  • Release management
  • Gitea Actions CI/CD pipelines

Database

Database:

gitea

Database Host:

postgres

Database User:

postgres

Current password source:

POSTGRES_ROOT_PASSWORD

Stored in:

Infisical

Future improvement:

Create a dedicated Gitea database user and password.


Email Configuration

Sender Address:

noreply@silveressence.net

Purpose:

  • Password reset emails
  • Account notifications
  • Repository notifications
  • User invitations

SMTP secrets are provided by Infisical at runtime.

These values are resolved during deployment by infisical run.

Variables:

SMTP_HOST
SMTP_PORT
SMTP_USERNAME
SMTP_PASSWORD

Authentication

Current

  • Local user accounts
  • Email login
  • Password login

Disabled

OpenID authentication is disabled.

Reason:

OpenID is not required and increases the attack surface.

Planned

Future authentication providers:

  • Google OAuth2
  • GitHub OAuth2

Purpose:

  • Easier onboarding of freelancers
  • Easier onboarding of external collaborators
  • Reduced password management

SSH Access

SSH Domain:

git.silveressence.net

SSH Port:

2222

Clone example:

git clone ssh://git@git.silveressence.net:2222/username/repository.git

Data Storage

Application Data:

/srv/docker/gitea/data

Contains:

  • Repositories
  • Attachments
  • Configuration
  • Actions data
  • Package registry data
  • User information

This directory is critical and must be included in backups.


Gitea Actions

Gitea Actions is enabled in app.ini and available globally.

Status:

Operational

Global Runner

Property Value
Location /srv/docker/gitea-runner
Image gitea/act_runner:latest
Name silverlinux-runner
Type Global Runner
Status Operational

Labels:

  • ubuntu-latest
  • ubuntu-24.04
  • ubuntu-22.04

The runner registration token is loaded from GITEA_RUNNER_REGISTRATION_TOKEN in Infisical through slcompose.

Package Publishing

Silver 2.0 uses .gitea/workflows/package.yml to build and publish NuGet packages to BaGet. A push to net-8-version triggers packaging when the commit message contains [Package].

The publishing credential is stored as the repository Actions secret BAGET_API_KEY.


Secrets

Gitea and its Actions runner use infrastructure secrets stored in:

Infisical

Variables:

POSTGRES_ROOT_PASSWORD

SMTP_HOST
SMTP_PORT
SMTP_USERNAME
SMTP_PASSWORD

GITEA_RUNNER_REGISTRATION_TOKEN

The Gitea container uses the database and SMTP variables. The Actions runner uses GITEA_RUNNER_REGISTRATION_TOKEN.

Future variables:

GOOGLE_CLIENT_ID
GOOGLE_CLIENT_SECRET

GITHUB_CLIENT_ID
GITHUB_CLIENT_SECRET

Docker Configuration

Volume Mapping:

/srv/docker/gitea/data:/data

Port Mapping:

2222:22

Networks:

proxy
internal

HTTP traffic is routed through Nginx Proxy Manager.


Administration

View Logs:

docker logs gitea

Restart Service:

docker restart gitea

Open Shell:

docker exec -it gitea bash

Backup Requirements

The following items must be backed up:

Database

gitea

Application Data

/srv/docker/gitea/data

Secrets

Infisical service paths for Gitea and the Gitea runner

Without these items, a complete restoration is not possible.


Recovery Checklist

To restore Gitea:

  1. Restore PostgreSQL database.
  2. Restore Gitea data directory.
  3. Restore or reauthorize Infisical access and service secret paths.
  4. Deploy Docker Compose stack.
  5. Verify SMTP configuration.
  6. Verify SSH access.
  7. Verify access through Nginx Proxy Manager.

Future Roadmap

Short Term

  • Enable 2FA for administrator accounts
  • Configure backup automation
  • Configure Google OAuth2
  • Configure GitHub OAuth2

Long Term

  • Deploy applications directly from Gitea
  • Expand package publishing to additional repositories

  • PostgreSQL
  • Nginx Proxy Manager
  • OpenProject
  • Portainer
  • BaGet
  • Gitea Actions Runner

  • docs/server.md
  • docs/security.md
  • docs/secrets.md
  • docs/backups.md
  • postgres/README.md
  • docs/cicd.md