Page tree
Skip to end of metadata
Go to start of metadata

If you wish to log into FreePBX programmatically, enable 'REMOTEUNLOCK' in Advanced Settings, and then run

amportal a genunlockkey

This will provide you with a parseable output like this:

[[email protected] tmp]# amportal a genunlockkey
Please wait...
If REMOTEUNLOCK is enabled, you will receive a value for KEY. You can use
that as a parameter to config.php, thus:
[[email protected] tmp]#

Note that if 'REMOTEUNLOCK' is not enabled in Advanced Settings (it is not enabled by default), the 'KEY' line will be blank.


  • You only get one attempt to log in, after the key is generated. If you pass an incorrect key, the stored key is deleted, and you'll need to generate another.
  • If REMOTEUNLOCK is disabled before the key is used, it will be invalid. 
  • The key is NOT time limited.
  • There is only one valid key per system at a time. 

Code Reference:

  • No labels