mirror of
https://github.com/hanzoskill/bot-sync.git
synced 2026-10-30 21:03:58 +00:00
1.2 KiB
1.2 KiB
Setup Guide
Prerequisites
- Both machines on same network (Tailscale recommended)
- SSH access between machines
- rsync installed on both
SSH Key Setup
On Source Machine (Server)
# Generate key if needed
ssh-keygen -t ed25519 -C "bot-sync"
# Copy to target
ssh-copy-id user@target-host
# Test connection
ssh user@target-host "echo ok"
Tailscale Setup
Both machines should be on the same Tailscale network:
# Install Tailscale
curl -fsSL https://tailscale.com/install.sh | sh
# Login
tailscale up
# Check status
tailscale status
Adding Peers
# Syntax
/sync add <name> <host> <user> <remote-path>
# Examples
/sync add mac-mini 100.95.193.55 bot /Users/bot/bot
/sync add server 100.89.48.26 bot /home/bot/bot
Testing
# Check connection
/sync status
# Preview changes
/sync diff mac-mini
# Sync
/sync now mac-mini
Troubleshooting
Connection Refused
- Check SSH is running:
systemctl status ssh - Check firewall:
sudo ufw allow ssh
Permission Denied
- Ensure SSH keys are set up
- Check authorized_keys permissions:
chmod 600 ~/.ssh/authorized_keys
Tailscale Not Connected
- Check status:
tailscale status - Re-authenticate:
tailscale up --reset