rConfig V8 Core CLI Commands Reference
rConfig V8 Core ships a set of php artisan rconfig:* CLI commands for downloading configurations, reporting on backup status, clearing caches, and importing devices from other tools. After reading this page you can find the right command, run it with the correct arguments, and wire rConfig operations into your own scripts and pipelines.
Why use the CLI commands?
Section titled “Why use the CLI commands?”The CLI is useful whenever the web interface is not the right tool for the job:
- Automation and orchestration: Drive rConfig operations from Ansible, Terraform, or Chef.
- Custom scripting: Build your own workflows and scheduled jobs that call rConfig.
- System administration: Clear caches, archive logs, and troubleshoot directly on the server.
- CI/CD pipelines: Fold network configuration backups into your DevOps workflows.
- Remote management: Run operations without opening the web UI.
- Bulk operations: Skip UI overhead for large or scheduled jobs.
Running CLI commands
Section titled “Running CLI commands”All rConfig CLI commands run from the rConfig installation directory and require root privileges (or sudo). You need SSH access to the rConfig server.
Change to the installation directory first:
cd /var/www/html/rconfigEvery command uses the same format:
php artisan [command-name] [arguments] [options]To list all available rConfig-specific commands with their descriptions:
php artisan rconfig:listAvailable commands
Section titled “Available commands”┌──────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────┐│ Command │ Description │├──────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────┤│ rconfig:archive-logs │ Will archive x amount of activity log rows or days ││ rconfig:check-worker-user │ Check that Horizon, the scheduler and Supervisor run nothing as root ││ rconfig:clear-all │ Clear all cache and config elements for Laravel, NPM and other dependencies ││ rconfig:clear-horizon │ Clear Horizon Queue History ││ rconfig:clone-templates │ Clone templates from git repo https://github.com/rconfig/rconfig-templates ││ rconfig:config-summaries-sync │ Sync Config Summaries ││ rconfig:data-purge │ Purge old data based on the Data Purge settings ││ rconfig:download-category │ Download configurations for one or multiple categories of devices ││ rconfig:download-device │ Download configurations for one or multiple devices via the CLI ││ rconfig:download-tag │ Download configurations for devices with one or multiple tags ││ rconfig:download-task │ Download configurations for devices with one or multiple tasks ││ rconfig:set-config-permissions │ Re-apply secure permissions to downloaded device configs already on disk ││ rconfig:list │ List all rconfig:* commands with their descriptions ││ rconfig:list-categories │ List all category IDs and names in rConfig ││ rconfig:list-devices │ List all Device IDs and names in rConfig ││ rconfig:list-tags │ List all tag IDs and names in rConfig ││ rconfig:list-tasks │ List all task IDs and names in rConfig ││ rconfig:oxidized-device-mappings │ Manage device type mappings for Oxidized import ││ rconfig:oxidized-import-devices │ Import devices from JSON file to rConfig database ││ rconfig:oxidized-load-devices │ Import devices from Oxidized to rConfig ││ rconfig:purge-failedconfigs │ Purge failed configs for some or all devices ││ rconfig:rancid-device-mappings │ Manage device type mappings for RANCID import ││ rconfig:rancid-import-devices │ Import devices from RANCID JSON file to rConfig database ││ rconfig:rancid-load-devices │ Load devices from RANCID to create rConfig import JSON ││ rconfig:redis-secure │ Set a Redis password and require it on the live Redis instance ││ rconfig:redis-security-check │ Report whether Redis requires a password (read only) ││ rconfig:report-lastDownload │ Output report of all devices latest downloaded configs ││ rconfig:search-configs │ Search all config files for a given string ││ rconfig:security-check │ Run the Security Center checks (read only) ││ rconfig:ssl-self-signed │ Serve rConfig over HTTPS with a self-signed certificate ││ rconfig:sync-tasks │ Sync the schedule of the app with the schedule monitor │└──────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────┘Command reference
Section titled “Command reference”rconfig:archive-logs
Section titled “rconfig:archive-logs”Archives a specified number of activity log rows or days worth of logs. Helps maintain database performance by moving old logs to archive storage.
# Archive logs older than 90 daysphp artisan rconfig:archive-logs --days=90
# Archive specific number of rowsphp artisan rconfig:archive-logs --rows=10000Options:
--days: Number of days to keep (archive older logs)--rows: Number of rows to archive
rconfig:clear-all
Section titled “rconfig:clear-all”Clears all cache and config elements for Laravel, NPM, and other dependencies. This is an essential command for resolving application issues after updates or configuration changes.
php artisan rconfig:clear-allIt also restarts Horizon with horizon:terminate, so Supervisor relaunches it with the new config. From 8.2.19 it never restarts Supervisor itself, so it does not need sudo and does not interrupt other applications’ programs on the same server.
Use cases:
- When encountering 500 errors
- After modifying configuration files
- When the UI behaves unexpectedly
On 8.2.19 or later, update.sh clears and rebuilds the caches for you, so there is no need to run this after an update.
rconfig:clear-horizon
Section titled “rconfig:clear-horizon”Clears Horizon queue history and failed jobs from the database.
php artisan rconfig:clear-horizonUse cases:
- Database cleanup
- Resolving queue processing issues
- After clearing failed job backlogs
rconfig:clone-templates
Section titled “rconfig:clone-templates”Clones vendor device templates from the official rConfig templates repository on GitHub. This ensures you have the latest device support templates.
php artisan rconfig:clone-templatesWhat it does:
- Downloads latest templates from https://github.com/rconfig/rconfig-templates
- Updates existing templates
- Adds new vendor support
rconfig:config-summaries-sync
Section titled “rconfig:config-summaries-sync”Syncs configuration count summaries to the database for faster UI load times. This command runs automatically every day at 3AM.
php artisan rconfig:config-summaries-syncWhen to run manually:
- After bulk configuration imports
- When dashboard statistics appear incorrect
- After database maintenance
rconfig:data-purge
Section titled “rconfig:data-purge”Purges data older than the retention set in Settings > Data Purge: configs and their change records, the activity log and the job tables. Only enabled targets are purged. The scheduler runs this command every night at 02:30.
# Show what would be purged without deleting anythingphp artisan rconfig:data-purge --dry-run
# Purge every enabled targetphp artisan rconfig:data-purge
# Purge one target onlyphp artisan rconfig:data-purge --table=activity_logOptions:
--dry-run: Report what would be purged. Nothing is deleted--table=: Purge one target only (configs,activity_log,tracked_jobs,job_batches,failed_jobsorjobs)--queue-threshold=: Row count at which a delete is handed to Horizon instead of run directly. Default 1000--force-queue: Always hand deletes to Horizon--no-queue: Always delete in this process
Every run, including a dry run, is recorded in Purge Run History.
See also: Data Purge and Retention.
rconfig:download-category
Section titled “rconfig:download-category”Downloads configurations for all devices in specified categories (Command Groups).
# Download from one or more categoriesphp artisan rconfig:download-category 1 2 3
# With debug outputphp artisan rconfig:download-category 1 -dArguments:
- Category IDs (space-separated for multiple)
Options:
-d: Enable debug output
Example:
# Download all routers (category ID 1) and switches (category ID 2)php artisan rconfig:download-category 1 2rconfig:download-device
Section titled “rconfig:download-device”Downloads configurations for specified devices. This is one of the most commonly used commands for on-demand config retrieval and debugging.
# Download from specific devicesphp artisan rconfig:download-device 1002 1003 1004
# Enable debug output for troubleshootingphp artisan rconfig:download-device 1002 -dArguments:
- Device IDs (space-separated for multiple)
Options:
-d: Enable debug output (shows connection details, commands executed, output received)
Use cases:
- On-demand configuration backups
- Testing device connectivity
- Troubleshooting connection issues
- Immediate backup before changes
Example:
# Backup router before making changes, with debug outputphp artisan rconfig:download-device 1002 -drconfig:download-tag
Section titled “rconfig:download-tag”Downloads configurations for all devices with specified tags.
# Download all devices tagged with specific tagsphp artisan rconfig:download-tag 1001 1002
# With debug outputphp artisan rconfig:download-tag 1001 -dArguments:
- Tag IDs (space-separated for multiple)
Example:
# Backup all devices tagged "production" (tag ID 1001)php artisan rconfig:download-tag 1001rconfig:download-task
Section titled “rconfig:download-task”Downloads configurations for all devices associated with specified tasks.
# Download configs for devices in specific tasksphp artisan rconfig:download-task 555555 666666
# With debug outputphp artisan rconfig:download-task 555555 -dArguments:
- Task IDs (space-separated for multiple)
rconfig:set-config-permissions
Section titled “rconfig:set-config-permissions”Re-applies secure file and directory permissions to downloaded device configurations that are already on disk. (Core 8.2.14)
# Preview the changes without altering anythingphp artisan rconfig:set-config-permissions --dry-run
# Show each path as it is evaluatedphp artisan rconfig:set-config-permissions --dry-run -v
# Apply the permissionsphp artisan rconfig:set-config-permissionsOptions:
--dry-run: Report what would change without modifying any permissions-v: Verbose output, listing every path and its current and target mode
What it covers:
- The configuration data directory and every category, device, year, month and day directory beneath it
- Every stored configuration file
- The temporary directory used when comparing configurations, which holds transient copies of configuration content
Use cases:
- Once, immediately after upgrading from a release that wrote world-readable configurations
- After changing
RCONFIG_CONFIG_FILE_MODEorRCONFIG_CONFIG_DIR_MODE, since those settings only affect newly written configurations - Verifying permissions during a security audit, using
--dry-run
Customising the permissions:
The modes are configurable in .env should the defaults not suit your environment:
RCONFIG_CONFIG_FILE_MODE=0440RCONFIG_CONFIG_DIR_MODE=0750Only loosen these if your web server and queue worker run as users that share no common group, and prefer correcting the group membership instead. Both settings matter together: a 0440 file inside a 0755 directory is still readable by every account on the host.
rconfig:list
Section titled “rconfig:list”Lists all rconfig:* commands with their descriptions. Provides a quick reference to available commands.
php artisan rconfig:listrconfig:list-categories
Section titled “rconfig:list-categories”Lists all category (Command Group) IDs and names in rConfig. Useful for finding category IDs for use with other commands.
php artisan rconfig:list-categoriesOutput example:
ID | Category Name------|---------------1 | Routers2 | Switches3 | Firewallsrconfig:list-devices
Section titled “rconfig:list-devices”Lists all device IDs and names in rConfig. Essential for finding device IDs for backup commands.
php artisan rconfig:list-devicesOutput example:
ID | Device Name | IP Address------|--------------------|--------------1001 | core-router-01 | 10.0.0.11002 | access-switch-02 | 10.0.1.10rconfig:list-tags
Section titled “rconfig:list-tags”Lists all tag IDs and names in rConfig.
php artisan rconfig:list-tagsOutput example:
ID | Tag Name------|----------1001 | production1002 | staging1003 | datacenter-1rconfig:list-tasks
Section titled “rconfig:list-tasks”Lists all task IDs and names in rConfig.
php artisan rconfig:list-tasksrconfig:oxidized-device-mappings
Section titled “rconfig:oxidized-device-mappings”Manages device type mappings for Oxidized import. Used to map Oxidized device types to rConfig vendor templates.
php artisan rconfig:oxidized-device-mappingsSee also: Migrate from Oxidized to rConfig.
rconfig:oxidized-import-devices
Section titled “rconfig:oxidized-import-devices”Imports devices from an Oxidized JSON file to the rConfig database.
php artisan rconfig:oxidized-import-devices /path/to/devices.jsonSee also: Migrate from Oxidized to rConfig.
rconfig:oxidized-load-devices
Section titled “rconfig:oxidized-load-devices”Imports devices from Oxidized to rConfig. This command connects to an Oxidized instance and imports its device inventory.
php artisan rconfig:oxidized-load-devicesPrerequisites:
- Oxidized integration configured in rConfig settings
- Network access to the Oxidized instance
See also: Migrate from Oxidized to rConfig.
rconfig:purge-failedconfigs
Section titled “rconfig:purge-failedconfigs”Purges failed configuration download attempts for specified or all devices. Helps clean up failed backup records.
# Purge failed configs for specific devicesphp artisan rconfig:purge-failedconfigs 1001 1002
# Purge all failed configsphp artisan rconfig:purge-failedconfigs --allArguments:
- Device IDs (space-separated for multiple)
Options:
--all: Purge failed configs for all devices
rconfig:rancid-device-mappings
Section titled “rconfig:rancid-device-mappings”Manages device type mappings for RANCID import. Used to map RANCID device types to rConfig vendor templates.
php artisan rconfig:rancid-device-mappingsSee also: Migrate from RANCID to rConfig.
rconfig:rancid-import-devices
Section titled “rconfig:rancid-import-devices”Imports devices from a RANCID JSON file to the rConfig database.
php artisan rconfig:rancid-import-devices /path/to/rancid-devices.jsonSee also: Migrate from RANCID to rConfig.
rconfig:rancid-load-devices
Section titled “rconfig:rancid-load-devices”Loads devices from a RANCID installation to create an rConfig import JSON file.
php artisan rconfig:rancid-load-devicesPrerequisites:
- Access to the RANCID installation and configuration files
See also: Migrate from RANCID to rConfig.
rconfig:check-worker-user
Section titled “rconfig:check-worker-user”Checks that this install runs nothing as root: the running Horizon processes, the scheduler cron file /etc/cron.d/rconfig-core, root’s crontab, and the rconfig-core-horizon Supervisor config. The dashboard’s Worker Privilege health check reads the same report. (Core 8.2.19)
# Run as root so root's crontab is includedsudo php artisan rconfig:check-worker-user
# Machine-readable output for scripts and monitoringsudo php artisan rconfig:check-worker-user --jsonOptions:
--json: Print the report as JSON, with the overallstate,status,web_userand one entry per check
Exit codes:
| Code | Meaning |
|---|---|
0 |
No check failed. WARN and SKIP lines, and Docker (where every check is skipped), still exit 0 |
1 |
At least one check failed. Run sudo ./update.sh --no-pull from the rConfig folder |
Use cases:
- Clearing the Worker Privilege warning on the dashboard health panel
- Confirming an upgrade moved Horizon and the scheduler off root (
update.shand the installer run it as their last step) - Monitoring and compliance checks, using the exit code
See Fix the Worker Privilege warning for what every line means and how to fix it.
rconfig:redis-secure
Section titled “rconfig:redis-secure”Generates a strong Redis password, writes it to REDIS_PASSWORD in .env, requires it on the running Redis instance, and saves it to the Redis config file so it survives a Redis restart. It then restarts Horizon and the queue workers so they reconnect with the new password. (Core 8.2.19)
# Preview what would change without altering anythingphp artisan rconfig:redis-secure --dry-run
# Secure Redis and restart the queue consumersphp artisan rconfig:redis-secure
# Replace an existing password with a new onephp artisan rconfig:redis-secure --forceOptions:
--dry-run: Report what would change without modifying.envor Redis--force: Generate and apply a new password even whenREDIS_PASSWORDis already set. Use it to rotate the password, or to recover when.envand Redis disagree--no-restart: Apply the password but do not restart Horizon or the queue workers. Restart them yourself afterwards
Behaviour:
- Safe to re-run. If Redis already accepts the password in
.env, the command reports that Redis is already secured and changes nothing. - Fails closed. If Redis rejects the change, the command restores the previous
.envvalue so the queue keeps working, and exits with a failure code. - If
REDIS_PASSWORDis set but Redis does not accept it, the command stops and asks for--forcerather than overwriting it. - If Redis cannot save the password to its config file, the password stays live and the command warns that it will be lost when Redis restarts. Check that Redis was started with a config file.
- When run as root, the rebuilt config cache is handed back to the web server user.
Use cases:
- Once, after upgrading an existing install whose Redis has no password (new installs and
update.shrun it for you) - Rotating the Redis password
- Clearing the “Redis has no password set” warning on the dashboard health panel. See Fix the Redis Auth warning for the full walkthrough
rconfig:redis-security-check
Section titled “rconfig:redis-security-check”Read-only check of the Redis authentication state. Reports whether Redis requires a password and whether the application can authenticate with the password in .env. The listener bind address and protected mode are shown for context only. (Core 8.2.19)
# Human-readable reportphp artisan rconfig:redis-security-check
# Machine-readable output for scripts and monitoringphp artisan rconfig:redis-security-check --jsonOptions:
--json: Emit the status as JSON
Exit codes:
| Code | Meaning |
|---|---|
0 |
Redis requires a password |
1 |
Redis is reachable but requires no password. Run rconfig:redis-secure |
2 |
Redis could not be reached, so the state is unknown |
Use cases:
- Verifying an install after running
rconfig:redis-secure - Monitoring and compliance checks, using the exit code
- Troubleshooting
NOAUTHerrors: if “App can authenticate” reportsno,.envand Redis disagree
rconfig:report-lastDownload
Section titled “rconfig:report-lastDownload”Generates a CLI report of all devices’ latest downloaded configurations. Useful for auditing backup status.
php artisan rconfig:report-lastDownloadOutput includes:
- Device name
- Last successful backup date
- Days since last backup
- Backup status
Use cases:
- Identifying devices with stale backups
- Backup compliance auditing
- Troubleshooting backup schedules
rconfig:search-configs
Section titled “rconfig:search-configs”Searches all configuration files for a given string. A useful tool for finding specific configurations across your entire network.
# Search for a specific stringphp artisan rconfig:search-configs "ntp server"
# Search with regex patternphp artisan rconfig:search-configs --pattern="ip route.*192.168"Arguments:
- Search string or pattern
Options:
--pattern: Use a regex pattern for advanced searching--case-sensitive: Perform a case-sensitive search
Use cases:
- Finding all devices with a specific configuration
- Security audits (finding weak passwords, old protocols)
- Compliance checking
- Configuration standardization verification
Example:
# Find all devices configured with a specific NTP serverphp artisan rconfig:search-configs "ntp server 10.0.0.1"rconfig:security-check
Section titled “rconfig:security-check”From V8.3.0, runs the Security Center checks: application settings, web exposure, TLS, PHP, Redis, accounts, REST API tokens, stored credentials, runtime, versions, devices and the host firewall. It is read only and never prints a secret value. A full run is stored and shows on Settings > Security Center.
# Every check as a table, with the fixes underneathphp artisan rconfig:security-check
# The full report as JSONphp artisan rconfig:security-check --json
# One group, a prefix or a single check (not stored)php artisan rconfig:security-check --only=webphp artisan rconfig:security-check --only=redis.auth
# List every check ID and exitphp artisan rconfig:security-check --listOptions:
--json: Print the full report as JSON (schema version 1)--only=: Run only these checks: an ID (redis.auth), a group (web) or a prefix (web.*). Comma-separated or repeated--list: List every check and exit--no-store: Do not save this run for the Security Center page
Exit codes: 0 when every check passes or is skipped, 1 when there are warnings, 2 when any check fails (or --only matches no check).
rconfig:ssl-self-signed
Section titled “rconfig:ssl-self-signed”Moves a new install from HTTP to HTTPS in one step. It creates a self-signed certificate, adds an HTTPS virtual host and an HTTP to HTTPS redirect, opens port 443 in firewalld or ufw, restarts Apache, and sets APP_URL to the new https:// address. Must run as root. (Core 8.2.19)
cd /var/www/html/rconfig
# Preview what would change without altering anythingsudo php artisan rconfig:ssl-self-signed --dry-run
# Set up HTTPSsudo php artisan rconfig:ssl-self-signed
# Issue the certificate for a specific name or IP addresssudo php artisan rconfig:ssl-self-signed --hostname=rconfig.example.comOptions:
--hostname=: Name or IP address for the certificate and the HTTPS virtual host. Defaults to theServerNamein your rConfig virtual host (skipped while it is still theYourServerNameplaceholder), then the host inAPP_URL, then the server hostname--days=825: How long the certificate is valid, from 1 to 3650 days--no-redirect: Leave HTTP working as it is instead of redirecting it to HTTPS--force: Issue a new certificate and rewrite the files this command created earlier--dry-run: List the steps it would take without changing anything
Exit codes:
| Code | Meaning |
|---|---|
0 |
HTTPS is set up, was already set up, or a dry run finished |
1 |
It could not run (not root, Docker, Apache not found, bad --hostname or --days), or Apache rejected the new config and every change was rolled back |
Behaviour:
- Writes its own files only:
rconfig-ssl.confin/etc/httpd/conf.d/(Rocky/RHEL) or/etc/apache2/sites-available/(Ubuntu), andrconfig-selfsigned.crt/.keyin/etc/pki/tls/or/etc/ssl/. It never editsrconfig-vhost.confin the rConfig folder, soupdate.shcan still pull cleanly. - The redirect is a port 80 virtual host inside
rconfig-ssl.conf. Apache reads that file beforerconfig-vhost.conf, so the redirect wins. - Runs
apachectl configtestbefore restarting Apache. If Apache rejects the config, the command puts every file back as it was. - Safe to re-run. A second run reports that HTTPS is already set up and changes nothing. If another port 443 virtual host already serves rConfig, it stops without changing anything.
- Does not run in Docker. Terminate TLS on your reverse proxy instead.
See SSL setup for the walkthrough and how to replace the certificate with a trusted one later.
rconfig:sync-tasks
Section titled “rconfig:sync-tasks”Syncs the application schedule with the schedule monitor. Ensures scheduled tasks are properly registered.
php artisan rconfig:sync-tasksWhen to run:
- After creating new scheduled tasks
- When scheduled tasks aren’t running
- After system updates