Sharing Files & Devices
Sharing Files and Devices
When conducting RF assessments with RF Swift, you’ll need to exchange files between your host system and containers, as well as connect specialized hardware devices. This guide covers the automatic workspace, manual file sharing, and device binding techniques.
Automatic Workspace
Every RF Swift container gets a shared workspace directory automatically — no configuration needed.
~/rfswift-workspace/
├── my_sdr/ → /workspace inside container "my_sdr"
├── wifi_pentest/ → /workspace inside container "wifi_pentest"
└── client_assessment/ → /workspace inside container "client_assessment"| Location | Path |
|---|---|
| Host | ~/rfswift-workspace/<container-name>/ |
| Container | /workspace |
How It Works
When you run rfswift run -n my_sdr, RF Swift automatically:
- Creates
~/rfswift-workspace/my_sdr/on your host - Mounts it at
/workspaceinside the container - Shows the workspace path in the container summary
No --bind flag needed for the common case. Just save files to /workspace inside the container and they’re immediately available on your host.
# Create a container — workspace is automatic
rfswift run -i penthertz/rfswift_noble:sdr_full -n capture_session
# Inside the container, /workspace is your shared folder
cd /workspace
rtl_433 -f 433.92M -s 2M > captures/433mhz.iq
echo "Found signal at 433.92 MHz" > notes.txt
# Files are immediately available on host at:
# ~/rfswift-workspace/capture_session/captures/433mhz.iq
# ~/rfswift-workspace/capture_session/notes.txtWorkspace Options
| Flag | Description |
|---|---|
| (default) | Auto-creates ~/rfswift-workspace/<name>/ |
--workspace /path |
Use a custom host directory as workspace |
--cwd |
Mount current working directory as workspace |
--no-workspace |
Disable workspace entirely |
# Use current directory as workspace
rfswift run -i sdr_full -n quick_test --cwd
# Custom path
rfswift run -i sdr_full -n project_x --workspace ~/projects/project-x/rf-data
# Disable workspace
rfswift run -i sdr_full -n headless --no-workspaceWorkspace and Reports
The workspace integrates with RF Swift’s report generator. All files in the workspace are automatically inventoried in generated reports:
# After your assessment, generate a report
rfswift report generate -c capture_session --format html
# Report includes workspace file inventory:
# captures/433mhz.iq (capture, 12.5 MB)
# notes.txt (log, 0.1 KB)Additional Volume Bindings
For directories beyond the workspace, use the -b flag to bind additional host directories.
Basic Directory Sharing
rfswift run -i penthertz/rfswift_noble:telecom -n telecom_analysis -b ~/shared_data:/root/sharedThis binds your host’s ~/shared_data directory to /root/shared inside the container, in addition to the automatic workspace at /workspace.
Multiple Directory Bindings
You can bind multiple directories by separating them with commas:
rfswift run -i penthertz/rfswift_noble:sdr_full -n sdr_project \
-b ~/captures:/root/captures,~/scripts:/root/scripts,~/reports:/root/reportshost_path:container_path, and separate multiple bindings with commas.Verifying Bindings
The container summary will display all active bindings:
🧊 Container Summary
╭────────────────────────────────────────────────────────────────────────────╮
│ Container Name │ telecom_analysis │
├─────────────────┼──────────────────────────────────────────────────────────┤
│ X Display │ :0 │
├─────────────────┼──────────────────────────────────────────────────────────┤
│ Shell │ /bin/zsh │
├─────────────────┼──────────────────────────────────────────────────────────┤
│ Privileged Mode │ true │
├─────────────────┼──────────────────────────────────────────────────────────┤
│ Network Mode │ host │
├─────────────────┼──────────────────────────────────────────────────────────┤
│ Image Name │ penthertz/rfswift_noble:telecom │
├─────────────────┼──────────────────────────────────────────────────────────┤
│ Size on Disk │ 11150.42 MB │
├─────────────────┼──────────────────────────────────────────────────────────┤
│ Bindings │ /tmp/.X11-unix:/tmp/.X11-unix,/dev/bus/usb:/dev/bus/usb, │
│ │ │
│ │ /home/user/shared_data:/root/shared │
├─────────────────┼──────────────────────────────────────────────────────────┤
│ Extra Hosts │ pluto.local:192.168.2.1 │
╰────────────────────────────────────────────────────────────────────────────╯Adding Bindings to Existing Containers
If you forgot to bind a directory when creating a container, you can add it later using the bindings command:
rfswift bindings add -c telecom_analysis -s ~/new_data -t /root/new_dataWorking with Shared Files
Once your directories are bound, you can access them from within the container:
# Inside the container
cd /root/shared
touch analysis_results.txt
echo "Signal detected at 915MHz" > analysis_results.txtThe file will be immediately available on your host system at ~/shared_data/analysis_results.txt.
Device Binding for RF Hardware
Many RF tools require access to specific hardware devices. RF Swift makes it easy to bind these devices to your containers.
Common RF Device Bindings
| Device Type | Host Path | Container Path | Required Capabilities |
|---|---|---|---|
| RTL-SDR | /dev/bus/usb |
/dev/bus/usb |
None |
| HackRF | /dev/bus/usb |
/dev/bus/usb |
None |
| Proxmark3 | /dev/ttyACM0 |
/dev/ttyACM0 |
None |
| Bluetooth Adapters | /dev/vhci |
/dev/vhci |
NET_ADMIN |
| Wi-Fi Adapters | /dev/ttyUSB0 |
/dev/ttyUSB0 |
NET_ADMIN |
Most RF Swift images automatically bind common device paths, but you may need to add specific devices or additional bindings for specialized hardware.
RFID Device Binding
For Proxmark3 and similar RFID tools, you may need to bind specific device paths:
# Default Proxmark3 device
rfswift run -i penthertz/rfswift_noble:rfid -n rfid_scanner -s /dev/ttyACM0:/dev/ttyACM0
# For multiple Proxmark3 devices
rfswift run -i penthertz/rfswift_noble:rfid -n multi_proxmark \
-s /dev/ttyACM0:/dev/ttyACM0,/dev/ttyACM1:/dev/ttyACM1Bluetooth Device Binding
For Bluetooth scanning and analysis:
rfswift run -i penthertz/rfswift_noble:bluetooth -n bt_scanner \
-s /dev/vhci:/dev/vhci \
-a NET_ADMINNET_ADMIN capability in addition to device bindings. Add this with the -a NET_ADMIN parameter.Specialized Hardware Configuration
Harogic Spectrum Analyzer Setup
Harogic spectrum analyzers require calibration files to function properly. Here’s how to configure a container for use with these devices:
1. Copy Calibration Files
First, copy the calibration files from the provided USB to your host:
# Copy from USB to host
cp -R /media/username/37B6-82D6/CalFile ~/harogic_cal2. Bind Calibration Directory
When creating your container, bind the calibration directory to the proper location:
rfswift run -i penthertz/rfswift_noble:sdr_light -n harogic_analysis \
-b ~/harogic_cal:/rftools/analysers/SAStudio4_x86_64_05_23_17_06/bin/CalFile3. Run SAStudio
Once inside the container, you can run SAStudio with the calibration files properly configured:
# Inside the container
sastudio
Using Harogic with SDR++
To use Harogic devices with SDR++, copy the calibration files to the correct location:
# Inside the container
cp -R /rftools/analysers/SAStudio4_x86_64_05_23_17_06/bin/CalFile /usr/binThen launch SDR++:
sdrpp
Best Practices for File Sharing
- Use Consistent Directory Structures: Create a standardized directory layout for your assessments to make file management easier
- Organize by Project: Create separate shared directories for different projects or assessments
- Keep User Data Separate: Use dedicated directories for user data, software configurations, and temporary files
- Bind Read-Only When Possible: For reference data that shouldn’t be modified, consider mounting as read-only
- Use Descriptive Container Names: Name containers based on their purpose to easily identify bound directories later
Troubleshooting
Permission Issues
If you experience permission errors when accessing shared directories:
# On the host, ensure proper ownership
sudo chown -R your_username:your_username ~/shared_data
# Or make the directory world-writable (less secure)
chmod -R 777 ~/shared_dataMissing Bindings
If default bindings are missing, you can restore them while adding your custom bindings:
rfswift run -i penthertz/rfswift_noble:sdr_full -n sdr_analysis \
-b /tmp/.X11-unix:/tmp/.X11-unix,/dev/bus/usb:/dev/bus/usb,~/my_data:/root/my_dataNext Steps
Now that you understand how to share files and devices, you might want to create your own customized images: