Network File Transfer Server - rConfig V8 xFTP Services
xFTP Server: Secure File Transfer for Network Devices
Section titled “xFTP Server: Secure File Transfer for Network Devices”The xFTP Server provides secure, reliable file transfer capabilities enabling network devices to upload non-configuration files, binary data, and archive content to rConfig for centralized storage and management.
Quick Concepts
Section titled “Quick Concepts”Protocols
Section titled “Protocols”- TFTP: legacy compatibility, no auth/encryption (UDP/69)
- FTP: username/password auth (TCP/21)
- SFTP/SCP: encrypted over SSH, configurable port (often 2222)
Directory layout
Section titled “Directory layout”- Inbox (raw uploads):
/srv/xftp/ - Processed device storage (moved files): under rConfig data path (example):
/var/www/html/rconfig8/storage/app/rconfig/data/<Category>/<device-name>/xftpuploads/How xFTP Processing Works (8.1.2)
Section titled “How xFTP Processing Works (8.1.2)”- Devices upload a file via TFTP/FTP/SFTP into the inbox directory:
/srv/xftp/. - A scheduled sweeper moves matched files into a device’s
xftpuploads/directory. - rConfig tracks the lifecycle in the
xftp_uploadstable (source path, destination path, timestamps, metadata).
Scheduled sweep task
Section titled “Scheduled sweep task”php artisan rconfig:sweep-xftp-dirManual sweep execution
Section titled “Manual sweep execution”cd /var/www/html/rconfig8php artisan rconfig:sweep-xftp-dirManaging xFTP Services (Docker)
Section titled “Managing xFTP Services (Docker)”You can manage the Docker microservices through:
- UI: Settings → xFTP Services
- CLI:
php artisan rconfig:xftp-toggle
# Statusphp artisan rconfig:xftp-toggle --status
Uploading Files (device examples)
Section titled “Uploading Files (device examples)”Router(config)#file prompt quietRouter#copy vlan.dat tftp://192.168.1.131/1234-vlan.datMatching uploaded files to devices
Section titled “Matching uploaded files to devices”Legacy matching
Section titled “Legacy matching”Legacy behavior expects filenames like:
1234-anything.ext(device ID is leading digits before a-)
File Matching Patterns (8.1.2)
Section titled “File Matching Patterns (8.1.2)”8.1.2 adds optional pattern-based routing when filenames don’t contain the numeric device ID.
Where: Settings → xFTP Services → File Matching
Pattern types (8.1.2):
regexprefixsuffixcontainsexact
Rule precedence: first match wins (ordered by pattern ID). If no rule matches, rConfig falls back to legacy extraction.
Viewing and managing uploaded files (8.1.2 UI)
Section titled “Viewing and managing uploaded files (8.1.2 UI)”Settings: Inbox (raw /srv/xftp/ directory)
Section titled “Settings: Inbox (raw /srv/xftp/ directory)”Shows files physically present in /srv/xftp/ (awaiting sweep or unmatched).
Actions:
- Peek (text-only preview; capped at 1MB)
- Download
- Delete (single file)
- Empty directory
- Copy path
Type/metadata:
- rConfig infers file type (text/binary/archive/etc.) and shows metadata in the table.
Device view: Processed uploads (tracked moved files)
Section titled “Device view: Processed uploads (tracked moved files)”Shows a paginated, DB-backed history of moved files for a device.
Actions match the Settings inbox: peek (text), download, delete, copy path, and metadata.
Backfilling upload tracking (8.1.2)
Section titled “Backfilling upload tracking (8.1.2)”If you upgraded and already have files on disk, populate xftp_uploads from the filesystem:
php artisan rconfig:xftp-backfill-uploads
# Dry runphp artisan rconfig:xftp-backfill-uploads --dry-run
# Limit scanned files (0 = unlimited)php artisan rconfig:xftp-backfill-uploads --limit=1000Retention and auto-cleanup (8.1.2)
Section titled “Retention and auto-cleanup (8.1.2)”8.1.2 integrates xFTP retention into the existing purge framework (settings_purge).
Targets:
xftp_root: retention for tracked inbox files (/srv/xftp/)xftp_device_uploads: retention for tracked moved device uploads (xftpuploads/)
Default values (seeded when xftp_uploads exists):
xftp_root: 30 daysxftp_device_uploads: 90 days
Run via CLI:
# Run everythingphp artisan rconfig:data-purge
# Run only xFTP targets (option name is legacy: --table)php artisan rconfig:data-purge --table=xftp_rootphp artisan rconfig:data-purge --table=xftp_device_uploads
# Dry runphp artisan rconfig:data-purge --table=xftp_root --dry-runTroubleshooting
Section titled “Troubleshooting”Files are stuck in /srv/xftp/
Section titled “Files are stuck in /srv/xftp/”- Run
php artisan rconfig:sweep-xftp-dir. - Confirm the filename can be matched (legacy
{deviceid}-...or a File Matching rule).
Peek doesn’t work
Section titled “Peek doesn’t work”- Peek is text-only and capped at 1MB. Download archives/binaries instead.
Postgres duplicate key on xftp_uploads_pkey
Section titled “Postgres duplicate key on xftp_uploads_pkey”8.1.2 includes a mitigation for out-of-sync Postgres sequences (often from manual inserts). When detected, rConfig repairs the sequence and retries the insert.
Summary
Section titled “Summary”In 8.1.2, xFTP becomes fully trackable and manageable: inbox visibility, device history, file metadata, and retention/auto-clean via purge targets. Legacy behaviors still apply where not explicitly overridden.
Installation Workflow:
- Detection: Setup wizard checks for Docker installation
- Prompt: If Docker not found, prompts for automated installation
- Confirmation: Select ‘Yes’ to proceed with Docker installation
- Download and Install: Wizard downloads Docker packages and installs dependencies
- Service Start: Automatically starts Docker daemon and enables at boot
- Verification: Confirms Docker installation and displays version
Installation Duration: Docker installation typically completes in 1-3 minutes depending on internet connection speed and package repository responsiveness.
Manual Docker Installation
Section titled “Manual Docker Installation”If you prefer manual Docker installation or have specific Docker configuration requirements:
Ubuntu/Debian:
# Update package indexsudo apt-get update
# Install prerequisitessudo apt-get install ca-certificates curl gnupg
# Add Docker GPG keysudo install -m 0755 -d /etc/apt/keyringscurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpgsudo chmod a+r /etc/apt/keyrings/docker.gpg
# Add Docker repositoryecho \ "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# Install Dockersudo apt-get updatesudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Start and enable Dockersudo systemctl start dockersudo systemctl enable dockerRocky Linux/RHEL/CentOS:
# Install required packagessudo dnf install -y yum-utils
# Add Docker repositorysudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
# Install Dockersudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Start and enable Dockersudo systemctl start dockersudo systemctl enable dockerVerify Installation:
docker --versionsudo systemctl status dockerOnce Docker is installed (automatically or manually), return to the xFTP setup wizard to deploy microservices.
Removing Docker
Section titled “Removing Docker”If you need to completely remove Docker and all xFTP services:
Ubuntu/Debian:
# Stop all containerssudo docker stop $(sudo docker ps -aq)
# Remove all containerssudo docker rm $(sudo docker ps -aq)
# Remove Docker packagessudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Remove Docker data and configurationsudo rm -rf /var/lib/dockersudo rm -rf /var/lib/containerdsudo rm -rf /etc/dockerRocky Linux/RHEL/CentOS:
# Stop all containerssudo docker stop $(sudo docker ps -aq)
# Remove all containerssudo docker rm $(sudo docker ps -aq)
# Remove Docker packagessudo dnf remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
# Remove Docker data and configurationsudo rm -rf /var/lib/dockersudo rm -rf /var/lib/containerdsudo rm -rf /etc/dockerDeploying xFTP Services
Section titled “Deploying xFTP Services”Accessing xFTP Management
Section titled “Accessing xFTP Management”The xFTP Server can be managed through two interfaces:
Web Interface: Navigate to Settings → xFTP Services in the rConfig UI
Command Line Interface: Use the xFTP toggle command for service deployment and management:
php artisan rconfig:xftp-toggleService Status Overview
Section titled “Service Status Overview”Before deploying services, verify Docker status and existing xFTP service state:
Via Web UI: The xFTP Services page displays:
- Docker installation status and version
- Running xFTP services (TFTP, FTP, SFTP)
- Port configurations
- Credential status
- File count in xFTP directory
Via CLI:
php artisan rconfig:xftp-toggle --status
Deploying Services
Section titled “Deploying Services”TFTP Service Deployment
Section titled “TFTP Service Deployment”TFTP provides basic file transfer without authentication, suitable for legacy devices and low-security environments.
Installing TFTP
Section titled “Installing TFTP”Interactive Setup:
cd /var/www/html/rconfig8/currentphp artisan rconfig:xftp-toggleSetup Workflow:
- Service Selection: Choose TFTP from available protocols

