Self-Hosted Gitea Server
Guide to setting up a self-hosted Gitea server in an LXC containter on Proxmox
Why?
- Having a private git repo with a frontend for projects seperate from Github
 - Run the equivalent of Github Actions but locally
 
Goals at the end of the day
- Have a local private Gitea Server running, accessible on the local network
 
Resources
- Gitea
 - Proxmox Helper Scripts - Gitea
 - Proxmox Helper Scripts - PostgreSQL
 - PostgreSQL Post-Install
 - Permission Denied fix when initial Gitea setup
 
Requirements
The Gitea LXC container doesn't have a database, so we need to set one up. We will use a PostgreSQL LXC container.
How-To
Installing PostgreSQL
- 
Run the Proxmox Helper Script; Follow the prompts from the script and install Adminer
 - 
Follow the post-install guide up until creating the new database.
 - 
Create a new user named
giteaCREATE USER gitea WITH PASSWORD 'your-password';
 - 
Create a new database named
giteaCREATE DATABASE gitea;
 - 
Grant the user
giteaaccess to the databasegiteaGRANT ALL ON DATABASE gitea TO gitea;
 - 
Change the owner of the
giteadatabaseALTER DATABASE gitea OWNER TO gitea;
 
Installing Gitea
- Run the Proxmox Helper Script
 
End
We should now have a running gitea server with a postgreSQL database