Skip to content

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. Built on Docker microservices architecture, xFTP supports multiple protocols (TFTP, FTP, SFTP) with automated file processing and device-specific organization.


xFTP (Extended File Transfer Protocol) is rConfig’s collective term for multiple file transfer protocols operating in parallel to serve different network device requirements and security policies. The xFTP Server enables network devices to upload files that fall outside standard configuration backup workflows:

Binary Files: Device firmware images, licensing files, cryptographic certificates, and other non-text content that cannot be captured via SSH/Telnet configuration retrieval.

Archive Files: Compressed archives (tar, zip, gzip) containing multiple files, logs, or configuration bundles that devices export as single packages.

Supplementary Data: VLAN databases, MAC address tables, routing table exports, or any device-generated files requiring centralized storage and version tracking.

Log Files: Device-generated logs, diagnostics, or troubleshooting outputs uploaded for analysis and retention.

The xFTP Server supports three file transfer protocols, each addressing specific use cases and security requirements:

TFTP (Trivial File Transfer Protocol):

  • Use Case: Legacy device compatibility, simple file transfers
  • Security: No authentication or encryption (plaintext transmission)
  • Transport: UDP-based (unreliable, no guaranteed delivery)
  • Best For: Older network devices without FTP/SFTP support, low-security environments
  • Port: 69 (standard)

FTP (File Transfer Protocol):

  • Use Case: Authenticated file transfers with broad device support
  • Security: Credential-based authentication (username/password)
  • Transport: TCP-based (reliable delivery with error correction)
  • Best For: Modern devices supporting FTP, environments requiring authentication
  • Port: 21 (standard)
  • Data Transfer: Active or passive mode support

SFTP (SSH File Transfer Protocol):

  • Use Case: Secure, encrypted file transfers for sensitive environments
  • Security: SSH-based encryption and authentication
  • Transport: TCP-based over SSH (encrypted, authenticated, reliable)
  • Best For: Security-conscious deployments, compliance requirements, sensitive data
  • Port: Configurable (typically 2222 to avoid conflict with host SSH on port 22)
  • Note: Can also service SCP (Secure Copy Protocol) connections

The xFTP Server implements each protocol as an independent Docker container, providing operational and architectural benefits:

Service Isolation: Each protocol runs in a dedicated container with allocated resources. TFTP, FTP, and SFTP operate independently—failures in one service don’t impact others or core rConfig functionality.

Parallel Operation: All three protocols can run simultaneously on the same rConfig server, enabling devices with different capabilities to upload files concurrently. A TFTP-only device and an SFTP-capable device can both transfer files without conflict.

Resource Management: Docker provides resource limits and allocation per container. High FTP traffic doesn’t starve TFTP or SFTP services of CPU, memory, or network bandwidth.

Simplified Deployment: Docker abstracts infrastructure complexity. Services deploy with single commands without manual FTP daemon configuration, SSH server setup, or TFTP listener management.

Version Control and Rollback: Container images provide versioned deployments. Service updates apply consistently, and rollback to previous versions is straightforward if issues arise.


When network devices upload files to xFTP services, a multi-stage processing workflow ensures files are organized, versioned, and associated with the correct devices:

Upload Initiation: Network device executes file transfer command (copy tftp, copy ftp, copy sftp) specifying rConfig server IP and target filename.

Protocol Handling: Docker container for the selected protocol (TFTP, FTP, SFTP) receives the connection and file transfer request.

Initial Storage: Uploaded files are stored in the centralized xFTP directory on the rConfig server:

Terminal window
/srv/xftp/

Temporary Holding: Files remain in /srv/xftp/ temporarily until the automated sweep process identifies and moves them to device-specific storage locations.

Scheduled Sweep Task: rConfig runs an automated task every 15 minutes (configurable) that scans the xFTP directory for uploaded files:

Terminal window
php artisan rconfig:sweep-tftp-dir

Device ID Detection: The sweep task examines each filename for a device ID pattern. Device IDs are numeric identifiers assigned to each device in rConfig (visible in the UI and database devices table, id column).

Filename Pattern Matching: Valid filenames must contain the device ID between the last / and a - character:

  • Valid: vlan-1234.dat (device ID: 1234)
  • Valid: /path/20003-config.log (device ID: 20003)
  • Invalid: config1234.log (device ID not properly delimited)
  • Invalid: 1234config.log (device ID not properly delimited)

