Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
  • Hardware
  • Programming
  • Databases
  • Multimedia
  • Windows

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Incus
  • Docker
    • Anisble snippets
    • Container
      • Gitea
      • HAProxy
      • Pi-hole
      • Roundcube
    • network
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
  • Ansible
  • GitLab
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid
  • container
  • git

Docker container on DockerHub
https://hub.docker.com/r/gitea/gitea

Docker installation
https://docs.gitea.io/en-us/install-with-docker/

apt -y install docker-compose

# Add second ip to hypervisor
ip a add 192.168.1.3 dev eth0:1

# Bound SSHD on hypervisor to specific IP
sed -i 's/#ListenAddress 0.0.0.0/ListenAddress 10.0.1.3/' /etc/ssh/sshd_config
service ssh restart

# OPTIONAL: create ZFS pool
zfs create -o mountpoint=/media/docker tank/docker

# create required directories
mkdir -p /media/docker/gitea/mysql /media/docker/gitea/data

cat < /media/docker/gitea/docker-compose.yml
version: "2"

networks:
  gitea:
    external: false

services:
  web:
    image: gitea/gitea:latest
    environment:
      - USER_UID=1000
      - USER_GID=1000
      - DB_TYPE=mysql
      - DB_HOST=db:3306
      - DB_NAME=gitea
      - DB_USER=gitea
      - DB_PASSWD=gitea
    restart: always
    networks:
      - gitea
    volumes:
      - /media/docker/gitea/data:/data
    ports:
       - 192.168.1.3:80:3000
       - 192.168.1.3:22:22
    depends_on:
      - db

  db:
    image: mariadb:latest
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=gitea
      - MYSQL_USER=gitea
      - MYSQL_PASSWORD=gitea
      - MYSQL_DATABASE=gitea
    networks:
      - gitea
    volumes:
      - /media/docker/gitea/mysql:/var/lib/mysql
EOF

# deploy container
cd /media/docker/gitea
docker-compose up -d

Post-install
http://GITEA_IP/install

Debug

# debug ports on hypervisor
netstat -tulpen | grep 22

# docker-compose ps
   Name                  Command               State                        Ports                      
-------------------------------------------------------------------------------------------------------
gitea_db_1    docker-entrypoint.sh mysqld      Up      3306/tcp                                        
gitea_web_1   /usr/bin/entrypoint /bin/s ...   Up      192.168.1.3:22->22/tcp, 192.168.1.3:80->3000/tcp

Change password

docker exec -it -u git gitea_web_1 bash
gitea admin change-password --username "foo@example.com" --password "pass1234"

Links
http://www.panticz.de/gitea

Profiles GitHub StackOverflow LinkedIn Xing
Contact Imprint
© panticz 2026

Cookie-Einstellungen

Diese Website nutzt eingebettete Inhalte von Drittanbietern (z.B. YouTube, SoundCloud). Beim Laden dieser Inhalte werden Daten an die jeweiligen Anbieter übermittelt. Datenverarbeitungserklärung