Overview
This guide walks you through the complete configuration process, from cloning the repository to starting the server.Configuration Loading
gitGost uses a simple configuration system that loads settings from environment variables with sensible defaults.Configuration is loaded via
internal/config/config.go:24 using the Load() function.Load Order
1
Environment Variables
The application first looks for environment variables in the system.
2
.env File
If a
.env file exists in the working directory, it’s loaded automatically via godotenv.Load() (see cmd/server/main.go:24).3
Defaults
If a variable is not set, the application falls back to built-in defaults.
Complete Setup Workflow
1. Clone and Build
2. Create Configuration File
Copy the example environment file:.env with your configuration:
.env
3. Verify Configuration
Before starting the server, verify your configuration:4. Start the Server
5. Verify Deployment
Test that the service is running:Repository Configuration (.gitgost.yml)
To signal that a repository welcomes anonymous contributions, add a.gitgost.yml file to the repository root:
.gitgost.yml
This file is optional but recommended for transparency. It signals to contributors that anonymous PRs are accepted.
Badge Support
Repositories with.gitgost.yml can use the verified badge:
Configuration Reference
Config Structure
The configuration is loaded into aConfig struct defined in internal/config/config.go:10-21:
Default Values
Production Hardening
Reverse Proxy Setup (nginx)
Systemd Service
Create/etc/systemd/system/gitgost.service:
Troubleshooting
Common Issues
Server starts but pushes fail
Server starts but pushes fail
Cause:
GITHUB_TOKEN is invalid or lacks repo permissions.Solution:- Verify token at https://github.com/settings/tokens
- Ensure the
reposcope is selected - Regenerate if necessary
- Update
.envand restart the server
Stats not persisting
Stats not persisting
Cause: Supabase is not configured or credentials are invalid.Solution:
- Check
SUPABASE_URLandSUPABASE_KEYin.env - Test connection:
curl "$SUPABASE_URL/rest/v1/" -H "apikey: $SUPABASE_KEY" - If 401, regenerate the key from Supabase dashboard
Port 8080 already in use
Port 8080 already in use
Cause: Another service is using port 8080.Solution:
- Change
PORTin.envto an available port (e.g.,8081) - Update firewall rules and reverse proxy configuration
- Restart the server
Admin panic endpoint returns 401
Admin panic endpoint returns 401
Cause: Incorrect
PANIC_PASSWORD or missing header.Solution:Next Steps
Environment Variables
Complete reference of all configuration options
Docker Deployment
Deploy using Docker with compose examples
API Reference
Explore the gitGost API endpoints