File Organization: When a valid device ID is detected:

  1. File moved from /srv/xftp/ to device-specific storage directory
  2. Timestamp appended to filename for version tracking
  3. File becomes visible on the device’s page in rConfig UI
  4. Database record created linking file to device

Orphaned Files: Files without valid device IDs remain in /srv/xftp/ and are not processed. These require manual review and removal via the xFTP settings page or CLI.

Device View Integration: Successfully processed files appear in the device’s file table on the Device View page, alongside configuration backups and other device-specific content.

Version Tracking: Each upload creates a new timestamped file version, maintaining complete upload history for audit trails and troubleshooting.

File Actions: Users can view, download, or delete uploaded files directly from the device page, providing centralized management of all device-related content.

While the automated sweep task runs every 15 minutes, administrators can trigger manual sweeps for immediate file processing:

Terminal window
cd /var/www/html/rconfig8/current
php artisan rconfig:sweep-tftp-dir
# Expected output:
Found 1 valid file in TFTP directory.

Use Cases for Manual Sweeps:

  • Immediate file processing after testing device uploads
  • Troubleshooting upload workflows without waiting for scheduled task
  • Verifying device ID patterns in filenames before production deployment
  • Clearing xFTP directory after bulk device file uploads

Docker Installation: xFTP microservices require Docker for container deployment and management. Docker must be installed and running on the rConfig server.

Supported Operating Systems:

  • Ubuntu 20.04/22.04/24.04 LTS
  • Rocky Linux 8/9
  • RHEL 8/9
  • CentOS 8/9

Network Connectivity:

  • Internet access for Docker image downloads from Docker Hub (first-time setup)
  • Network access from devices to rConfig server on configured xFTP ports
  • Firewall rules permitting inbound traffic on TFTP (69), FTP (21), and SFTP (custom port) as needed

Disk Space:

  • Docker images: ~500MB combined for all xFTP services
  • File storage: Adequate space in /srv/xftp/ for uploaded files (depends on upload volume and retention policies)

Permissions: Root or sudo access required for Docker installation and container management.

Check Docker Installation:

Terminal window
docker --version
# Expected output: Docker version 24.x.x or higher

Check Docker Service Status:

Terminal window
systemctl status docker
# Should show: active (running)

Verify Disk Space:

Terminal window
df -h /srv/xftp/
# Ensure adequate available space for uploaded files

Test Network Connectivity:

Terminal window
# From a network device, ping rConfig server
ping <rconfig-server-ip>
# Verify no firewall blocking target ports

If Docker is not already installed on your rConfig server, the xFTP setup wizard provides automated Docker installation.

Navigate to the xFTP management interface or use the CLI command:

Terminal window
cd /var/www/html/rconfig8/current
php artisan rconfig:xftp-toggle
rConfig V8 xFTP setup wizard displaying Docker installation prompt for microservices deployment

Installation Workflow:

  1. Detection: Setup wizard checks for Docker installation
  2. Prompt: If Docker not found, prompts for automated installation
  3. Confirmation: Select ‘Yes’ to proceed with Docker installation
  4. Download and Install: Wizard downloads Docker packages and installs dependencies
  5. Service Start: Automatically starts Docker daemon and enables at boot
  6. 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.

If you prefer manual Docker installation or have specific Docker configuration requirements:

Ubuntu/Debian:

Terminal window
# Update package index
sudo apt-get update
# Install prerequisites
sudo apt-get install ca-certificates curl gnupg
# Add Docker GPG key
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
# Add Docker repository
echo \
"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 Docker
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Start and enable Docker
sudo systemctl start docker
sudo systemctl enable docker

Rocky Linux/RHEL/CentOS:

Terminal window
# Install required packages
sudo dnf install -y yum-utils
# Add Docker repository
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
# Install Docker
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Start and enable Docker
sudo systemctl start docker
sudo systemctl enable docker

Verify Installation:

Terminal window
docker --version
sudo systemctl status docker

Once Docker is installed (automatically or manually), return to the xFTP setup wizard to deploy microservices.

If you need to completely remove Docker and all xFTP services:

Ubuntu/Debian:

Terminal window
# Stop all containers
sudo docker stop $(sudo docker ps -aq)
# Remove all containers
sudo docker rm $(sudo docker ps -aq)
# Remove Docker packages
sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Remove Docker data and configuration
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd
sudo rm -rf /etc/docker

Rocky Linux/RHEL/CentOS:

