Skip to content

Commit 0f5614b

Browse files
committed
Implement preflight checks and interactive setup wizard in install.sh for improved user experience.
- Added a `preflight_checks` function to validate root privileges, systemd presence, Tailscale installation, and required tools before installation. - Introduced an interactive setup wizard to guide users through the installation process, providing clear instructions and warnings. - Updated `uninstall.sh` to show installed components before removal and added confirmation prompts for better user interaction. - Enhanced README with new installation instructions and quick start guide for one-command installation.
1 parent e2d1d7b commit 0f5614b

File tree

5 files changed

+376
-57
lines changed

5 files changed

+376
-57
lines changed

README.md

Lines changed: 57 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,31 @@ Automated Taildrop file reception as a reliable systemd service, plus a convenie
4444

4545
### Quick Start
4646

47+
#### One-Command Installation (Recommended)
48+
49+
```bash
50+
# Download and install automatically (requires Tailscale to be installed first)
51+
curl -fsSL https://raw.githubusercontent.com/1999AZZAR/tailscale_receiver/main/setup.sh | bash
52+
```
53+
54+
#### Manual Installation
55+
4756
```bash
48-
# 1) Make scripts executable
57+
# 1) Clone or download the repository
58+
git clone https://github.com/1999AZZAR/tailscale_receiver.git
59+
cd tailscale_receiver
60+
61+
# 2) Make scripts executable
4962
chmod +x install.sh uninstall.sh tailscale-receive.sh tailscale-send.sh
5063

51-
# 2) Install (you will be asked which user should receive files)
64+
# 3) Install (interactive setup wizard will guide you)
5265
sudo ./install.sh
5366

54-
# 3) Check service and logs
67+
# 4) Check service and logs
5568
sudo systemctl status tailscale-receive.service
5669
sudo journalctl -u tailscale-receive.service -f
5770

58-
# 4) Optional: test sender
71+
# 5) Optional: test sender
5972
/usr/local/bin/tailscale-send.sh --help
6073
```
6174

@@ -79,19 +92,19 @@ Notes:
7992

8093
### Comparison of File Sharing Methods
8194

