# Setup gitea on rasberry 64bit - [Reference](https://pimylifeup.com/raspberry-pi-gitea/) - Ensure Raspbian up-to-date ``` sudo apt update sudo apt upgrade ``` - Install mySQL Server ``` sudo apt install git mariadb-server -y ``` - Disable git user login ``` sudo adduser --disabled-login --gecos 'Gitea' git ``` - Setup mySQL Database. Enter 'Y' for all question ``` sudo mysql_secure_installation ``` ``` sudo mysql -u root ``` - Allow from localhost ONLY ``` CREATE DATABASE gitea; GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'localhost' IDENTIFIED BY 'ENTERPASSWORD'; FLUSH PRIVILEGES; exit ``` - Allow from subnet ONLY (172.24.*.*) ``` CREATE DATABASE gitea; GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'172.24.%' IDENTIFIED BY 'ENTERPASSWORD'; FLUSH PRIVILEGES; exit ``` ``` sudo su git ``` ``` cd ~ mkdir gitea cd gitea wget https://dl.gitea.io/gitea/1.17.2/gitea-1.17.2-linux-arm64 -O gitea chmod +x gitea exit sudo nano /etc/systemd/system/gitea.service ``` ``` [Unit] Description=Gitea (Git with a cup of tea) After=syslog.target After=network.target [Service] # Modify these two values ​​and uncomment them if you have # repos with lots of files and get to HTTP error 500 because of that ### # LimitMEMLOCK=infinity # LimitNOFILE=65535 RestartSec=2s Type=simple User=git Group=git WorkingDirectory=/home/git/gitea ExecStart=/home/git/gitea/gitea web Restart=always Environment=USER=git HOME=/home/git [Install] WantedBy=multi-user.target ``` ``` sudo systemctl enable gitea.service sudo systemctl start gitea.service ``` - Start install gitea ``` http://192.168.0.143:3000 ``` - Main configuration - Domain : homenetyth - SSH port: 29419 - Application URL : https://homenetyth.ddnsking.com/