{"id":271,"date":"2024-12-20T07:37:01","date_gmt":"2024-12-20T15:37:01","guid":{"rendered":"https:\/\/www.cmsws.com\/blog\/?page_id=271"},"modified":"2024-12-20T08:46:08","modified_gmt":"2024-12-20T16:46:08","slug":"using-ubiquiti-cli-tool-ucfg","status":"publish","type":"page","link":"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/","title":{"rendered":"Ubiquiti cli tool: ucfg"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"alignright is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/help.ui.com\/hc\/theming_assets\/01J4TZ2K9CZRQYG6V1BCC0XN61\" alt=\"Ubiquiti Logo\" width=\"357\" height=\"108\"\/><\/figure>\n<\/div>\n\n\n<p><strong>Instructional Manual for Using the Ubiquiti CLI Tool <code>ucfg<\/code><\/strong><\/p><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 ez-toc-wrap-right counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#Introduction\" >Introduction<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#Usage_Syntax\" >Usage Syntax<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#Options\" >Options:<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#Available_Commands\" >Available Commands<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#1_Boot_Early\" >1. Boot Early<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#2_Start_the_System\" >2. Start the System<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#3_Stop_the_System\" >3. Stop the System<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#4_Commit_Configuration\" >4. Commit Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#5_Reset_to_Factory_Defaults\" >5. Reset to Factory Defaults<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#6_Reload_Configuration\" >6. Reload Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#7_Backup_Management\" >7. Backup Management<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#8_Edit_Configuration\" >8. Edit Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#9_Show_Configuration\" >9. Show Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#10_Migrate_Configuration\" >10. Migrate Configuration<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#Examples\" >Examples<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#1_Debugging_Mode\" >1. Debugging Mode<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#2_Reset_to_Factory_Defaults_with_Reboot\" >2. Reset to Factory Defaults with Reboot<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#3_Commit_Changes\" >3. Commit Changes<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#4_Show_Current_Configuration\" >4. Show Current Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#5_Start_the_System_with_a_Specific_Configuration\" >5. Start the System with a Specific Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#6_Create_a_Backup\" >6. Create a Backup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#7_Validate_a_Backup\" >7. Validate a Backup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#8_Restore_a_Backup_Without_Validation\" >8. Restore a Backup Without Validation<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#Troubleshooting_Tips\" >Troubleshooting Tips<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#Best_Practices\" >Best Practices<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-27\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Introduction\"><\/span><strong>Introduction<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The Ubiquiti CLI tool <code>ucfg<\/code> is a command-line interface for system configuration management on Ubiquiti devices. This manual provides a comprehensive guide to using the tool effectively based on its actual commands and options.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span><strong>Prerequisites<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Device Requirements:<\/strong>\n<ul class=\"wp-block-list\">\n<li>A Ubiquiti device with CLI support (e.g., UniFi switches, routers, or access points).<\/li>\n\n\n\n<li>Ensure the device firmware includes the <code>ucfg<\/code> tool.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Access Requirements:<\/strong>\n<ul class=\"wp-block-list\">\n<li>SSH access to the Ubiquiti device.<\/li>\n\n\n\n<li>Administrator credentials.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Client Requirements:<\/strong>\n<ul class=\"wp-block-list\">\n<li>A terminal emulator (e.g., PuTTY, Terminal, or any SSH client).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Network Requirements:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Ensure the device is reachable over the network.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Usage_Syntax\"><\/span><strong>Usage Syntax<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The general syntax of the <code>ucfg<\/code> tool is as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg (&#91;-d] | &#91;-t]) &#91;-h] &#91;-S] &lt;command&gt; ...\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Options\"><\/span><strong>Options:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-d, --debug<\/code>: Enable debugging output for detailed information during execution.<\/li>\n\n\n\n<li><code>-t, --trace<\/code>: Enable tracing output for more granular command behavior details.<\/li>\n\n\n\n<li><code>-h, --help<\/code>: Display the help message with a list of available commands.<\/li>\n\n\n\n<li><code>-S, --silent<\/code>: Suppress output to <code>stdout<\/code>.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Available_Commands\"><\/span><strong>Available Commands<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Boot_Early\"><\/span><strong>1. Boot Early<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Perform actions needed for early boot:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg boot-early &#91;-h]\n<\/code><\/pre>\n\n\n\n<p>Options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Start_the_System\"><\/span><strong>2. Start the System<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Start the system using a configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg start &#91;-h] &#91;&lt;path&gt;]\n<\/code><\/pre>\n\n\n\n<p>Arguments:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>path<\/code>: Path to a file containing configuration to start from.<\/li>\n<\/ul>\n\n\n\n<p>Options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Stop_the_System\"><\/span><strong>3. Stop the System<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Stop the system:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg stop &#91;-h]\n<\/code><\/pre>\n\n\n\n<p>Options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Commit_Configuration\"><\/span><strong>4. Commit Configuration<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Save the active configuration to persistent memory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg commit &#91;-h] &#91;&lt;path&gt;]\n<\/code><\/pre>\n\n\n\n<p>Arguments:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>path<\/code>: Path to a file containing the configuration to commit.<\/li>\n<\/ul>\n\n\n\n<p>Options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_Reset_to_Factory_Defaults\"><\/span><strong>5. Reset to Factory Defaults<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Reset the system configuration to factory defaults:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg defaults (&#91;-r] | &#91;-R]) &#91;-h]\n<\/code><\/pre>\n\n\n\n<p>Options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-r, --reload<\/code>: Reload configuration after resetting.<\/li>\n\n\n\n<li><code>-R, --reboot<\/code>: Reboot the device after resetting.<\/li>\n\n\n\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6_Reload_Configuration\"><\/span><strong>6. Reload Configuration<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Reload the system configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg reload &#91;-h] &#91;-c] &#91;-C] &lt;path&gt;\n<\/code><\/pre>\n\n\n\n<p>Arguments:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>path<\/code>: Path to a file containing the new configuration.<\/li>\n<\/ul>\n\n\n\n<p>Options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-c, --commit<\/code>: Commit configuration after reload.<\/li>\n\n\n\n<li><code>-C, --continuous<\/code>: Reload configuration again if it changes during the reload.<\/li>\n\n\n\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"7_Backup_Management\"><\/span><strong>7. Backup Management<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Manage system backups:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg backup &#91;-h] &lt;command&gt; ...\n<\/code><\/pre>\n\n\n\n<p>Commands:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>create<\/code>: Create a system backup.<\/li>\n\n\n\n<li><code>validate<\/code>: Validate a system backup: <code>ucfg backup validate [-h] &lt;path&gt;<\/code> Arguments:<ul><li><code>path<\/code>: Path to a file containing the system backup.<\/li><\/ul>Options:\n<ul class=\"wp-block-list\">\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>restore<\/code>: Restore system from a backup: <code>ucfg backup restore [-h] [-r] [-N] &lt;path&gt;<\/code> Arguments:<ul><li><code>path<\/code>: Path to a file containing the system backup.<\/li><\/ul>Options:\n<ul class=\"wp-block-list\">\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n\n\n\n<li><code>-r, --reload<\/code>: Reload configuration after done.<\/li>\n\n\n\n<li><code>-N, --no-validate<\/code>: Do not validate configuration before restoring.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"8_Edit_Configuration\"><\/span><strong>8. Edit Configuration<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Edit and load configuration using a filter expression:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg edit &#91;-h] &#91;-c] &#91;&lt;filter&gt;]\n<\/code><\/pre>\n\n\n\n<p>Arguments:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>filter<\/code>: Modify the configuration using a jq-like filter expression.<\/li>\n<\/ul>\n\n\n\n<p>Options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-c, --commit<\/code>: Commit configuration after editing.<\/li>\n\n\n\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"9_Show_Configuration\"><\/span><strong>9. Show Configuration<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Display the current configuration in a human-readable format:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg show &#91;-h] &#91;&lt;path&gt;]\n<\/code><\/pre>\n\n\n\n<p>Arguments:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>path<\/code>: Path to a file containing the configuration to show.<\/li>\n<\/ul>\n\n\n\n<p>Options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"10_Migrate_Configuration\"><\/span><strong>10. Migrate Configuration<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Migrate configuration to a specific version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg migrate &#91;-h] &lt;old_path&gt; &lt;target_version&gt; &lt;new_path&gt;\n<\/code><\/pre>\n\n\n\n<p>Arguments:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>old_path<\/code>: Path to the configuration file to be migrated.<\/li>\n\n\n\n<li><code>target_version<\/code>: Version to migrate to.<\/li>\n\n\n\n<li><code>new_path<\/code>: Path where the migrated configuration should be saved.<\/li>\n<\/ul>\n\n\n\n<p>Options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-h, --help<\/code>: Show the help message and exit.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Examples\"><\/span><strong>Examples<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Debugging_Mode\"><\/span><strong>1. Debugging Mode<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Enable detailed output to troubleshoot configuration issues:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg -d show\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Reset_to_Factory_Defaults_with_Reboot\"><\/span><strong>2. Reset to Factory Defaults with Reboot<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Reset the system to its original state and reboot:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg defaults -R\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Commit_Changes\"><\/span><strong>3. Commit Changes<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Save active changes to persistent memory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg commit\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Show_Current_Configuration\"><\/span><strong>4. Show Current Configuration<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Display the current device configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg show\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_Start_the_System_with_a_Specific_Configuration\"><\/span><strong>5. Start the System with a Specific Configuration<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Start the system using a configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg start \/path\/to\/config.json\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6_Create_a_Backup\"><\/span><strong>6. Create a Backup<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Create a system backup:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg backup create\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"7_Validate_a_Backup\"><\/span><strong>7. Validate a Backup<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Validate a system backup:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg backup validate \/path\/to\/backup.file\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"8_Restore_a_Backup_Without_Validation\"><\/span><strong>8. Restore a Backup Without Validation<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Restore a backup and skip validation:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ucfg backup restore -N \/path\/to\/backup.file\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Troubleshooting_Tips\"><\/span><strong>Troubleshooting Tips<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Enable Debugging:<\/strong> Use the <code>-d<\/code> option for detailed logs to troubleshoot errors: <code>ucfg -d &lt;command&gt;<\/code><\/li>\n\n\n\n<li><strong>Test Changes:<\/strong> Use the <code>-t<\/code> option to test commands without applying them: <code>ucfg -t &lt;command&gt;<\/code><\/li>\n\n\n\n<li><strong>Restore Backups:<\/strong> Use the <code>backup<\/code> command to recover previous configurations: <code>ucfg backup restore<\/code><\/li>\n\n\n\n<li><strong>Check for Help:<\/strong> Refer to the help message for clarification on available commands: <code>ucfg -h<\/code><\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Best_Practices\"><\/span><strong>Best Practices<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Backup Regularly:<\/strong> Always create backups before making significant changes.<\/li>\n\n\n\n<li><strong>Use Debugging for Troubleshooting:<\/strong> Enable debugging to get detailed insights into operations.<\/li>\n\n\n\n<li><strong>Validate Changes in Test Mode:<\/strong> Use the <code>-t<\/code> flag to test configurations before applying them.<\/li>\n\n\n\n<li><strong>Document Configuration Changes:<\/strong> Maintain a log of changes for easier troubleshooting and rollback.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span><strong>Conclusion<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The <code>ucfg<\/code> CLI tool provides robust functionality for managing and configuring Ubiquiti devices. By following this guide, you can effectively utilize the tool to optimize and maintain your network infrastructure.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Instructional Manual for Using the Ubiquiti CLI Tool ucfg Introduction The Ubiquiti CLI tool ucfg is a command-line interface for system configuration management on Ubiquiti devices. This manual provides a comprehensive guide to using the tool effectively based on its actual commands and options. Prerequisites Usage Syntax The general syntax of the ucfg tool is as follows: Options: Available Commands [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":272,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-271","page","type-page","status-publish","hentry"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Instructional Manual for Using the Ubiquiti CLI Tool ucfg Introduction The Ubiquiti CLI tool ucfg is a command-line interface for system configuration management on Ubiquiti devices. This manual provides a comprehensive guide to using the tool effectively based on its actual commands and options. Prerequisites Device Requirements: A Ubiquiti device with CLI support (e.g., UniFi\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"A different perspective \u203a Right, lets get on with it...\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Ubiquiti cli tool: ucfg \u203a A different perspective\" \/>\n\t\t<meta property=\"og:description\" content=\"Instructional Manual for Using the Ubiquiti CLI Tool ucfg Introduction The Ubiquiti CLI tool ucfg is a command-line interface for system configuration management on Ubiquiti devices. This manual provides a comprehensive guide to using the tool effectively based on its actual commands and options. Prerequisites Device Requirements: A Ubiquiti device with CLI support (e.g., UniFi\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2024-12-20T15:37:01+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2024-12-20T16:46:08+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Ubiquiti cli tool: ucfg \u203a A different perspective\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Instructional Manual for Using the Ubiquiti CLI Tool ucfg Introduction The Ubiquiti CLI tool ucfg is a command-line interface for system configuration management on Ubiquiti devices. This manual provides a comprehensive guide to using the tool effectively based on its actual commands and options. Prerequisites Device Requirements: A Ubiquiti device with CLI support (e.g., UniFi\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/manuals\\\/using-ubiquiti-cli-tool-ucfg\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.cmsws.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/manuals\\\/#listItem\",\"name\":\"Manuals\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/manuals\\\/#listItem\",\"position\":2,\"name\":\"Manuals\",\"item\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/manuals\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/manuals\\\/using-ubiquiti-cli-tool-ucfg\\\/#listItem\",\"name\":\"Ubiquiti cli tool: ucfg\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/manuals\\\/using-ubiquiti-cli-tool-ucfg\\\/#listItem\",\"position\":3,\"name\":\"Ubiquiti cli tool: ucfg\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/manuals\\\/#listItem\",\"name\":\"Manuals\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/#organization\",\"name\":\"A different perspective\",\"description\":\"Right, lets get on with it...\",\"url\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/\",\"telephone\":\"+15414085189\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/manuals\\\/using-ubiquiti-cli-tool-ucfg\\\/#webpage\",\"url\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/manuals\\\/using-ubiquiti-cli-tool-ucfg\\\/\",\"name\":\"Ubiquiti cli tool: ucfg \\u203a A different perspective\",\"description\":\"Instructional Manual for Using the Ubiquiti CLI Tool ucfg Introduction The Ubiquiti CLI tool ucfg is a command-line interface for system configuration management on Ubiquiti devices. This manual provides a comprehensive guide to using the tool effectively based on its actual commands and options. Prerequisites Device Requirements: A Ubiquiti device with CLI support (e.g., UniFi\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/manuals\\\/using-ubiquiti-cli-tool-ucfg\\\/#breadcrumblist\"},\"datePublished\":\"2024-12-20T07:37:01-08:00\",\"dateModified\":\"2024-12-20T08:46:08-08:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/\",\"name\":\"A different perspective\",\"description\":\"Right, lets get on with it...\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.cmsws.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Ubiquiti cli tool: ucfg \u203a A different perspective","description":"Instructional Manual for Using the Ubiquiti CLI Tool ucfg Introduction The Ubiquiti CLI tool ucfg is a command-line interface for system configuration management on Ubiquiti devices. This manual provides a comprehensive guide to using the tool effectively based on its actual commands and options. Prerequisites Device Requirements: A Ubiquiti device with CLI support (e.g., UniFi","canonical_url":"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.cmsws.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.cmsws.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.cmsws.com\/blog\/manuals\/#listItem","name":"Manuals"}},{"@type":"ListItem","@id":"https:\/\/www.cmsws.com\/blog\/manuals\/#listItem","position":2,"name":"Manuals","item":"https:\/\/www.cmsws.com\/blog\/manuals\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#listItem","name":"Ubiquiti cli tool: ucfg"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.cmsws.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#listItem","position":3,"name":"Ubiquiti cli tool: ucfg","previousItem":{"@type":"ListItem","@id":"https:\/\/www.cmsws.com\/blog\/manuals\/#listItem","name":"Manuals"}}]},{"@type":"Organization","@id":"https:\/\/www.cmsws.com\/blog\/#organization","name":"A different perspective","description":"Right, lets get on with it...","url":"https:\/\/www.cmsws.com\/blog\/","telephone":"+15414085189"},{"@type":"WebPage","@id":"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#webpage","url":"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/","name":"Ubiquiti cli tool: ucfg \u203a A different perspective","description":"Instructional Manual for Using the Ubiquiti CLI Tool ucfg Introduction The Ubiquiti CLI tool ucfg is a command-line interface for system configuration management on Ubiquiti devices. This manual provides a comprehensive guide to using the tool effectively based on its actual commands and options. Prerequisites Device Requirements: A Ubiquiti device with CLI support (e.g., UniFi","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.cmsws.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/#breadcrumblist"},"datePublished":"2024-12-20T07:37:01-08:00","dateModified":"2024-12-20T08:46:08-08:00"},{"@type":"WebSite","@id":"https:\/\/www.cmsws.com\/blog\/#website","url":"https:\/\/www.cmsws.com\/blog\/","name":"A different perspective","description":"Right, lets get on with it...","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.cmsws.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"A different perspective \u203a Right, lets get on with it...","og:type":"article","og:title":"Ubiquiti cli tool: ucfg \u203a A different perspective","og:description":"Instructional Manual for Using the Ubiquiti CLI Tool ucfg Introduction The Ubiquiti CLI tool ucfg is a command-line interface for system configuration management on Ubiquiti devices. This manual provides a comprehensive guide to using the tool effectively based on its actual commands and options. Prerequisites Device Requirements: A Ubiquiti device with CLI support (e.g., UniFi","og:url":"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/","article:published_time":"2024-12-20T15:37:01+00:00","article:modified_time":"2024-12-20T16:46:08+00:00","twitter:card":"summary_large_image","twitter:title":"Ubiquiti cli tool: ucfg \u203a A different perspective","twitter:description":"Instructional Manual for Using the Ubiquiti CLI Tool ucfg Introduction The Ubiquiti CLI tool ucfg is a command-line interface for system configuration management on Ubiquiti devices. This manual provides a comprehensive guide to using the tool effectively based on its actual commands and options. Prerequisites Device Requirements: A Ubiquiti device with CLI support (e.g., UniFi"},"aioseo_meta_data":{"post_id":"271","title":null,"description":null,"keywords":[],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2024-12-20 15:36:41","updated":"2025-07-23 02:29:30","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.cmsws.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.cmsws.com\/blog\/manuals\/\" title=\"Manuals\">Manuals<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tUbiquiti cli tool: ucfg\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.cmsws.com\/blog"},{"label":"Manuals","link":"https:\/\/www.cmsws.com\/blog\/manuals\/"},{"label":"Ubiquiti cli tool: ucfg","link":"https:\/\/www.cmsws.com\/blog\/manuals\/using-ubiquiti-cli-tool-ucfg\/"}],"_links":{"self":[{"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/pages\/271","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/comments?post=271"}],"version-history":[{"count":6,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/pages\/271\/revisions"}],"predecessor-version":[{"id":283,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/pages\/271\/revisions\/283"}],"up":[{"embeddable":true,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/pages\/272"}],"wp:attachment":[{"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/media?parent=271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}