noelukwa/localbase
localbase is a lightweight tool for provisioning secure .local domains. It simplifies the process of setting up local development environments with HTTPS support.
{ "createdAt": "2024-06-25T08:18:19Z", "defaultBranch": "main", "description": "localbase is a lightweight tool for provisioning secure .local domains. It simplifies the process of setting up local development environments with HTTPS support.", "fullName": "noelukwa/localbase", "homepage": "", "language": "Go", "name": "localbase", "pushedAt": "2025-08-16T01:20:56Z", "stargazersCount": 27, "topics": [ "golang", "localhost", "tunnel" ], "updatedAt": "2025-11-14T00:26:22Z", "url": "https://github.com/noelukwa/localbase"}LocalBase
Section titled “LocalBase”A secure, lightweight tool for provisioning .local domains with automatic HTTPS support. LocalBase simplifies local development by managing Caddy reverse proxy configurations and mDNS service discovery.
Features
Section titled “Features”- 🔒 Secure by default - Token-based authentication and TLS encryption
- 🚀 Zero-config HTTPS - Automatic certificate generation and management
- 🌐 mDNS integration - Automatic
.localdomain resolution - 🔄 Hot reloading - Dynamic domain addition/removal without restarts
- 🎯 Production ready - Comprehensive logging, error handling, and monitoring
- ⚡ Lightweight - Minimal resource usage with connection pooling
Requirements
Section titled “Requirements”Installation
Section titled “Installation”🚀 Quick Install (Recommended)
Section titled “🚀 Quick Install (Recommended)”curl -sSL https://raw.githubusercontent.com/noelukwa/localbase/main/install.sh | sudo sh🍺 Homebrew (Coming Soon)
Section titled “🍺 Homebrew (Coming Soon)”# Homebrew support coming soon# For now, use quick install or binary download💾 Binary Download
Section titled “💾 Binary Download”# Download latest release for your platformwget https://github.com/noelukwa/localbase/releases/latest/download/localbase_linux_x86_64.tar.gztar -xzf localbase_linux_x86_64.tar.gzsudo mv localbase /usr/local/bin/🛠️ Go Install
Section titled “🛠️ Go Install”go install github.com/noelukwa/localbase@latest🔧 Build from Source
Section titled “🔧 Build from Source”git clone https://github.com/noelukwa/localbase.gitcd localbasego build -o localbase .Quick Start
Section titled “Quick Start”-
Start LocalBase service:
Terminal window localbase start -
Add a domain (in another terminal):
Terminal window localbase add myapp --port 3000 -
Start your application on port 3000
-
Visit https://myapp.local 🎉
Service Management
Section titled “Service Management”# Start in foregroundlocalbase start
# Start in daemon modelocalbase start -d
# Stop servicelocalbase stop
# Check service statuslocalbase statusDomain Management
Section titled “Domain Management”# Add domain pointing to local servicelocalbase add hello --port 3000
# Remove domainlocalbase remove hello
# List all domainslocalbase list
# Health checklocalbase pingConfiguration
Section titled “Configuration”LocalBase stores configuration in:
- macOS:
~/Library/Application Support/localbase/ - Linux:
~/.config/localbase/ - Windows:
%APPDATA%\localbase\
Default configuration:
{ "caddy_admin": "http://localhost:2019", "admin_address": "localhost:2025"}Development
Section titled “Development”Running Tests
Section titled “Running Tests”go test ./... -vRunning Benchmarks
Section titled “Running Benchmarks”go test -bench=. -benchmemCode Coverage
Section titled “Code Coverage”go test -coverprofile=coverage.out ./...go tool cover -html=coverage.outContributing
Section titled “Contributing”- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Run tests (
go test ./...) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
Section titled “License”This project is licensed under the MIT License - see the [LICENSE]!(LICENSE) file for details.
Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”“Caddy not found”
# Install Caddybrew install caddy # macOSsudo apt install caddy # Ubuntu/Debian“Permission denied”
# Check file permissionsls -la ~/.config/localbase/“Connection refused”
# Check if service is runninglocalbase statusDebug Mode
Section titled “Debug Mode”Enable debug logging:
LOCALBASE_LOG_LEVEL=debug localbase start