Skip to content

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.

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.

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:

Terminal window
cd /var/www/html/rconfig

Every command uses the same format:

Terminal window
php artisan [command-name] [arguments] [options]

To list all available rConfig-specific commands with their descriptions:

Terminal window
php artisan rconfig:list
┌──────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────┐
│ 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 │
└──────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────┘

Archives a specified number of activity log rows or days worth of logs. Helps maintain database performance by moving old logs to archive storage.

Terminal window
# Archive logs older than 90 days
php artisan rconfig:archive-logs --days=90
# Archive specific number of rows
php artisan rconfig:archive-logs --rows=10000

Options:

  • --days: Number of days to keep (archive older logs)
  • --rows: Number of rows to archive

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.

Terminal window
php artisan rconfig:clear-all

It 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.

Clears Horizon queue history and failed jobs from the database.

Terminal window
php artisan rconfig:clear-horizon

Use cases:

  • Database cleanup
  • Resolving queue processing issues
  • After clearing failed job backlogs

Clones vendor device templates from the official rConfig templates repository on GitHub. This ensures you have the latest device support templates.

Terminal window
php artisan rconfig:clone-templates

What it does:

Syncs configuration count summaries to the database for faster UI load times. This command runs automatically every day at 3AM.

Terminal window
php artisan rconfig:config-summaries-sync

When to run manually:

  • After bulk configuration imports
  • When dashboard statistics appear incorrect
  • After database maintenance

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.

Terminal window
# Show what would be purged without deleting anything
php artisan rconfig:data-purge --dry-run
# Purge every enabled target
php artisan rconfig:data-purge
# Purge one target only
php artisan rconfig:data-purge --table=activity_log

Options:

  • --dry-run: Report what would be purged. Nothing is deleted
  • --table=: Purge one target only (configs, activity_log, tracked_jobs, job_batches, failed_jobs or jobs)
  • --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.

Downloads configurations for all devices in specified categories (Command Groups).

Terminal window
# Download from one or more categories
php artisan rconfig:download-category 1 2 3
# With debug output
php artisan rconfig:download-category 1 -d

Arguments:

  • Category IDs (space-separated for multiple)

Options:

  • -d: Enable debug output

Example:

Terminal window
# Download all routers (category ID 1) and switches (category ID 2)
php artisan rconfig:download-category 1 2

Downloads configurations for specified devices. This is one of the most commonly used commands for on-demand config retrieval and debugging.

Terminal window
# Download from specific devices
php artisan rconfig:download-device 1002 1003 1004
# Enable debug output for troubleshooting
php artisan rconfig:download-device 1002 -d

Arguments:

  • 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:

Terminal window
# Backup router before making changes, with debug output
php artisan rconfig:download-device 1002 -d

Downloads configurations for all devices with specified tags.

Terminal window
# Download all devices tagged with specific tags
php artisan rconfig:download-tag 1001 1002
# With debug output
php artisan rconfig:download-tag 1001 -d

Arguments:

  • Tag IDs (space-separated for multiple)

Example:

Terminal window
# Backup all devices tagged "production" (tag ID 1001)
php artisan rconfig:download-tag 1001

Downloads configurations for all devices associated with specified tasks.

Terminal window
# Download configs for devices in specific tasks
php artisan rconfig:download-task 555555 666666
# With debug output
php artisan rconfig:download-task 555555 -d

Arguments:

  • Task IDs (space-separated for multiple)

Re-applies secure file and directory permissions to downloaded device configurations that are already on disk. (Core 8.2.14)

Terminal window
# Preview the changes without altering anything
php artisan rconfig:set-config-permissions --dry-run
# Show each path as it is evaluated
php artisan rconfig:set-config-permissions --dry-run -v
# Apply the permissions
php artisan rconfig:set-config-permissions

Options:

  • --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_MODE or RCONFIG_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:

Terminal window
RCONFIG_CONFIG_FILE_MODE=0440
RCONFIG_CONFIG_DIR_MODE=0750

Only 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.

Lists all rconfig:* commands with their descriptions. Provides a quick reference to available commands.

Terminal window
php artisan rconfig:list

Lists all category (Command Group) IDs and names in rConfig. Useful for finding category IDs for use with other commands.

Terminal window
php artisan rconfig:list-categories

Output example:

ID | Category Name
------|---------------
1 | Routers
2 | Switches
3 | Firewalls

Lists all device IDs and names in rConfig. Essential for finding device IDs for backup commands.

Terminal window
php artisan rconfig:list-devices

Output example:

ID | Device Name | IP Address
------|--------------------|--------------
1001 | core-router-01 | 10.0.0.1
1002 | access-switch-02 | 10.0.1.10

Lists all tag IDs and names in rConfig.

Terminal window
php artisan rconfig:list-tags

Output example:

ID | Tag Name
------|----------
1001 | production
1002 | staging
1003 | datacenter-1

Lists all task IDs and names in rConfig.

Terminal window
php artisan rconfig:list-tasks

Manages device type mappings for Oxidized import. Used to map Oxidized device types to rConfig vendor templates.

