<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Cradicle Explorer</title>
    <link href="/css/bootstrap/bootstrap.min.css" rel="stylesheet">
    <style>
      .form-control-dark::placeholder {
          color: #aaa;
          opacity: 1;
      }
    </style>
    <link rel="stylesheet" href="/assets/fontawesome/css/all.min.css">
    <link rel="icon" type="image/png" href="/favicon.png">


                <link href="/css/dashboard.css" rel="stylesheet">
                </head>
                <body>
                <header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
                  <a class="navbar-brand col-md-3 col-lg-2 me-0 px-3 fs-6" href="/">Cradicle Explorer</a>
                  <button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                  </button>
                  <form method="get" action="/cgi-bin/main" style="width:100%;"><input class="form-control form-control-dark w-100 rounded-0 border-0" type="text" name="q" placeholder="Search repos" aria-label="Search"></form>
                  <div class="navbar-nav flex-row">
                    <div class="nav-item text-nowrap">
                      <a class="nav-link px-3 active" href="/cgi-bin/repo?id=z2qgMGi6rtzhxfABsima4chU9AxTP">keepSync</a>
                    </div>
                  </div>
                </header>
                <div class="container-fluid">
                  <div class="row">
                    <nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-dark sidebar collapse">
                      <div class="position-sticky pt-3 sidebar-sticky">
                        <ul class="nav flex-column">
                          <li class="nav-item">
                            <a class="nav-link active" href="/cgi-bin/repo?id=z2qgMGi6rtzhxfABsima4chU9AxTP">
                              <i class="align-text-bottom fa-solid fa-info"></i>
                              Info
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z2qgMGi6rtzhxfABsima4chU9AxTP&issue=list">
                              <i class="align-text-bottom fa-solid fa-layer-group"></i>
                              Issues
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z2qgMGi6rtzhxfABsima4chU9AxTP&patch=list">
                              <i class="align-text-bottom fa-solid fa-vest-patches"></i>
                              Patches
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z2qgMGi6rtzhxfABsima4chU9AxTP&wallet=list">
                              <i class="align-text-bottom fa-solid fa-wallet"></i>
                              Wallets
                            </a>
                          </li>
                          <li class="nav-item">
                            <a class="nav-link" href="/cgi-bin/repo?id=z2qgMGi6rtzhxfABsima4chU9AxTP&source=.">
                              <i class="align-text-bottom fa-solid fa-code"></i>
                              Source
                            </a>
                          </li>
                        <h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted text-uppercase">
                          <span></span>
                        </h6>
                        <ul class="nav flex-column mb-2">
                        
                        </ul>
                      </div>
                    </nav>
                <main class="col-md-9 ms-sm-auto col-lg-10">
                  <div class="container px-1 py-3">
        

    <div class="list-group">
    <div class="list-group-item">
    <div style="font-size:1.3rem;">keepSync</div>
    <div class="repo-item">A secure service that monitors your KeePassXC database file and automatically creates encrypted backups that can be synced to 3rd party api&#x27;s.</div>
    <div>rad:z2qgMGi6rtzhxfABsima4chU9AxTP</div>
    </div>
    <div class="list-group-item">
    <div>Visibility</div>
    <div class="repo-item">public</div>
    </div>
    <div class="list-group-item">
    <div>Delegates</div><div class="repo-item">did:key:z6MknqriyugtvKRxKAPH95VH7oLai8LtaZg7fGZvrsQuyks7</div>
    </div>
    <div class="list-group-item">
    <div>Default branch</div>
    <div><span class="repo-item">master &#8594 737db44dd30bfa4858c10000fbc683c3264901ae</span> (Fri Apr 11 22:18:15 2025)</div>
    </div>
    <div class="list-group-item">
    <div>Threshold</div>
    <div class="repo-item">1</div>
    </div>
    </div>
    
        <div class="list-group mt-3">
        <div class="list-group-item">
        <div class="mb-2" style="font-weight:bold;"><i class="fa-solid fa-book"></i> README.md</div>
        <pre style="margin:0; font-size:0.85rem; overflow-x:auto; color:#fafafa;"># keepSync

A secure backup and synchronization solution for multiple file types with hardware-based encryption.

## Overview

keepSync automatically monitors your files for changes, creates encrypted backups, and optionally synchronizes these backups to cloud storage (currently supporting S3-compatible storage). All encryption keys are securely stored in your device&#x27;s hardware security module (TPM on Linux, KeyStore on Android).

## Features

