How to Set Up Handrive on a NAS for Always-On File Sharing
P2P file sharing requires both parties to be online. Running Handrive on a NAS gives you 24/7 availability for your shares.
Why Run Handrive on a NAS?
The main limitation of P2P file sharing is that both sender and receiver need to be online simultaneously. If you're sharing with someone in a different timezone, coordinating can be tricky.
Running Handrive in headless mode on a NAS or home server solves this. Your NAS is always on, so your shares are always available — just like cloud storage, but without giving up your data.
Requirements
- A NAS (Synology, QNAP, etc.) or Linux server
- SSH access to your NAS
- Handrive Linux binary (x86_64 or ARM depending on your NAS)
- A Handrive account
Step 1: Download Handrive
SSH into your NAS and download the Handrive Linux binary:
# Check your architecture
uname -m
# Download the appropriate binary
# For x86_64:
wget https://downloads.handrive.app/handrive-linux-x64
# For ARM64 (some newer NAS devices):
wget https://downloads.handrive.app/handrive-linux-arm64
# Make it executable
chmod +x handrive-linux-*
mv handrive-linux-* /usr/local/bin/handriveStep 2: Authenticate
Start the server and authenticate with your Handrive account:
# Terminal 1: Start the server
handrive serve --port 3001
# Terminal 2: Authenticate
handrive auth login otp your@email.com
# Enter the OTP code sent to your emailStep 3: Set Up as a Service
To keep Handrive running after you log out, set it up as a systemd service:
# Create service file
sudo nano /etc/systemd/system/handrive.serviceAdd this content:
[Unit]
Description=Handrive P2P File Sharing
After=network.target
[Service]
Type=simple
User=your-username
ExecStart=/usr/local/bin/handrive serve --port 3001
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.targetEnable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable handrive
sudo systemctl start handrive
# Check status
sudo systemctl status handriveStep 4: Create Shares
Use the Handrive desktop app on your regular computer to create shares that point to folders on your NAS. Or use the REST API:
# Check available API endpoints
curl http://localhost:3001/api/docsNetwork Considerations
Port Forwarding (Optional)
Handrive uses NAT traversal (STUN/ICE) to connect through firewalls, so port forwarding usually isn't required. But if you have connection issues, forwarding UDP ports can help.
Dynamic DNS
If your home IP address changes, set up dynamic DNS so your NAS remains reachable. Most NAS devices have built-in DDNS support.
Synology-Specific Setup
On Synology NAS, you can also use Docker to run Handrive:
- Install Docker from Package Center
- Pull the Handrive Docker image (if available)
- Or use the binary method above via SSH
Troubleshooting
Service won't start
- Check logs:
journalctl -u handrive -f - Ensure the binary has execute permissions
- Verify the user in the service file exists
Can't connect from outside
- Check if your NAS firewall allows the port
- Try temporarily disabling firewall to test
- Verify your router isn't blocking P2P connections
Benefits of This Setup
- Always available: Your shares are online 24/7
- No cloud dependency: Everything runs on your hardware
- Central storage: One place for all shared files
- Fast local access: Files on NAS are already available on your network
Get Started with Handrive
Download Handrive and set up self-hosted file sharing on your NAS.
Download Handrive