Terminal window
php artisan rconfig:oxidized-device-mappings

See also: Migrate from Oxidized to rConfig.

Imports devices from an Oxidized JSON file to the rConfig database.

Terminal window
php artisan rconfig:oxidized-import-devices /path/to/devices.json

See also: Migrate from Oxidized to rConfig.

Imports devices from Oxidized to rConfig. This command connects to an Oxidized instance and imports its device inventory.

Terminal window
php artisan rconfig:oxidized-load-devices

Prerequisites:

  • Oxidized integration configured in rConfig settings
  • Network access to the Oxidized instance

See also: Migrate from Oxidized to rConfig.

Purges failed configuration download attempts for specified or all devices. Helps clean up failed backup records.

Terminal window
# Purge failed configs for specific devices
php artisan rconfig:purge-failedconfigs 1001 1002
# Purge all failed configs
php artisan rconfig:purge-failedconfigs --all

Arguments:

  • Device IDs (space-separated for multiple)

Options:

  • --all: Purge failed configs for all devices

Manages device type mappings for RANCID import. Used to map RANCID device types to rConfig vendor templates.

Terminal window
php artisan rconfig:rancid-device-mappings

See also: Migrate from RANCID to rConfig.

Imports devices from a RANCID JSON file to the rConfig database.

Terminal window
php artisan rconfig:rancid-import-devices /path/to/rancid-devices.json

See also: Migrate from RANCID to rConfig.

Loads devices from a RANCID installation to create an rConfig import JSON file.

Terminal window
php artisan rconfig:rancid-load-devices

Prerequisites:

  • Access to the RANCID installation and configuration files

See also: Migrate from RANCID to rConfig.

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)

Terminal window
# Run as root so root's crontab is included
sudo php artisan rconfig:check-worker-user
# Machine-readable output for scripts and monitoring
sudo php artisan rconfig:check-worker-user --json

Options:

  • --json: Print the report as JSON, with the overall state, status, web_user and 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.sh and 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.

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)

Terminal window
# Preview what would change without altering anything
php artisan rconfig:redis-secure --dry-run
# Secure Redis and restart the queue consumers
php artisan rconfig:redis-secure
# Replace an existing password with a new one
php artisan rconfig:redis-secure --force

Options:

  • --dry-run: Report what would change without modifying .env or Redis
  • --force: Generate and apply a new password even when REDIS_PASSWORD is already set. Use it to rotate the password, or to recover when .env and 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 .env value so the queue keeps working, and exits with a failure code.
  • If REDIS_PASSWORD is set but Redis does not accept it, the command stops and asks for --force rather 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.sh run 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

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)

Terminal window
# Human-readable report
php artisan rconfig:redis-security-check
# Machine-readable output for scripts and monitoring
php artisan rconfig:redis-security-check --json

Options:

  • --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 NOAUTH errors: if “App can authenticate” reports no, .env and Redis disagree

Generates a CLI report of all devices’ latest downloaded configurations. Useful for auditing backup status.

Terminal window
php artisan rconfig:report-lastDownload

Output 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

Searches all configuration files for a given string. A useful tool for finding specific configurations across your entire network.

Terminal window
# Search for a specific string
php artisan rconfig:search-configs "ntp server"
# Search with regex pattern
php 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:

Terminal window
# Find all devices configured with a specific NTP server
php artisan rconfig:search-configs "ntp server 10.0.0.1"

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.

Terminal window
# Every check as a table, with the fixes underneath
php artisan rconfig:security-check
# The full report as JSON
php artisan rconfig:security-check --json
# One group, a prefix or a single check (not stored)
php artisan rconfig:security-check --only=web
php artisan rconfig:security-check --only=redis.auth
# List every check ID and exit
php artisan rconfig:security-check --list

Options:

  • --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).

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)

Terminal window
cd /var/www/html/rconfig
# Preview what would change without altering anything
sudo php artisan rconfig:ssl-self-signed --dry-run
# Set up HTTPS
sudo php artisan rconfig:ssl-self-signed
# Issue the certificate for a specific name or IP address
sudo php artisan rconfig:ssl-self-signed --hostname=rconfig.example.com

Options:

  • --hostname=: Name or IP address for the certificate and the HTTPS virtual host. Defaults to the ServerName in your rConfig virtual host (skipped while it is still the YourServerName placeholder), then the host in APP_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.conf in /etc/httpd/conf.d/ (Rocky/RHEL) or /etc/apache2/sites-available/ (Ubuntu), and rconfig-selfsigned.crt / .key in /etc/pki/tls/ or /etc/ssl/. It never edits rconfig-vhost.conf in the rConfig folder, so update.sh can still pull cleanly.
  • The redirect is a port 80 virtual host inside rconfig-ssl.conf. Apache reads that file before rconfig-vhost.conf, so the redirect wins.
  • Runs apachectl configtest before 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.

Syncs the application schedule with the schedule monitor. Ensures scheduled tasks are properly registered.

Terminal window
php artisan rconfig:sync-tasks

When to run:

  • After creating new scheduled tasks
  • When scheduled tasks aren’t running
  • After system updates