Terminal window
# Stop all containers
sudo docker stop $(sudo docker ps -aq)
# Remove all containers
sudo docker rm $(sudo docker ps -aq)
# Remove Docker packages
sudo dnf remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
# Remove Docker data and configuration
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd
sudo rm -rf /etc/docker

The xFTP Server can be managed through two interfaces:

Web Interface: Navigate to Settings → xFTP Services in the rConfig UI

rConfig V8 xFTP Services settings dashboard displaying service status and configuration options

Command Line Interface: Use the xFTP toggle command for service deployment and management:

Terminal window
php artisan rconfig:xftp-toggle

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
rConfig V8 xFTP Services management dashboard showing Docker running status and container health

Via CLI:

Terminal window
php artisan rconfig:xftp-toggle --status
rConfig V8 CLI terminal output displaying xFTP service status and Docker container information

TFTP provides basic file transfer without authentication, suitable for legacy devices and low-security environments.

Interactive Setup:

Terminal window
cd /var/www/html/rconfig8/current
php artisan rconfig:xftp-toggle

Setup Workflow:

  1. Service Selection: Choose TFTP from available protocols
rConfig V8 xFTP setup wizard TFTP service selection interface for legacy device support
  1. Image Download: Docker pulls TFTP image (first time only)
rConfig V8 Docker image download progress bar for TFTP microservice deployment
  1. Container Creation: TFTP container deploys and starts automatically
rConfig V8 TFTP container creation confirmation dialog with deployment status
  1. Verification: Service status shows TFTP running on port 69
rConfig V8 TFTP service running confirmation showing active status on port 69

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.

Complete TFTP service deployment from Docker installation to first file upload

To stop and remove the TFTP service:

Terminal window
php artisan rconfig:xftp-toggle

Removal Workflow:

  1. Service Detection: Wizard detects running TFTP service
  2. Removal Confirmation: Prompt to stop and remove container
  3. Container Cleanup: TFTP container stopped and removed
  4. Verification: Service status confirms TFTP no longer running
rConfig V8 TFTP service removal confirmation dialog for container cleanup

Network devices upload files to xFTP services using protocol-specific commands. File naming must include the device ID for automated processing and device association.

Cisco IOS Devices:

Terminal window
# Suppress filename prompts (optional but recommended)
Router(config)#file prompt quiet
# Upload file to rConfig TFTP server
Router#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 storage
  • tftp://192.168.1.131 - rConfig server IP with TFTP protocol
  • /1234-vlan.dat - Target filename with device ID (1234) properly delimited

Cisco IOS Devices:

Terminal window
Router#copy vlan.dat ftp://ftpuser:[email protected]/1234-vlan.dat

Using Credential Variables (recommended for security):

Terminal window
Router#copy vlan.dat ftp://{ftpusername}:{ftppassword}@192.168.1.131/{deviceid}-vlan.dat

Variable Substitution:

  • {ftpusername} - Replaced with FTP username from rConfig .env file
  • {ftppassword} - Replaced with FTP password from rConfig .env file
  • {deviceid} - Replaced with actual device ID when command executes

Cisco IOS Devices (supporting SFTP):

Terminal window
Router#copy vlan.dat sftp://sftpuser:[email protected]:2222/1234-vlan.dat

Using Credential Variables:

Terminal window
Router#copy vlan.dat sftp://{sftpusername}:{sftppassword}@192.168.1.131:2222/{deviceid}-vlan.dat

Note Port Specification: SFTP command must include custom port (:2222) if not using standard port 22.

Finding Device ID:

  • Visible in rConfig UI on device list and device detail pages
  • Available in database devices table, id column
  • Automatically substituted when using {deviceid} variable in commands

Files can be uploaded automatically during device polling by incorporating upload commands into rConfig command categories.

  1. Navigate to Commands Section: Go to Settings → Commands in rConfig UI

  2. Create or Edit Command Category: Select the command category used for target devices

  3. Add Upload Command: Insert the copy command with variables:

rConfig V8 device commands configuration interface showing automated file upload command setup

Example Command:

Terminal window
copy vlan.dat tftp://192.168.1.131/{deviceid}-vlan.dat
  1. Assign to Devices: Ensure devices use this command category in their configuration

  2. Execution During Backup: When rConfig backs up device configuration, the upload command executes automatically, transferring the file to xFTP service

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.

Demonstration of manual and automated file upload workflows including command configuration and troubleshooting


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.

rConfig V8 device view page displaying uploaded files table with timestamps and file management actions

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

