diff --git a/README.md b/README.md index 8969c83..6d86288 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,67 @@ # backup-client +A containerized SSH backup server built on Alpine Linux, designed to provide secure remote backup access using SSH/SFTP protocols. + +## Features + +- πŸ” **Secure SSH Access**: Automated SSH server setup with configurable authentication +- 🐳 **Docker Ready**: Multi-architecture support (linux/amd64, linux/arm64) +- πŸ“¦ **BorgBackup Integration**: Built-in backup solution support +- βš™οΈ **Dynamic Configuration**: Real-time SSH config monitoring and reloading +- πŸ”„ **CI/CD Pipeline**: Automated builds via Drone CI + +## Quick Start + +```bash +docker run -p 20022:20022 -v /backup/data:/home/backup safebox/backup-client + +Configuration +Environment Variables +Variable Default Description +SSH_PORT 20022 SSH server listening port +SSH_USER backup Backup user name +SSH_PASSWORD backup User password for authentication + +How it Works +The container automatically: + +User Setup: Creates the backup user with configured credentials +SSH Configuration: Generates host keys (RSA and Ed25519) if not present +Server Start: Launches SSH daemon with SFTP support +Monitoring: Watches for configuration changes and reloads SSH server as needed +Key Components +Dockerfile: Alpine-based image with OpenSSH, su-exec, and BorgBackup +start_backup.sh: Main entrypoint script handling SSH setup and monitoring +.drone.yml: CI/CD pipeline for multi-architecture builds +Architecture +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ SSH Client │───▢│ Docker Container │───▢│ Backup Storage β”‚ +β”‚ (Your backup β”‚ β”‚ (Alpine Linux) β”‚ β”‚ (/home/backup)β”‚ +β”‚ application) β”‚ β”‚ β”‚ β”‚ β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + β”‚ + +β”‚ (Your backup β”‚ β”‚ (Alpine Linux) β”‚ β”‚ (/home/backup)β”‚ +Security Features +Host Key Persistence: SSH host keys are generated once and persisted +Configurable Authentication: Supports both password and public key authentication +User Isolation: Runs SSH daemon as non-root user +SFTP Subsystem: Secure file transfer protocol support +Development +Building Locally +Testing +CI/CD +The project uses Drone CI for automated builds: + +Development builds: Push to registry.dev.format.hu/backup-client +Release builds: Tag events push to safebox/backup-client on DockerHub +Multi-architecture: Supports both AMD64 and ARM64 platforms +Contributing +Fork the repository +Create a feature branch +Make your changes +Test the Docker build +Submit a pull request +License +This project is open source. Please check the license file for details. +