Files
2026-04-30 09:02:36 +02:00

2.7 KiB

Installation

Prerequisites

1. Python 3

macOS includes Python 3. Verify with:

python3 --version

If missing: brew install python

2. rsync

macOS ships rsync 2.6.9 (2006), which has bugs with path handling. Install the current version:

brew install rsync

3. SSH key access to the remote host

The uploader runs unattended, so it must be able to reach the remote host without a password. This means SSH key-based authentication needs to be in place before you install.

If you don't already have an SSH key, generate one:

ssh-keygen -t ed25519

Then authorize it on the remote host:

ssh-copy-id filez@10.10.8.1

Confirm the connection works without any password prompt before continuing:

ssh filez@10.10.8.1 echo ok

If your key lives somewhere other than the default location (~/.ssh/id_rsa or ~/.ssh/id_ed25519), set the ssh_key_path field in downloads_uploader_config.json to its full path.


Install

cd ~/Downloads/uploader
./downloads_uploader_install.sh install

This will:

  1. Create ~/.local/bin/downloads-uploader (a named symlink to python3 so macOS permission dialogs show a friendly name)
  2. Write ~/Library/LaunchAgents/com.user.downloads-uploader.plist
  3. Load the agent — it runs immediately and then every 5 minutes

macOS may prompt for network/file access permissions the first time. Allow them.


Configure

Open downloads_uploader_config.json and set your remote destination:

{
  "remote_destination": "user@your-host:/path/to/remote/dir/",
  "ssh_key_path": "",
  "ssh_port": 22
}

Then trigger a fresh run:

./downloads_uploader_install.sh run

Check the output:

./downloads_uploader_install.sh status

Uninstall

./downloads_uploader_install.sh uninstall

This stops and removes the launchd agent and the symlink. Config, logs, and state files are left in place.


Troubleshooting

"rsync not found"

brew install rsync

SSH connects but find fails on remote The script uses GNU find -printf, which requires Linux. BSD/macOS remotes are not supported on the remote side.

Files keep re-uploading Size mismatch between local and remote. Check that the remote filesystem isn't silently modifying files (e.g. a torrent client moving them). You can inspect .uploader_state.json for the last recorded sizes.

Agent not running after reboot Verify the plist is in ~/Library/LaunchAgents/ and loaded:

launchctl list | grep downloads-uploader

If missing, re-run ./downloads_uploader_install.sh install.

See full logs

tail -f ~/Downloads/uploader/uploader_log.txt