82-
| Feature | `tailscale_receiver` | NFS (Network File System) | FTP (File Transfer Protocol) | SMB (Server Message Block) |
83-
|:----------------------- |:------------------------------------------------------------------------------------------------------ |:------------------------------------------------------------------------------------------------ |:------------------------------------------------------------------------------------ |:--------------------------------------------------------------------------- |
84-
| Method Used | Taildrop (peer‑to‑peer over secure Tailscale network) | Mounting shares (remote directories appear local) | Client‑server (upload/download to a server) | Network share access (shared folders/resources) |
85-
| Ease of Use | Easy. Designed for simplicity and automation in a Tailscale network. | Moderate–Difficult. Requires server and client config, `/etc/exports`, firewall, automount, etc. | Easy. Many graphical clients; SFTP/FTPS variants common. | Easy. Native on Windows; good support via Samba on Linux and macOS. |
86-
| Security | High. Tailscale’s end‑to‑end encryption and identity. | Moderate. Can be complex; often relies on LAN isolation, Kerberos, or TLS extensions. | Low by default (FTP is plaintext). Use SFTP (over SSH) or FTPS for security. | Moderate–High. SMBv3 supports encryption/signing; depends on configuration. |
87-
| Performance | Good. Limited by Tailscale overlay and path between peers. | High. Excellent on LAN; kernel‑level I/O. | Good. Typically adequate for transfers; latency‑sensitive control channel. | High. Very fast on LAN; improved with SMBv3 multichannel and modern stacks. |
88-
| Use Case | Securely and automatically receive files from your Tailnet devices; personal and small team workflows. | Share directories as if local across Unix/Linux systems; POSIX semantics. | Simple uploads/downloads; legacy integrations; public file distribution (anonymous). | Windows file/print shares; mixed‑OS LAN environments; AD integration. |
89-
| Platform Support | Linux (scripts target `systemd`), works with any Tailnet devices as senders. | Primarily Linux/Unix; clients exist for other OSes. | Cross‑platform (FTP/SFTP/FTPS clients abundant). | Primarily Windows; widely supported on Linux (Samba) and macOS. |
90-
| Setup Complexity | Low. Install and choose user; no port forwarding or firewall tweaks. | Medium–High. Export lists, uid/gid mapping, firewall rules. | Low–Medium. Stand up an FTP/SFTP server, manage users/keys, open ports. | Medium. Configure Samba/Windows shares, permissions, and firewall. |
91-
| NAT/Firewall Traversal | Excellent. Uses Tailscale’s NAT traversal; no inbound ports. | Poor–Moderate. Usually LAN only or needs VPN/ports. | Moderate. Requires open ports (20/21 for FTP, 22 for SFTP, 990/989 for FTPS). | Moderate. Requires open ports (e.g., 445), often LAN or VPN. |
92-
| Identity/Access Control | Tailnet identity; access scoped to your devices. | OS‑level users/groups; Kerberos/LDAP possible. | Local server accounts or system users/SSH keys. | AD/LDAP or local users; granular share/file ACLs. |
93-
| Offline Behavior | Queue on sender; receiver processes on next loop when online. | Not applicable; mount must be reachable. | Server must be reachable; clients retry/reconnect. | Server must be reachable; clients retry/reconnect. |
94-
| Best For | Quick, secure, zero‑exposure transfers within a personal/team Tailnet. | Seamless remote filesystem access and POSIX workflows. | Interop with legacy systems and simple public distribution via hardened variants. | Windows‑centric networks needing shared folders and permissions. |
95+
| Feature | `tailscale_receiver` | NFS (Network File System) | FTP (File Transfer Protocol) | SMB (Server Message Block) |
96+
| :---------------------- | :----------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------- | :--------------------------------------------------------------------------- |
97+
| Method Used | Taildrop (peer‑to‑peer over secure Tailscale network) | Mounting shares (remote directories appear local) | Client‑server (upload/download to a server) | Network share access (shared folders/resources) |
98+
| Ease of Use | Easy. Designed for simplicity and automation in a Tailscale network. | Moderate–Difficult. Requires server and client config,`/etc/exports`, firewall, automount, etc. | Easy. Many graphical clients; SFTP/FTPS variants common. | Easy. Native on Windows; good support via Samba on Linux and macOS. |
99+
| Security | High. Tailscale’s end‑to‑end encryption and identity. | Moderate. Can be complex; often relies on LAN isolation, Kerberos, or TLS extensions. | Low by default (FTP is plaintext). Use SFTP (over SSH) or FTPS for security. | Moderate–High. SMBv3 supports encryption/signing; depends on configuration. |
100+
| Performance | Good. Limited by Tailscale overlay and path between peers. | High. Excellent on LAN; kernel‑level I/O. | Good. Typically adequate for transfers; latency‑sensitive control channel. | High. Very fast on LAN; improved with SMBv3 multichannel and modern stacks. |
101+
| Use Case | Securely and automatically receive files from your Tailnet devices; personal and small team workflows. | Share directories as if local across Unix/Linux systems; POSIX semantics. | Simple uploads/downloads; legacy integrations; public file distribution (anonymous). | Windows file/print shares; mixed‑OS LAN environments; AD integration. |
102+
| Platform Support | Linux (scripts target `systemd`), works with any Tailnet devices as senders. | Primarily Linux/Unix; clients exist for other OSes. | Cross‑platform (FTP/SFTP/FTPS clients abundant). | Primarily Windows; widely supported on Linux (Samba) and macOS. |
103+
| Setup Complexity | Low. Install and choose user; no port forwarding or firewall tweaks. | Medium–High. Export lists, uid/gid mapping, firewall rules. | Low–Medium. Stand up an FTP/SFTP server, manage users/keys, open ports. | Medium. Configure Samba/Windows shares, permissions, and firewall. |
104+
| NAT/Firewall Traversal | Excellent. Uses Tailscale’s NAT traversal; no inbound ports. | Poor–Moderate. Usually LAN only or needs VPN/ports. | Moderate. Requires open ports (20/21 for FTP, 22 for SFTP, 990/989 for FTPS). | Moderate. Requires open ports (e.g., 445), often LAN or VPN. |
105+
| Identity/Access Control | Tailnet identity; access scoped to your devices. | OS‑level users/groups; Kerberos/LDAP possible. | Local server accounts or system users/SSH keys. | AD/LDAP or local users; granular share/file ACLs. |
106+
| Offline Behavior | Queue on sender; receiver processes on next loop when online. | Not applicable; mount must be reachable. | Server must be reachable; clients retry/reconnect. | Server must be reachable; clients retry/reconnect. |
107+
| Best For | Quick, secure, zero‑exposure transfers within a personal/team Tailnet. | Seamless remote filesystem access and POSIX workflows. | Interop with legacy systems and simple public distribution via hardened variants. | Windows‑centric networks needing shared folders and permissions. |
95108