-
Image Download: Docker pulls TFTP image (first time only)
-
Container Creation: TFTP container deploys and starts automatically
-
Verification: Service status shows TFTP running on port 69
TFTP Configuration
Section titled “TFTP Configuration”Default Settings:
- Port: 69 (standard TFTP port)
- Protocol: UDP
- Authentication: None (TFTP is unauthenticated by design)
- Upload Directory:
/srv/xftp/
No Credentials Required: TFTP operates without username/password authentication. Any device with network access to the rConfig server can upload files.
Video Tutorial: TFTP Setup
Section titled “Video Tutorial: TFTP Setup”Complete TFTP service deployment from Docker installation to first file upload
Stopping TFTP Service
Section titled “Stopping TFTP Service”To stop and remove the TFTP service:
php artisan rconfig:xftp-toggleRemoval Workflow:
- Service Detection: Wizard detects running TFTP service
- Removal Confirmation: Prompt to stop and remove container
- Container Cleanup: TFTP container stopped and removed
- Verification: Service status confirms TFTP no longer running
FTP Service Deployment
Section titled “FTP Service Deployment”FTP provides authenticated file transfer with credential-based access control, balancing security and device compatibility.
Installing FTP
Section titled “Installing FTP”Interactive Setup:
cd /var/www/html/rconfig8/currentphp artisan rconfig:xftp-toggleSetup Workflow:
- Service Selection: Choose FTP from available protocols

