- TLS/SSL encryption for secure communication
- Brute-force protection during login attempts
- Dynamic folder creation for organizing uploads
- QR code generation for accessing upload page from mobile devices
- Session management with authentication and logout functionality
-
Secure Login System
- Passwords are securely hashed using
bcrypt. - Brute-force protection with a failed login counter.
- Sessions managed with Flask's
sessionmodule.
- Passwords are securely hashed using
-
TLS/SSL Configuration
- TLS/SSL enforced using strong ciphers.
- Certificates loaded for secure communication.
-
Dynamic File Organization
- Files are uploaded to structured directories based on their extensions.
- Unsupported file types are placed in an
unknown_format_filesfolder.
-
QR Code Generation
- QR code created dynamically for accessing the admin portal.
-
Session Management
- Authenticated sessions for secure access to admin features.
- Automatic session timeout after 30 minutes.
- Python (>= 3.8)
- Flask and Required Dependencies
- Install dependencies using
pip install -r requirements.txt.
- Install dependencies using
- Docker
-
Clone the repository:
git clone https://github.com/Obluchatel/SafeRemoteBackup.git cd SafeRemoteBackup -
Add your configuration in
settings.py, e.g.:folders_dict = { 'images': ['jpg', 'png', 'gif'], 'documents': ['pdf', 'docx', 'txt'], 'videos': ['mp4', 'avi'], } strong_password = 'your_admin_password'
-
Update
docker-compose.yamlfile, e.g.:ports: - "${APP_PORT:-5000}:${CONTAINER_PORT:-5000}" environment: - HOST_IP=${HOST_IP:-127.0.0.1} volumes: - "${UPLOAD_DIR:-/mnt/share/uploads}:/app/static/uploads"
-
Run the Application:
docker compose up --build
-
Access the Web Interface:
- Navigate to
https://<$HOST_IP>:5000/in your browser.
- Navigate to
-
Login:
- Enter the admin password defined in
settings.py.
- Enter the admin password defined in
-
Upload Files:
- Files are saved in structured directories under
UPLOAD_DIRindocker-compose.yaml.
- Files are saved in structured directories under
-
Admin Page:
- Find a link for mobile devices on admin portal - QR code and IP address are available there.
-
Password Hashing:
- Admin password is hashed using
bcrypt.
- Admin password is hashed using
-
Session Management:
- Sessions expire after 30 minutes of inactivity.
-
Brute Force Protection:
- Limits login attempts to 5 before locking the user out.
-
TLS Enforcement:
- Secure communication enforced using strong TLS ciphers.
- Ensure the
settings.pyfile is configured correctly. - Store
cert.pemandkey.pemsecurely and update them as needed.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Feel free to submit issues or pull requests for improvements.