Sysara is a modern, web-based system management platform built with Go, designed to provide comprehensive server administration, monitoring, and configuration management through an intuitive web interface.
- User Authentication: Secure login/logout with session management
- User CRUD Operations: Create, read, update, and delete user accounts
- Password Security: BCrypt password hashing
- Session Management: Secure session handling with Gorilla Sessions
- Multi-Environment Support: Manage
.env
,.env.production
,.env.testing
, etc. - Web-Based Editor: Edit environment files directly from the web interface
- Automatic Backup: Creates backups before saving changes
- Syntax Validation: Basic validation for environment file format
- Key Storage: Securely store and manage SSH public keys
- Format Validation: Validates SSH key formats (RSA, Ed25519, ECDSA)
- Fingerprint Generation: Automatic fingerprint generation
- User Association: Keys are associated with specific users
- Real-Time Metrics: Live CPU, Memory, Disk, and Network monitoring
- Process Management: View running processes with CPU and memory usage
- System Information: Display host information, uptime, and OS details
- Auto-Refresh: HTMX-powered automatic updates every 5 seconds
- Responsive Design: Built with Tailwind CSS for mobile-first design
- Interactive Elements: HTMX for seamless user interactions
- Real-Time Updates: Dynamic content updates without page reloads
- Accessibility: WCAG-compliant interface design
- Backend: Go 1.21+ with Gin web framework
- Database: SQLite with GORM ORM
- Frontend: HTML templates + HTMX + Tailwind CSS
- Authentication: Gorilla Sessions with BCrypt
- Monitoring: gopsutil for system metrics
- Deployment: Systemd service with installer script
- Go 1.21 or higher
- SQLite3
- Linux/Unix system (for deployment)
- Modern web browser
- Clone the repository (or use existing files):
git clone https://github.com/alpemreelmas/sysara.git
cd sysara
- Install dependencies:
go mod tidy
- Build the application:
# For Linux
go build .
# For Windows (disable CGO)
CGO_ENABLED=0 go build .
- Run the application:
./sysara
- Access the application:
Open your browser and navigate to
http://localhost:8080
- Make installer executable:
chmod +x installer.sh
- Run the installer:
sudo ./installer.sh
- Access the application:
Navigate to
http://your-server-ip:8080
sysara/
βββ cmd/ # Command-line applications
βββ config/ # Configuration files
βββ data/ # Database and data files
βββ internal/
β βββ auth/ # Authentication logic
β βββ handlers/ # HTTP handlers
β βββ middleware/ # HTTP middleware
β βββ models/ # Database models
β βββ services/ # Business logic services
βββ logs/ # Application logs
βββ pkg/
β βββ utils/ # Utility functions
βββ static/
β βββ css/ # Stylesheets
β βββ js/ # JavaScript files
β βββ images/ # Static images
βββ templates/
β βββ layouts/ # Layout templates
β βββ pages/ # Page templates
β βββ partials/ # Partial templates
βββ installer.sh # Linux installation script
βββ main.go # Application entry point
βββ README.md # This file
Create a .env
file in the root directory:
# Server Configuration
PORT=8080
GIN_MODE=release
# Database
DATABASE_PATH=data/sysara.db
# Security
SESSION_SECRET=your-secret-key-here
# Monitoring
REFRESH_INTERVAL=5000
The application will create default configurations on first run:
- SQLite database in
data/sysara.db
- Log files in
logs/
directory - Static files served from
static/
directory
- Password Hashing: BCrypt with salt
- Session Security: Secure cookie settings
- Input Validation: Server-side validation for all inputs
- CSRF Protection: Built-in CSRF protection
- SSH Key Validation: Format validation for SSH keys
GET /login
- Display login pagePOST /login
- Authenticate userGET /register
- Display registration pagePOST /register
- Create new user accountPOST /logout
- Logout current user
GET /dashboard
- Main dashboardGET /users
- List all usersGET /env
- Environment file managementGET /ssh
- SSH key managementGET /monitor
- System monitoring dashboard
GET /monitor/api/stats
- System statisticsGET /monitor/api/processes
- Running processes
- Create Handler: Add new handler in
internal/handlers/
- Add Routes: Update
main.go
with new routes - Create Templates: Add HTML templates in
templates/
- Update Models: Modify database models if needed
# Set development mode
export GIN_MODE=debug
# Run with auto-reload (requires air)
air
# Or run normally
go run main.go
# Run all tests
go test ./...
# Run tests with coverage
go test -cover ./...
# Run specific test
go test ./internal/auth/
GOOS=linux GOARCH=amd64 go build -o sysara-linux .
GOOS=windows GOARCH=amd64 go build -o sysara-windows.exe .
GOOS=darwin GOARCH=amd64 go build -o sysara-darwin .
FROM golang:1.21-alpine AS builder
WORKDIR /app
COPY . .
RUN go mod tidy && go build -o sysara .
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /app/sysara .
COPY --from=builder /app/static ./static
COPY --from=builder /app/templates ./templates
EXPOSE 8080
CMD ["./sysara"]
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the 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.
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed information
- Include system information and error logs
- Multi-server support
- Docker container management
- Advanced alerting system
- REST API for external integrations
- Two-factor authentication
- Advanced user roles and permissions
- Database backups and restoration
- Plugin system for extensions
- alpemreelmas - Initial work - GitHub
- Gin Web Framework for the excellent HTTP framework
- GORM for the intuitive ORM
- HTMX for seamless client-server interactions
- Tailwind CSS for the beautiful UI components
- gopsutil for system monitoring capabilities
Sysara - Empowering system administrators with modern, intuitive tools for server management.