rConfig V8 complete file listing interface with view, download, and delete management actions

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

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

rConfig V8 xFTP Services dashboard displaying orphaned files requiring device ID association

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:

Terminal window
# List files in xFTP directory
ls -la /srv/xftp/
# Remove specific file
rm /srv/xftp/invalid-filename.dat
# Clear all orphaned files (use with caution)
rm /srv/xftp/*

Symptom: Files uploaded successfully but don’t appear in device file listing.

Diagnostic Steps:

  1. Check xFTP Directory: Verify file present in /srv/xftp/

    Terminal window
    ls -la /srv/xftp/
  2. 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)
  3. Confirm Device ID Exists: Verify device ID in filename matches actual device in rConfig:

    Terminal window
    # Check device exists with this ID
    mysql -u rconfig -p rconfig -e "SELECT id, device_name FROM devices WHERE id = 1234;"
  4. Manual Sweep: Trigger sweep task manually to process files immediately:

    Terminal window
    cd /var/www/html/rconfig8/current
    php artisan rconfig:sweep-tftp-dir
  5. 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

Symptom: Device reports upload error or times out during file transfer.

Common Causes and Resolutions:

Service Not Running:

Terminal window
# Check service status
php artisan rconfig:xftp-toggle --status
# If service stopped, restart
php artisan rconfig:xftp-toggle
# Select service to start

Firewall Blocking:

Terminal window
# Verify port accessibility from device
telnet <rconfig-server-ip> 69 # TFTP
telnet <rconfig-server-ip> 21 # FTP
telnet <rconfig-server-ip> 2222 # SFTP
# If blocked, add firewall rule
sudo firewall-cmd --add-port=69/udp --permanent # TFTP
sudo firewall-cmd --add-port=21/tcp --permanent # FTP
sudo firewall-cmd --add-port=2222/tcp --permanent # SFTP
sudo firewall-cmd --reload

Authentication Failure (FTP/SFTP):

Terminal window
# Verify credentials in .env file
grep -E 'FTP_USERNAME|FTP_PASSWORD|SFTP_USERNAME|SFTP_PASSWORD' /var/www/html/rconfig8/current/.env
# Test credentials manually
ftp <rconfig-server-ip>
# Enter username and password when prompted
# For SFTP
sftp -P 2222 username@<rconfig-server-ip>

Insufficient Disk Space:

Terminal window
# Check available space
df -h /srv/xftp/
# Clear old orphaned files if needed
rm /srv/xftp/*
# Increase disk allocation if persistently full

Symptom: Docker container status shows exited or error state.

Diagnostic Steps:

  1. Check Container Logs:

    Terminal window
    # List all containers including stopped
    docker ps -a
    # View logs for specific service
    docker logs rconfig-tftp
    docker logs rconfig-ftp
    docker logs rconfig-sftp
  2. Port Conflicts:

    Terminal window
    # Check if port already in use
    sudo netstat -tulpn | grep :69 # TFTP
    sudo netstat -tulpn | grep :21 # FTP
    sudo netstat -tulpn | grep :2222 # SFTP
    # If port occupied, stop conflicting service or use different port
  3. Permission Issues:

    Terminal window
    # Verify xFTP directory permissions
    ls -la /srv/xftp/
    # Should be owned by appropriate user with write permissions
    sudo chown -R www-data:www-data /srv/xftp/
    sudo chmod 755 /srv/xftp/
  4. Docker Service Issues:

    Terminal window
    # Restart Docker service
    sudo systemctl restart docker
    # Check Docker daemon logs
    sudo 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

Symptom: Files remain in /srv/xftp/ directory indefinitely despite scheduled sweep task.

Diagnostic Steps:

  1. Verify Scheduled Task Enabled:
    • Navigate to Settings → Scheduled Tasks
    • Locate “TFTP Directory Sweep” task
    • Ensure status is “Enabled”
rConfig V8 scheduled tasks configuration showing TFTP directory sweep task enabled for file processing
  1. Check Task Execution History:

    • View task run history for errors or skipped executions
    • Review last successful run timestamp
  2. Manual Execution:

    Terminal window
    # Run sweep manually to check for errors
    cd /var/www/html/rconfig8/current
    php artisan rconfig:sweep-tftp-dir
    # Check output for errors or warnings
  3. Laravel Scheduler Status:

    Terminal window
    # Verify Laravel scheduler is running
    ps aux | grep schedule:run
    # Check cron configuration
    crontab -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

Custom Directory Configuration:

  1. Set Custom Path: Edit .env file to specify upload directory:

    Terminal window
    nano /var/www/html/rconfig8/current/.env
    # Add or modify:
    XFTP_ROOT_DIR=/path/to/custom/upload/directory
  2. Create Directory: Ensure custom directory exists with proper permissions:

    Terminal window
    sudo mkdir -p /path/to/custom/upload/directory
    sudo chown www-data:www-data /path/to/custom/upload/directory
    sudo chmod 755 /path/to/custom/upload/directory
  3. Verify Access: Test rConfig can access custom directory:

    Terminal window
    cd /var/www/html/rconfig8/current
    php artisan rconfig:sweep-tftp-dir
    # Should show custom directory in output
  4. 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

All xFTP services can run simultaneously, providing multiple upload options for devices with different capabilities:

Parallel Service Configuration:

Terminal window
# Deploy TFTP for legacy devices
php artisan rconfig:xftp-toggle
# Select TFTP
# Deploy FTP for authenticated transfers
php artisan rconfig:xftp-toggle
# Select FTP, configure credentials
# Deploy SFTP for secure transfers
php artisan rconfig:xftp-toggle
# Select SFTP, configure port and credentials

All 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

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:

Terminal window
# 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-server

Storage Optimization: Implement retention policies for uploaded files:

  • Regularly archive old device files to external storage
  • Delete obsolete file versions per policy
  • Monitor /srv/xftp size trends

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

Network-Level Restrictions:

Terminal window
# Firewall rules limiting upload sources to trusted networks
sudo 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 --reload

Service 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

Secure Credential Storage:

  • FTP/SFTP credentials stored in .env file (restrict file permissions)
  • Never commit .env to version control
  • Rotate credentials regularly per security policy

File Permissions:

Terminal window
# Ensure .env file is not world-readable
chmod 600 /var/www/html/rconfig8/current/.env
chown www-data:www-data /var/www/html/rconfig8/current/.env

Credential Rotation:

  1. Update credentials in .env file
  2. Redeploy affected service (FTP or SFTP)
  3. Update device configurations with new credentials or use {ftppassword} variables for automatic substitution

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:

Terminal window
# Review FTP service logs
docker logs rconfig-ftp | grep -i failed
# Review SFTP service logs
docker logs rconfig-sftp | grep -i auth
# Check system logs for security events
sudo journalctl -u docker | grep -i error

Automated Alerts: Configure monitoring to alert on:

  • Multiple authentication failures (potential brute force)
  • Uploads from unexpected IP addresses
  • Abnormally large file uploads
  • Services stopping unexpectedly

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:

  1. Deploy FTP/SFTP service using preferred method (native packages, appliances)
  2. Configure upload directory to match rConfig expectations
  3. Set XFTP_ROOT_DIR in .env to custom upload location
  4. Ensure rConfig has read/write access to upload directory
  5. 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

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

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


Install/Manage Services:

Terminal window
cd /var/www/html/rconfig8/current
php artisan rconfig:xftp-toggle

Check Service Status:

Terminal window
php artisan rconfig:xftp-toggle --status

Manual File Sweep:

Terminal window
php artisan rconfig:sweep-tftp-dir

TFTP Upload:

Terminal window
copy <source-file> tftp://<rconfig-ip>/{deviceid}-<filename>

FTP Upload with Variables:

Terminal window
copy <source-file> ftp://{ftpusername}:{ftppassword}@<rconfig-ip>/{deviceid}-<filename>

SFTP Upload with Variables:

Terminal window
copy <source-file> sftp://{sftpusername}:{sftppassword}@<rconfig-ip>:<port>/{deviceid}-<filename>
ServiceDefault PortProtocolAuthentication
TFTP69UDPNone
FTP21TCPUsername/Password
SFTP2222 (configurable)TCP/SSHUsername/Password (encrypted)

Upload Directory: /srv/xftp/

Device Storage: Configured in rConfig device storage settings

Configuration File: /var/www/html/rconfig8/current/.env

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

Service Not Running:

Terminal window
docker ps | grep rconfig
systemctl status docker

Files Not Processing:

Terminal window
ls -la /srv/xftp/
php artisan rconfig:sweep-tftp-dir

Upload Fails:

Terminal window
telnet <rconfig-ip> <port>
sudo firewall-cmd --list-all

Container Issues:

Terminal window
docker ps -a
docker logs rconfig-<service>

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.