-
Credential Configuration: Enter FTP username and password
-
Image Download: Docker pulls FTP image (first time only)
-
Container Creation: FTP container deploys with configured credentials
-
Verification: Service status shows FTP running on port 21

FTP Configuration
Section titled “FTP Configuration”Default Settings:
- Port: 21 (standard FTP control port)
- Protocol: TCP
- Authentication: Username and password (configured during setup)
- Transfer Mode: Active and passive mode supported
- Upload Directory:
/srv/xftp/
Credential Storage: FTP credentials are stored in the .env file and can be referenced in device commands using variables (detailed in upload procedures section).
Credential Management
Section titled “Credential Management”Reusing Existing Credentials: When redeploying FTP service, the wizard prompts to reuse previously configured credentials:
Options:
- Reuse Credentials: Use existing username/password from
.envfile - Update Credentials: Enter new username/password, overwriting previous values
Use Cases:
- Reuse credentials when restarting service without changes
- Update credentials for security rotation or policy compliance
Video Tutorial: FTP Setup
Section titled “Video Tutorial: FTP Setup”Step-by-step FTP service deployment including credential configuration and testing
Stopping FTP Service
Section titled “Stopping FTP Service”To stop and remove the FTP service:
php artisan rconfig:xftp-toggleRemoval Workflow:
- Service Detection: Wizard detects running FTP service
- Removal Confirmation: Prompt to stop and remove container
- Credential Preservation: FTP credentials remain in
.envfor future deployments - Container Cleanup: FTP container stopped and removed
- Verification: Service status confirms FTP no longer running
SFTP/SCP Service Deployment
Section titled “SFTP/SCP Service Deployment”SFTP provides encrypted, authenticated file transfer over SSH, offering enterprise-grade security for sensitive file uploads.
Installing SFTP/SCP
Section titled “Installing SFTP/SCP”Interactive Setup:
cd /var/www/html/rconfig8/currentphp artisan rconfig:xftp-toggleSetup Workflow:
- Service Selection: Choose SFTP from available protocols

-
Port Configuration: Enter SFTP service port (must not conflict with host SSH port 22)
-
Credential Configuration: Enter SFTP username and password
-
Image Download: Docker pulls SFTP image (first time only)
-
Container Creation: SFTP container deploys with configured port and credentials
-
Verification: Service status shows SFTP running on configured port

