-
-
Notifications
You must be signed in to change notification settings - Fork 0
Forgejo Setup
Norm Brandinger edited this page Nov 20, 2025
·
1 revision
- First-Time Setup
- Database Configuration
- Admin Account Creation
- SSH Keys Setup
- GPG Keys for Signed Commits
- Git Operations
- Repository Management
Access Forgejo: http://localhost:3000
Initial setup wizard:
- Database Type: PostgreSQL
- Host:
postgres:5432 - Username:
forgejo - Password: (from Vault)
- Database Name:
forgejo - Application Name:
Colima Dev Git - Domain:
localhost - SSH Port:
2222 - Base URL:
http://localhost:3000
Database is automatically created during bootstrap:
CREATE DATABASE forgejo;
CREATE USER forgejo WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE forgejo TO forgejo;During first setup:
- Administrator Account Settings
- Username:
admin - Password: (choose secure password)
- Email:
admin@localhost
Generate SSH key:
ssh-keygen -t ed25519 -C "your@email.com"Add to Forgejo:
- Settings → SSH / GPG Keys
- Add Key
- Paste public key from
~/.ssh/id_ed25519.pub
Configure SSH:
# ~/.ssh/config
Host localhost
Port 2222
User git
IdentityFile ~/.ssh/id_ed25519Generate GPG key:
gpg --full-generate-keyAdd to Forgejo:
gpg --armor --export YOUR_KEY_ID
# Copy output and add in Settings → SSH / GPG KeysConfigure git:
git config --global user.signingkey YOUR_KEY_ID
git config --global commit.gpgsign trueClone repository:
# HTTP
git clone http://localhost:3000/username/repo.git
# SSH
git clone ssh://git@localhost:2222/username/repo.gitAdd remote:
git remote add origin http://localhost:3000/username/repo.git
git push -u origin mainCreate repository:
- New Repository button
- Repository Name
- Description (optional)
- Initialize with README (optional)
- Create Repository
Clone and push:
git clone http://localhost:3000/username/repo.git
cd repo
echo "# My Project" > README.md
git add README.md
git commit -m "Initial commit"
git push origin main