96109
### Quick Setup Examples
97110

@@ -188,29 +201,26 @@ sudo mount -t cifs //server/public /mnt/smb -o guest,uid=$(id -u),gid=$(id -g)
188201
### Taildrop Setup Requirements
189202

190203
1) Enable Taildrop in your tailnet admin
191-
204+
192205
```bash
193206
# Visit your admin console and enable "Send Files"
194207
```
195-
196208
2) Verify Tailscale status
197-
209+
198210
```bash
199211
tailscale status
200212
```
201-
202213
3) Optional: basic Taildrop smoke test
203-
214+
204215
```bash
205216
# List pending receives
206217
tailscale file get
207-
218+
208219
# Send to another device (replace device-name)
209220
tailscale file cp /path/to/test/file device-name:
210221
```
211-
212222
4) Allow your user to send without sudo (recommended)
213-
223+
214224
```bash
215225
sudo tailscale set --operator=$USER
216226
```
@@ -219,12 +229,12 @@ sudo mount -t cifs //server/public /mnt/smb -o guest,uid=$(id -u),gid=$(id -g)
219229

220230
1) Obtain the files (clone or download). Place scripts in one directory.
221231
2) Make scripts executable:
222-
232+
223233
```bash
224234
chmod +x install.sh uninstall.sh tailscale-receive.sh tailscale-send.sh
225235
```
226236
3) Run the installer (asks for your target user and configures automatically):
227-
237+
228238
```bash
229239
sudo ./install.sh
230240
```
@@ -252,13 +262,13 @@ chmod +x install.sh tailscale-receive.sh tailscale-send.sh; sudo ./install.sh'
252262

253263
#### What Gets Installed
254264

255-
| Item | Path | Purpose |
256-
| ------------------ | ----------------------------------------------------------- | -------------------------------------------- |
265+
| Item | Path | Purpose |
266+
| ------------------ | ------------------------------------------------------------- | --------------------------------------------- |
257267
| Receiver script | `/usr/local/bin/tailscale-receive.sh` | Auto‑accept Taildrop files |
258268
| Systemd unit | `/etc/systemd/system/tailscale-receive.service` | Run service at boot; auto‑restart |
259-
| Sender script | `/usr/local/bin/tailscale-send.sh` | Interactive Taildrop sender |
269+
| Sender script | `/usr/local/bin/tailscale-send.sh` | Interactive Taildrop sender |
260270
| Dolphin (KF6) menu | `/usr/share/kio/servicemenus/tailscale-send.desktop` | Right‑click "Send to device using Tailscale" |
261-
| Dolphin (KF5) menu | `/usr/share/kservices5/ServiceMenus/tailscale-send.desktop` | Same for KF5 |
271+
| Dolphin (KF5) menu | `/usr/share/kservices5/ServiceMenus/tailscale-send.desktop` | Same for KF5 |
262272

263273
Systemd details:
264274

