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.
- 🔒 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
curl -sSL https://raw.githubusercontent.com/noelukwa/localbase/main/install.sh | sudo sh# Homebrew support coming soon
# For now, use quick install or binary download# Download latest release for your platform
wget https://github.com/noelukwa/localbase/releases/latest/download/localbase_linux_x86_64.tar.gz
tar -xzf localbase_linux_x86_64.tar.gz
sudo mv localbase /usr/local/bin/go install github.com/noelukwa/localbase@latestgit clone https://github.com/noelukwa/localbase.git
cd localbase
go build -o localbase .-
Start LocalBase service:
localbase start
-
Add a domain (in another terminal):
localbase add myapp --port 3000
-
Start your application on port 3000
-
Visit https://myapp.local 🎉
# Start in foreground
localbase start
# Start in daemon mode
localbase start -d
# Stop service
localbase stop
# Check service status
localbase status# Add domain pointing to local service
localbase add hello --port 3000
# Remove domain
localbase remove hello
# List all domains
localbase list
# Health check
localbase pingLocalBase 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"
}go test ./... -vgo test -bench=. -benchmemgo test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out- 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
This project is licensed under the MIT License - see the LICENSE file for details.
"Caddy not found"
# Install Caddy
brew install caddy # macOS
sudo apt install caddy # Ubuntu/Debian "Permission denied"
# Check file permissions
ls -la ~/.config/localbase/"Connection refused"
# Check if service is running
localbase statusEnable debug logging:
LOCALBASE_LOG_LEVEL=debug localbase start