- **Automated Monitoring**: Detects when your files are updated
- **Secure Backups**: Creates AES-256-GCM encrypted backups
- **Hardware Security**: Uses TPM 2.0 on Linux and KeyStore on Android
- **Cloud Sync**: Synchronizes encrypted backups to S3-compatible storage
- **Advanced Retention**: Flexible policies for both local and cloud backups
  - Age-based retention (keep backups for specific time periods)
  - Count-based retention (keep specific number of backups)
  - Minimum retention guarantees (always keep N most recent backups)
  - Independent local and cloud retention settings
- **Backup Restoration**: Easily restore from your encrypted backups
  - Restore the latest backup or a specific backup file
  - Verify backup integrity before restoration
  - View detailed backup metadata and information
- **Comprehensive Logging**: Flexible logging system
  - Multiple verbosity levels (debug, info, warning, error, fatal)
  - Log to console and/or file
  - Component-level filtering
  - Configurable formatting options
- **Multiple Cloud Options**: Support for S3-compatible services
- **Cross Platform**: Support for Linux (x86/AMD64) and Android (GrapheneOS)
- **Background Service**: Runs as a system service with minimal resource usage

## Security Model

keepSync follows a zero-knowledge encryption model:

1. Encryption keys are generated and stored solely within hardware security modules (TPM/KeyStore)
2. Keys never leave the secure hardware in plaintext
3. Backups are encrypted using authenticated encryption (AES-256-GCM)
4. Only encrypted data is transmitted to cloud storage
5. The application has no access to your original file content in unencrypted form

## Getting Started

### Requirements

- Linux with TPM 2.0 support or Android with KeyStore
- Go 1.18+ (for building from source)
- Files to be synchronized
- S3-compatible storage account (for cloud sync)

### Installation

#### From Source (Linux)

```bash
# Clone the repository
git clone https://github.com/username/keepsync.git
cd keepsync

# Run the installation script
./scripts/install.sh
```

The installation script will:
1. Build the application from source
2. Create a configuration file
3. Set up a systemd service
4. Check TPM availability
5. Configure automatic startup

#### Android

For Android support, use the provided APK or build from source with the Android compile scripts.

### Configuration

The configuration file is located at:
- System-wide installation: `/etc/keepsync/config.json`
- User installation: `~/.config/keepsync/config.json`

Example configuration:

```json
{
  &quot;watched_paths&quot;: [&quot;/home/user/Documents/important_files/&quot;, &quot;/home/user/Projects/configs/&quot;],
  &quot;backup_dir&quot;: &quot;/home/user/.keepsync/backups&quot;,
  &quot;cloud_provider&quot;: &quot;s3&quot;,
  &quot;cloud_settings&quot;: {
    &quot;endpoint&quot;: &quot;your-s3-endpoint-url&quot;,
    &quot;region&quot;: &quot;your-s3-region&quot;,
    &quot;bucket&quot;: &quot;your-bucket-name&quot;,
    &quot;access_key&quot;: &quot;your-access-key&quot;,
    &quot;secret_key&quot;: &quot;your-secret-key&quot;,
    &quot;prefix&quot;: &quot;keepsync-backups/&quot;
  },
  &quot;retention_count&quot;: 5,
  &quot;monitor_interval&quot;: 10000000000
}
```

### Setting Up S3 Integration

To configure S3-compatible storage integration, edit your config.json file with your S3 credentials and bucket information. See the S3 setup guide for detailed instructions:

```bash
# View the S3 setup documentation
less docs/s3-setup.md
```

## Usage

### Running Manually

```bash
# Create a backup immediately
keepsync --force-backup

# Run in daemon mode
keepsync --daemon

# Specify a custom watch path
keepsync --watch /path/to/files

# Specify a custom backup directory
keepsync --backup-dir /path/to/backups

# Enable verbose output
keepsync --verbose
```

### Managing the Service

For system-wide installation:
```bash
# Start the service
sudo systemctl start keepsync

# Check status
sudo systemctl status keepsync

# Stop the service
sudo systemctl stop keepsync
```

For user installation:
```bash
# Start the service
systemctl --user start keepsync

# Check status
systemctl --user status keepsync

# Stop the service
systemctl --user stop keepsync
```

## Troubleshooting

### TPM Access Issues

If you encounter TPM access permission issues:

```bash
# Add your user to the tss group
sudo usermod -a -G tss $USER

# Log out and log back in for changes to take effect
```

### Viewing Logs

```bash
# System-wide installation
sudo journalctl -u keepsync

# User installation
journalctl --user -u keepsync
```

## Development

See [PROJECT-STRUCTURE.md](PROJECT-STRUCTURE.md) for detailed information about the project architecture and components.

## License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
</pre>
        </div>
        </div>

</div>
</main>
</div>
</div>


</body>
</html>