SFTP Configuration
Section titled “SFTP Configuration”Default Settings:
- Port: Configurable (recommended: 2222, cannot be 22)
- Protocol: SSH/TCP (encrypted transport)
- Authentication: SSH username and password (configured during setup)
- Encryption: All data encrypted in transit via SSH
- Upload Directory:
/srv/xftp/ - SCP Support: SFTP service also handles SCP connections
Verifying Port Availability:
# Check if proposed port is availablesudo netstat -tulpn | grep :2222
# No output = port available# Output shows existing service = choose different portCredential Management
Section titled “Credential Management”Reusing Existing Credentials: When redeploying SFTP service, the wizard prompts to reuse previously configured credentials and port:
Options:
- Reuse Configuration: Use existing username/password/port from
.envfile - Update Configuration: Enter new credentials or change port number
SFTP vs SCP
Section titled “SFTP vs SCP”The SFTP service container handles both SFTP and SCP protocols:
SFTP (SSH File Transfer Protocol):
- Interactive file transfer protocol over SSH
- Supports directory listing, file management, resumable transfers
- More feature-rich than SCP
- Preferred for modern devices and manual transfers
SCP (Secure Copy Protocol):
- Simple file copy over SSH
- Non-interactive, command-line oriented
- Less overhead than SFTP for single file transfers
- Supported by legacy devices and scripting
Connection Syntax:
# SFTP connectionsftp -P 2222 username@rconfig-server-ip
# SCP uploadscp -P 2222 localfile.txt username@rconfig-server-ip:/remote/path/Both protocols authenticate with the same credentials configured during SFTP service setup.
Video Tutorial: SFTP Setup
Section titled “Video Tutorial: SFTP Setup”Complete SFTP service deployment including port selection, credential configuration, and testing both SFTP and SCP uploads
Stopping SFTP Service
Section titled “Stopping SFTP Service”To stop and remove the SFTP service:
php artisan rconfig:xftp-toggleRemoval Workflow:
- Service Detection: Wizard detects running SFTP service
- Removal Confirmation: Prompt to stop and remove container
- Configuration Preservation: SFTP credentials and port settings remain in
.envfor future deployments - Container Cleanup: SFTP container stopped and removed
- Verification: Service status confirms SFTP no longer running
Uploading Files to xFTP Services
Section titled “Uploading Files to xFTP Services”Manual File Upload from Devices
Section titled “Manual File Upload from Devices”Network devices upload files to xFTP services using protocol-specific commands. File naming must include the device ID for automated processing and device association.
TFTP Upload Example
Section titled “TFTP Upload Example”Cisco IOS Devices:
# Suppress filename prompts (optional but recommended)Router(config)#file prompt quiet
# Upload file to rConfig TFTP serverRouter#copy vlan.dat tftp://192.168.1.131/1234-vlan.dat!!376 bytes copied in 0.004 secs (94000 bytes/sec)Command Breakdown:
copy vlan.dat- Source file on device local storagetftp://192.168.1.131- rConfig server IP with TFTP protocol/1234-vlan.dat- Target filename with device ID (1234) properly delimited
FTP Upload Example
Section titled “FTP Upload Example”Cisco IOS Devices:
Using Credential Variables (recommended for security):
Router#copy vlan.dat ftp://{ftpusername}:{ftppassword}@192.168.1.131/{deviceid}-vlan.datVariable Substitution:
{ftpusername}- Replaced with FTP username from rConfig.envfile{ftppassword}- Replaced with FTP password from rConfig.envfile{deviceid}- Replaced with actual device ID when command executes
SFTP Upload Example
Section titled “SFTP Upload Example”Cisco IOS Devices (supporting SFTP):
Using Credential Variables:
Router#copy vlan.dat sftp://{sftpusername}:{sftppassword}@192.168.1.131:2222/{deviceid}-vlan.datNote Port Specification: SFTP command must include custom port (:2222) if not using standard port 22.
Device ID Requirement
Section titled “Device ID Requirement”Finding Device ID:
- Visible in rConfig UI on device list and device detail pages
- Available in database
devicestable,idcolumn - Automatically substituted when using
{deviceid}variable in commands
Automated File Upload via Commands
Section titled “Automated File Upload via Commands”Files can be uploaded automatically during device polling by incorporating upload commands into rConfig command categories.
Configuring Automated Uploads
Section titled “Configuring Automated Uploads”-
Navigate to Commands Section: Go to Settings → Commands in rConfig UI
-
Create or Edit Command Category: Select the command category used for target devices
-
Add Upload Command: Insert the copy command with variables:
Example Command:
copy vlan.dat tftp://192.168.1.131/{deviceid}-vlan.dat-
Assign to Devices: Ensure devices use this command category in their configuration
-
Execution During Backup: When rConfig backs up device configuration, the upload command executes automatically, transferring the file to xFTP service
Automated Upload Benefits
Section titled “Automated Upload Benefits”Consistency: Upload commands execute identically across all devices in the category, eliminating manual command variations.
Scheduling: Files upload automatically on backup schedule without administrator intervention.
Audit Trail: Command execution logs provide record of file uploads for compliance and troubleshooting.
Scalability: Single command configuration applies to hundreds or thousands of devices, avoiding per-device manual setup.
Video Tutorial: File Upload Workflows
Section titled “Video Tutorial: File Upload Workflows”Demonstration of manual and automated file upload workflows including command configuration and troubleshooting
Viewing and Managing Uploaded Files
Section titled “Viewing and Managing Uploaded Files”Accessing Device Files
Section titled “Accessing Device Files”Successfully processed files (those with valid device IDs) appear on the device’s page in the rConfig UI.
Navigation: Go to Devices → [Device Name] and scroll to the uploaded files section at the bottom of the page.
Files Table: Displays uploaded files with:
- Filename (with timestamp appended for versioning)
- Upload date and time
- File size
- File type/extension
View All Files: Click View All to access the complete file management interface
Available Actions:
View: Display file contents in browser (for text files) or download prompt (for binary files)
Download: Save file to local system for analysis, backup, or distribution
Delete: Remove file from device storage (with confirmation prompt)
Bulk Operations: Select multiple files for batch download or deletion
xFTP Directory Management
Section titled “xFTP Directory Management”The xFTP upload directory (/srv/xftp/) should remain empty under normal operation. Files persisting in this directory indicate processing issues.
Viewing Orphaned Files: Navigate to Settings → xFTP Services to see files in /srv/xftp/ that were not processed
Orphaned File Causes:
- Filename missing device ID
- Device ID not properly delimited (missing dash separator)
- Device ID doesn’t match any device in rConfig inventory
- Filename pattern doesn’t conform to requirements
Manual Cleanup: Delete orphaned files directly from the xFTP Services page or via CLI:
# List files in xFTP directoryls -la /srv/xftp/
# Remove specific filerm /srv/xftp/invalid-filename.dat
# Clear all orphaned files (use with caution)rm /srv/xftp/*Troubleshooting
Section titled “Troubleshooting”Files Not Appearing on Device Page
Section titled “Files Not Appearing on Device Page”Symptom: Files uploaded successfully but don’t appear in device file listing.
Diagnostic Steps:
-
Check xFTP Directory: Verify file present in
/srv/xftp/Terminal window ls -la /srv/xftp/ -
Verify Filename Pattern: Ensure device ID properly delimited in filename:
- Valid:
1234-vlan.dat(device ID 1234 before dash) - Invalid:
vlan1234.dat(no dash separator) - Invalid:
vlan-1234.dat(device ID after dash)
- Valid:
-
Confirm Device ID Exists: Verify device ID in filename matches actual device in rConfig:
Terminal window # Check device exists with this IDmysql -u rconfig -p rconfig -e "SELECT id, device_name FROM devices WHERE id = 1234;" -
Manual Sweep: Trigger sweep task manually to process files immediately:
Terminal window cd /var/www/html/rconfig8/currentphp artisan rconfig:sweep-tftp-dir -
Check Sweep Task Logs: Review logs for processing errors:
Terminal window tail -50 /var/www/html/rconfig8/current/storage/logs/laravel.log | grep sweep
Resolution:
- If filename pattern incorrect: Re-upload with correct pattern
- If device doesn’t exist: Create device in rConfig or update filename with valid device ID
- If sweep task not running: Verify scheduled task enabled in Settings → Scheduled Tasks
Upload Failures
Section titled “Upload Failures”Symptom: Device reports upload error or times out during file transfer.
Common Causes and Resolutions:
Service Not Running:
# Check service statusphp artisan rconfig:xftp-toggle --status
# If service stopped, restartphp artisan rconfig:xftp-toggle# Select service to startFirewall Blocking:
# Verify port accessibility from devicetelnet <rconfig-server-ip> 69 # TFTPtelnet <rconfig-server-ip> 21 # FTPtelnet <rconfig-server-ip> 2222 # SFTP
# If blocked, add firewall rulesudo firewall-cmd --add-port=69/udp --permanent # TFTPsudo firewall-cmd --add-port=21/tcp --permanent # FTPsudo firewall-cmd --add-port=2222/tcp --permanent # SFTPsudo firewall-cmd --reloadAuthentication Failure (FTP/SFTP):
# Verify credentials in .env filegrep -E 'FTP_USERNAME|FTP_PASSWORD|SFTP_USERNAME|SFTP_PASSWORD' /var/www/html/rconfig8/current/.env
# Test credentials manuallyftp <rconfig-server-ip># Enter username and password when prompted
# For SFTPsftp -P 2222 username@<rconfig-server-ip>Insufficient Disk Space:
# Check available spacedf -h /srv/xftp/
# Clear old orphaned files if neededrm /srv/xftp/*
# Increase disk allocation if persistently fullContainer Fails to Start
Section titled “Container Fails to Start”Symptom: Docker container status shows exited or error state.
Diagnostic Steps:
-
Check Container Logs:
Terminal window # List all containers including stoppeddocker ps -a# View logs for specific servicedocker logs rconfig-tftpdocker logs rconfig-ftpdocker logs rconfig-sftp -
Port Conflicts:
Terminal window # Check if port already in usesudo netstat -tulpn | grep :69 # TFTPsudo netstat -tulpn | grep :21 # FTPsudo netstat -tulpn | grep :2222 # SFTP# If port occupied, stop conflicting service or use different port -
Permission Issues:
Terminal window # Verify xFTP directory permissionsls -la /srv/xftp/# Should be owned by appropriate user with write permissionssudo chown -R www-data:www-data /srv/xftp/sudo chmod 755 /srv/xftp/ -
Docker Service Issues:
Terminal window # Restart Docker servicesudo systemctl restart docker# Check Docker daemon logssudo journalctl -u docker -n 50
Resolution:
- Fix identified issue (port conflict, permissions, etc.)
- Remove failed container:
docker rm rconfig-<service> - Redeploy service via
php artisan rconfig:xftp-toggle
Sweep Task Not Processing Files
Section titled “Sweep Task Not Processing Files”Symptom: Files remain in /srv/xftp/ directory indefinitely despite scheduled sweep task.
Diagnostic Steps:
-
Verify Scheduled Task Enabled:
- Navigate to Settings → Scheduled Tasks
- Locate “TFTP Directory Sweep” task
- Ensure status is “Enabled”
-
Check Task Execution History:
- View task run history for errors or skipped executions
- Review last successful run timestamp
-
Manual Execution:
Terminal window # Run sweep manually to check for errorscd /var/www/html/rconfig8/currentphp artisan rconfig:sweep-tftp-dir# Check output for errors or warnings -
Laravel Scheduler Status:
Terminal window # Verify Laravel scheduler is runningps aux | grep schedule:run# Check cron configurationcrontab -u www-data -l | grep schedule
Resolution:
- If task disabled: Enable in Scheduled Tasks settings
- If scheduler not running: Verify cron job configured correctly
- If errors in manual run: Review logs and fix identified issues
- Adjust task frequency if 15-minute interval insufficient for upload volume
Advanced Configuration
Section titled “Advanced Configuration”Custom Upload Directory (V8 Feature)
Section titled “Custom Upload Directory (V8 Feature)”Custom Directory Configuration:
-
Set Custom Path: Edit
.envfile to specify upload directory:Terminal window nano /var/www/html/rconfig8/current/.env# Add or modify:XFTP_ROOT_DIR=/path/to/custom/upload/directory -
Create Directory: Ensure custom directory exists with proper permissions:
Terminal window sudo mkdir -p /path/to/custom/upload/directorysudo chown www-data:www-data /path/to/custom/upload/directorysudo chmod 755 /path/to/custom/upload/directory -
Verify Access: Test rConfig can access custom directory:
Terminal window cd /var/www/html/rconfig8/currentphp artisan rconfig:sweep-tftp-dir# Should show custom directory in output -
Configure External FTP Service: Point your FTP/SFTP service to upload files to custom directory specified in
XFTP_ROOT_DIR
Use Cases:
- Integration with existing enterprise FTP infrastructure
- Compliance requirements for specific storage locations
- Network segmentation requiring FTP services on separate hosts
- High-availability FTP configurations with load balancing
Multiple Service Deployment
Section titled “Multiple Service Deployment”All xFTP services can run simultaneously, providing multiple upload options for devices with different capabilities:
Parallel Service Configuration:
# Deploy TFTP for legacy devicesphp artisan rconfig:xftp-toggle# Select TFTP
# Deploy FTP for authenticated transfersphp artisan rconfig:xftp-toggle# Select FTP, configure credentials
# Deploy SFTP for secure transfersphp artisan rconfig:xftp-toggle# Select SFTP, configure port and credentialsAll Services Active:
- TFTP listening on port 69 (no authentication)
- FTP listening on port 21 (with credentials)
- SFTP listening on port 2222 (encrypted with credentials)
Resource Allocation: Each service runs in isolated container with dedicated resources. Monitor overall server resource usage when running multiple services under high load.
Device Configuration: Different device groups can use different protocols based on capabilities:
- Legacy switches → TFTP
- Modern routers → FTP
- Security appliances → SFTP
Performance Optimization
Section titled “Performance Optimization”For High-Volume Environments:
Increase Sweep Frequency: Reduce time files remain in upload directory:
- Navigate to Settings → Scheduled Tasks
- Edit “TFTP Directory Sweep” task
- Change frequency from 15 minutes to 5 or 10 minutes
- Save changes
Docker Resource Limits: Allocate additional resources to busy services:
# Edit docker-compose configuration (if using)# Or manually specify resource limits when creating containers
docker run -d \ --name rconfig-ftp \ --memory="512m" \ --cpus="1.0" \ -p 21:21 \ -v /srv/xftp:/home/ftpuser \ rconfig/ftp-serverStorage Optimization: Implement retention policies for uploaded files:
- Regularly archive old device files to external storage
- Delete obsolete file versions per policy
- Monitor
/srv/xftpsize trends
Security Considerations
Section titled “Security Considerations”Protocol Security Comparison
Section titled “Protocol Security Comparison”TFTP (Lowest Security):
- No authentication - any network-accessible device can upload
- No encryption - all data transmitted in plaintext
- No access control - cannot restrict upload sources
- Use Only: In isolated lab networks or with legacy devices lacking alternatives
FTP (Medium Security):
- Credential-based authentication prevents unauthorized uploads
- No encryption - credentials and data transmitted in plaintext
- Susceptible to credential sniffing on untrusted networks
- Use When: Authentication required but devices lack SFTP support
SFTP (Highest Security):
- SSH-based authentication with encrypted credentials
- Full encryption - all data encrypted in transit
- Protection against eavesdropping and man-in-the-middle attacks
- Use For: Production environments, sensitive data, compliance requirements
Access Control
Section titled “Access Control”Network-Level Restrictions:
# Firewall rules limiting upload sources to trusted networkssudo firewall-cmd --permanent --add-rich-rule=' rule family="ipv4" source address="10.0.0.0/8" port protocol="tcp" port="21" accept'
sudo firewall-cmd --permanent --add-rich-rule=' rule family="ipv4" source address="10.0.0.0/8" port protocol="tcp" port="2222" accept'
sudo firewall-cmd --reloadService Isolation: Docker containers provide isolation between xFTP services and core rConfig:
- Container compromise doesn’t directly expose rConfig application
- Resource limits prevent denial-of-service impact on other services
- Separate credential management per service
Credential Management
Section titled “Credential Management”Secure Credential Storage:
- FTP/SFTP credentials stored in
.envfile (restrict file permissions) - Never commit
.envto version control - Rotate credentials regularly per security policy
File Permissions:
# Ensure .env file is not world-readablechmod 600 /var/www/html/rconfig8/current/.envchown www-data:www-data /var/www/html/rconfig8/current/.envCredential Rotation:
- Update credentials in
.envfile - Redeploy affected service (FTP or SFTP)
- Update device configurations with new credentials or use
{ftppassword}variables for automatic substitution
Audit and Monitoring
Section titled “Audit and Monitoring”Upload Activity Monitoring:
- Review
/srv/xftp/regularly for unexpected files - Monitor device file upload patterns for anomalies
- Check container logs for authentication failures or unusual access patterns
Log Review:
# Review FTP service logsdocker logs rconfig-ftp | grep -i failed
# Review SFTP service logsdocker logs rconfig-sftp | grep -i auth
# Check system logs for security eventssudo journalctl -u docker | grep -i errorAutomated Alerts: Configure monitoring to alert on:
- Multiple authentication failures (potential brute force)
- Uploads from unexpected IP addresses
- Abnormally large file uploads
- Services stopping unexpectedly
Enterprise Deployment Considerations
Section titled “Enterprise Deployment Considerations”Non-Docker Deployments
Section titled “Non-Docker Deployments”While Docker provides simplified deployment, some organizations prefer native FTP services:
Reasons for Non-Docker Deployment:
- Existing enterprise FTP infrastructure
- Security policies prohibiting container usage
- Integration with enterprise authentication (LDAP, Active Directory)
- Specific compliance or audit requirements
Custom FTP Service Integration:
- Deploy FTP/SFTP service using preferred method (native packages, appliances)
- Configure upload directory to match rConfig expectations
- Set
XFTP_ROOT_DIRin.envto custom upload location - Ensure rConfig has read/write access to upload directory
- Verify sweep task can process files from custom location
Enterprise Support Scope:
- Architecture review and recommendations
- Integration with existing infrastructure
- Custom authentication mechanisms
- High-availability and load balancing configurations
- Performance optimization for high-volume environments
- Compliance and security consulting
High-Availability Configurations
Section titled “High-Availability Configurations”HA FTP Service Design:
- Load-balanced FTP/SFTP services with shared backend storage
- Active-passive failover for service continuity
- Distributed file processing across multiple rConfig nodes
- Centralized credential management and rotation
Shared Storage Requirements:
- NFS or clustered filesystem for
/srv/xftp/across rConfig instances - File locking mechanisms to prevent processing conflicts
- Distributed sweep task coordination
Compliance and Regulatory Requirements
Section titled “Compliance and Regulatory Requirements”Data Retention: Configure automated archival and deletion policies:
- Define retention periods for uploaded files
- Automated archival to compliant long-term storage
- Secure deletion ensuring data is unrecoverable
Audit Trail: Comprehensive logging for compliance:
- All upload events logged with source IP, timestamp, filename
- Authentication attempts and failures recorded
- File processing and movement tracked
- Regular audit log review and reporting
Encryption at Rest: Uploaded files encrypted on disk:
- Filesystem-level encryption (LUKS, dm-crypt)
- Application-level encryption before storage
- Key management for encrypted storage
Related Documentation
Section titled “Related Documentation”- Configuration Backup Implementation - Understanding backup workflows
- Device Management - Managing device inventory and connectivity
- Scheduled Tasks - Configuring automated system tasks
- Commands Configuration - Setting up device command categories
Quick Reference
Section titled “Quick Reference”Service Deployment Commands
Section titled “Service Deployment Commands”Install/Manage Services:
cd /var/www/html/rconfig8/currentphp artisan rconfig:xftp-toggleCheck Service Status:
php artisan rconfig:xftp-toggle --statusManual File Sweep:
php artisan rconfig:sweep-tftp-dirUpload Command Templates
Section titled “Upload Command Templates”TFTP Upload:
copy <source-file> tftp://<rconfig-ip>/{deviceid}-<filename>FTP Upload with Variables:
copy <source-file> ftp://{ftpusername}:{ftppassword}@<rconfig-ip>/{deviceid}-<filename>SFTP Upload with Variables:
copy <source-file> sftp://{sftpusername}:{sftppassword}@<rconfig-ip>:<port>/{deviceid}-<filename>Service Ports
Section titled “Service Ports”| Service | Default Port | Protocol | Authentication |
|---|---|---|---|
| TFTP | 69 | UDP | None |
| FTP | 21 | TCP | Username/Password |
| SFTP | 2222 (configurable) | TCP/SSH | Username/Password (encrypted) |
Directory Locations
Section titled “Directory Locations”Upload Directory: /srv/xftp/
Device Storage: Configured in rConfig device storage settings
Configuration File: /var/www/html/rconfig8/current/.env
Credential Variables
Section titled “Credential Variables”Available for use in device commands:
{ftpusername}- FTP username from .env{ftppassword}- FTP password from .env{sftpusername}- SFTP username from .env{sftppassword}- SFTP password from .env{deviceid}- Device ID for file association
Troubleshooting Quick Checks
Section titled “Troubleshooting Quick Checks”Service Not Running:
docker ps | grep rconfigsystemctl status dockerFiles Not Processing:
ls -la /srv/xftp/php artisan rconfig:sweep-tftp-dirUpload Fails:
telnet <rconfig-ip> <port>sudo firewall-cmd --list-allContainer Issues:
docker ps -adocker logs rconfig-<service>Summary
Section titled “Summary”The xFTP Server provides flexible, secure file transfer capabilities for network devices through Docker-based microservices. By supporting TFTP, FTP, and SFTP protocols in parallel, rConfig accommodates diverse device capabilities while maintaining centralized file management and automated processing.
Key Capabilities:
- Multi-Protocol Support: TFTP, FTP, and SFTP services available simultaneously
- Automated Processing: Files automatically organized by device with version tracking
- Security Options: From unauthenticated TFTP to encrypted SFTP based on requirements
- Flexible Deployment: Docker-based by default with custom infrastructure support
- Scalable Architecture: Microservices design enables independent service management and scaling
Deployment Best Practices:
- Use SFTP for production environments requiring security
- Implement automated file uploads via command categories for consistency
- Monitor
/srv/xftp/directory to ensure processing efficiency - Configure appropriate sweep task frequency for upload volume
- Apply network-level access controls to restrict upload sources
For enterprise deployments requiring custom FTP infrastructure, non-Docker implementations, or high-availability architectures, contact rConfig support for specialized consultation and implementation assistance.