@@ -296,8 +306,8 @@ Backups of prior install are saved to `/tmp/tailscale-receiver-backup-YYYYMMDD-H
296306

297307
The installer configures these automatically.
298308

299-
| Variable | Meaning | Example |
300-
| ------------ | ----------------------------------------------- | ----------------------------------- |
309+
| Variable | Meaning | Example |
310+
| -------------- | ----------------------------------------------- | ------------------------------------- |
301311
| `TARGET_DIR` | Destination directory for received files | `/home/<user>/Downloads/tailscale/` |
302312
| `FIX_OWNER` | User to own the files and receive notifications | `<user>` |
303313
| `LOG_LEVEL` | Logging verbosity (debug, info, warn, error) | `info` |
@@ -308,11 +318,11 @@ To change later, edit `/usr/local/bin/tailscale-receive.sh` and restart the serv
308318

309319
Environment variables that influence the sender:
310320

311-
| Variable | Purpose | Example |
312-
| ---------------- | ----------------------------------------------------- | -------------------- |
321+
| Variable | Purpose | Example |
322+
| ------------------ | ------------------------------------------------------------- | ---------------------- |
313323
| `DIALOG_TOOL` | Force picker (`kdialog`, `zenity`, `whiptail`, `cli`) | `DIALOG_TOOL=zenity` |
314-
| `DEBUG` | Verbose output | `DEBUG=1` |
315-
| `NOTIFY_TIMEOUT` | Notification timeout (seconds) | `NOTIFY_TIMEOUT=10` |
324+
| `DEBUG` | Verbose output | `DEBUG=1` |
325+
| `NOTIFY_TIMEOUT` | Notification timeout (seconds) | `NOTIFY_TIMEOUT=10` |
316326

317327
### Usage
318328

@@ -368,16 +378,16 @@ Order of preference: `kdialog` → `zenity` → `whiptail` → CLI fallback.
368378

369379
### Troubleshooting
370380

371-
| Symptom | Likely Cause | Fix |
372-
| -------------------------------------- | --------------------------------------------------- | ----------------------------------------------------------------------- |
373-
| Service fails with "Exec format error" | Corrupt/empty `/usr/local/bin/tailscale-receive.sh` | Reinstall: `sudo ./install.sh` |
374-
| Service fails with exit code 3 | TARGET_DIR not accessible due to security sandboxing| Check systemd service security settings; may need to adjust ReadWritePaths |
375-
| Service running but no files received | Taildrop disabled; device not logged in | Enable Taildrop; `tailscale status`; ensure sender targeted this device |
376-
| "Access denied" on send | Operator not set for your user | `sudo tailscale set --operator=$USER` |
377-
| No desktop notifications | Headless/no GUI or `notify-send` missing | Install `libnotify-bin` (Debian/Ubuntu) or ignore on headless |
378-
| Dolphin menu missing | KDE cache stale or menu files missing | `kbuildsycoca6`/`kbuildsycoca5`, restart Dolphin |
379-
| Files owned by root | Ownership fix not applied yet | Service chowns post‑receive; check logs for errors |
380-
| Service logs not appearing | Systemd logging configuration | Check `journalctl -u tailscale-receive.service` for detailed logs |
381+
| Symptom | Likely Cause | Fix |
382+
| -------------------------------------- | ----------------------------------------------------- | -------------------------------------------------------------------------- |
383+
| Service fails with "Exec format error" | Corrupt/empty `/usr/local/bin/tailscale-receive.sh` | Reinstall:`sudo ./install.sh` |
384+
| Service fails with exit code 3 | TARGET_DIR not accessible due to security sandboxing | Check systemd service security settings; may need to adjust ReadWritePaths |
385+
| Service running but no files received | Taildrop disabled; device not logged in | Enable Taildrop;`tailscale status`; ensure sender targeted this device |
386+
| "Access denied" on send | Operator not set for your user | `sudo tailscale set --operator=$USER` |
387+
| No desktop notifications | Headless/no GUI or `notify-send` missing | Install `libnotify-bin` (Debian/Ubuntu) or ignore on headless |
388+
| Dolphin menu missing | KDE cache stale or menu files missing | `kbuildsycoca6`/`kbuildsycoca5`, restart Dolphin |
389+
| Files owned by root | Ownership fix not applied yet | Service chowns post‑receive; check logs for errors |
390+
| Service logs not appearing | Systemd logging configuration | Check `journalctl -u tailscale-receive.service` for detailed logs |
381391

382392
### Security Notes
383393

0 commit comments

Comments
 (0)