fwconsole
Manage FreePBX from the command line
TLDR
Reload FreePBX configurations
Start Asterisk and other commands needed by FreePBX
Stop Asterisk and other commands needed by FreePBX
View and update settings
List available backups
List available FreePBX commands
Change ownership of all files and directories that FreePBX needs to be owned by the apache user
SYNOPSIS
fwconsole [global-options] <command> [arguments]
fwconsole [global-options] --help|<command> --help
PARAMETERS
--help, -h
Displays help for the command or a specific subcommand, showing available options and arguments.
--version, -V
Displays the fwconsole application version.
--quiet, -q
Do not output any message, suppressing all console output.
--verbose, -v|vv|vvv
Increase the verbosity of messages. -v for normal output, -vv for more verbose, -vvv for debug.
--ansi
Forces ANSI output, enabling colored and formatted text even if not detected automatically.
--no-ansi
Disables ANSI output, removing colored and formatted text.
--no-interaction
Do not ask any interactive questions, useful for scripting or automation.
DESCRIPTION
fwconsole is the primary command-line interface (CLI) tool for managing and interacting with FreePBX systems. FreePBX is a popular open-source web-based graphical user interface (GUI) that controls and manages Asterisk, an open-source framework for building communications applications.
While FreePBX offers extensive web-based administration, fwconsole provides a powerful alternative for administrators who prefer command-line operations, require automation, or need to perform tasks that are difficult or impossible through the web interface. It allows for advanced configuration, troubleshooting, module management, system service control (like Asterisk restarts), database operations, and file permissions adjustments. The command’s modular design means that its functionality is extended through various subcommands, often corresponding to FreePBX modules, offering granular control over the entire communications system.
CAVEATS
Using fwconsole requires an installed FreePBX system; it is not a general Linux command. Many operations require root privileges or execution via sudo. Incorrect usage can lead to system instability, data loss, or disruption of FreePBX/Asterisk services. The available subcommands and their specific options can vary significantly based on the FreePBX version and the modules currently installed and enabled on the system.
COMMON SUBCOMMANDS & USAGE
While fwconsole has global options, its power lies in its vast array of subcommands, each designed for specific management tasks. These are typically executed as fwconsole <command> [options]. Some frequently used subcommands include:
- chown: Fixes file permissions for Asterisk and FreePBX directories. Essential after manual file changes or upgrades.
- reload: Reloads Asterisk configuration, applying changes made via the FreePBX GUI or CLI.
- restart: Restarts Asterisk services entirely.
- ma: Module Admin commands, e.g., fwconsole ma downloadinstall <module>, fwconsole ma upgradeall.
- db: Database interaction commands, e.g., fwconsole db query "SELECT * FROM users".
- userman: User Management commands, e.g., fwconsole userman sync.
HISTORY
fwconsole emerged as the modern successor to the legacy amportal command-line utility in FreePBX. Developed to leverage the robust Symfony Console component, it provided a more structured, extensible, and user-friendly command-line interface. This shift aimed to standardize CLI interactions, improve maintainability, and offer richer functionality for administrators managing FreePBX systems. Its adoption marked a significant step in FreePBX's evolution towards a more professional and developer-friendly administration environment.