Production-Ready Self-Hosted GitHub Gist Alternative - v1.0.0
CasGists is a production-ready, self-hosted GitHub Gist alternative designed for non-technical self-hosters and small/medium businesses. It provides a secure, feature-rich platform for managing code snippets with enterprise-grade security and ease of use.
π Version 1.0.0 Release - Production-ready with complete features, enterprise security, and professional deployment options.
- π Security First: 2FA/TOTP, WebAuthn, audit logs, GDPR compliance
- β‘ Zero Dependencies: Single binary with embedded SQLite, no external services required
- π₯ Enterprise Ready: Organizations, teams, RBAC, LDAP/SAML integration
- π Intelligent Search: Full-text search with FTS5/Redis, advanced filtering
- π¨ Modern UI: Progressive Web App with dark/light themes, mobile-first design
- π Full Git Integration: Real Git repos, branching, history, webhooks with HMAC signing
- Organizations & Teams - Multi-level hierarchy with role-based permissions
- Compliance Ready - GDPR, SOC2, HIPAA with data export/deletion
- Audit Logging - Complete activity tracking for compliance
- Single Sign-On - SAML 2.0, OAuth2, LDAP/Active Directory
- API & Webhooks - REST API with scoped tokens, real-time webhooks
- Migration Tools - Import from GitHub, GitLab, OpenGist
# Download latest release
wget https://github.com/casapps/casgists/releases/latest/download/casgists-linux-amd64
chmod +x casgists-linux-amd64
# Install as system service
sudo ./casgists-linux-amd64 install --port 64080
# Start the service
sudo systemctl start casgists
sudo systemctl enable casgists
# Visit http://localhost:64080 to complete setup wizard# Using Docker Compose (recommended)
curl -o docker-compose.yml https://raw.githubusercontent.com/casapps/casgists/main/docker-compose.yml
docker-compose up -d
# Or run directly with persistent data
docker run -d \
--name casgists \
-p 64080:64080 \
-v casgists_data:/data \
casapps/casgists:latestDownload the latest binary for your platform from our releases page:
- Linux:
casgists-linux-amd64,casgists-linux-arm64 - macOS:
casgists-darwin-amd64,casgists-darwin-arm64 - Windows:
casgists-windows-amd64.exe
# Download and run
./casgists-linux-amd64
# Visit http://localhost:64080 to complete setup wizardAfter installation, CasGists will guide you through an 8-step setup wizard to configure:
- Admin Account - Create your first admin user
- Database - Choose SQLite, PostgreSQL, or MySQL
- Server Settings - Configure port and URL
- Email - Optional SMTP configuration
- Authentication - Enable 2FA, WebAuthn, SSO
- Features - Enable organizations, registration, etc.
- Storage - Configure data directory and backups
- Review - Confirm and apply configuration
Once setup is complete, you can:
- Create and manage gists
- Organize with organizations and teams
- Configure webhooks and integrations
- Import existing gists from GitHub/GitLab/OpenGist
- Enable enterprise features as needed
CasGists can be configured using environment variables or the web-based setup wizard.
# Database (required)
CASGISTS_DB_TYPE=sqlite # sqlite|postgresql|mysql
CASGISTS_DB_PATH=/data/casgists.db # For SQLite
# Network (optional)
CASGISTS_LISTEN_PORT=64001 # Default: random port 64000-64999
CASGISTS_SERVER_URL=https://gists.example.com
# Security (auto-generated if not set)
CASGISTS_SECRET_KEY=your-secret-key
# Storage (optional)
CASGISTS_DATA_DIR=/data # Main data directoryCASGISTS_SMTP_HOST=smtp.gmail.com
CASGISTS_SMTP_USERNAME=your-email@gmail.com
CASGISTS_SMTP_PASSWORD=your-app-password
CASGISTS_SMTP_FROM_EMAIL=noreply@example.comCASGISTS_FEATURES_REGISTRATION=true # Allow new user registration
CASGISTS_FEATURES_ORGANIZATIONS=true # Enable organizations
CASGISTS_FEATURES_SOCIAL=true # Enable social featuresCasGists is built with:
- Backend: Go with Echo web framework
- Database: SQLite (default), PostgreSQL, MySQL via GORM
- Frontend: Server-rendered HTML with HTMX and modern CSS
- Authentication: JWT tokens with 2FA and WebAuthn support
- Storage: Local filesystem or S3-compatible storage
- Search: Redis/Valkey (preferred) or SQLite FTS (fallback)
- Version Control: go-git library (no external Git dependency)
- Multi-factor Authentication: TOTP and WebAuthn/Passkeys
- Audit Logging: Complete audit trail of all actions
- Rate Limiting: Configurable rate limits for all endpoints
- Content Security Policy: Comprehensive CSP headers
- Input Validation: Rigorous input validation and sanitization
- Compliance Ready: GDPR, SOC2, and HIPAA compliance features
CasGists is released under the MIT License. See LICENSE.md for details.
- GitHub Discussions - Questions and discussions
- GitHub Issues - Bug reports and feature requests
See our public roadmap for upcoming features and improvements.
# Clone repository
git clone https://github.com/casapps/casgists.git
cd casgists
# Install dependencies
go mod download
# Build binary
make build
# Run the binary
./binaries/casgists
# Run tests
make test
# Build Docker image
make docker
# Build multi-platform release
make releasecasgists/
βββ src/ # All source code
β βββ cmd/casgists/ # Main application entry point
β βββ internal/ # Internal packages
β βββ web/ # Web assets (embedded)
βββ scripts/ # Production/install scripts
βββ tests/ # Development/test scripts
βββ binaries/ # Built binaries
βββ docs/ # Documentation (ReadTheDocs)
βββ Makefile # Build system
βββ Dockerfile # Docker build
βββ release.txt # Semantic version
# Build for current platform
make build
# Build Docker image
make docker
# Build multi-platform release
make release
# Clean build artifacts
make clean# Run all tests
make test
# Run specific tests
go test ./src/internal/server/...We welcome contributions! To contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests (
make test) - Build the project (
make build) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please ensure:
- All tests pass
- Code follows Go conventions
- Documentation is updated
- Commit messages are clear
CasGists is inspired by and builds upon the work of several open source projects:
- OpenGist - The original inspiration
- Gitea - Git management concepts
- Echo - Web framework
- GORM - Database ORM
Made with β€οΈ by the CasApps team