Navigation

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    FreePBX Standard Setup Part 1: Command Line

    FreePBX Guides, Hints, and Tricks
    setup command line freepbx
    1
    1
    626
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Jared Busch
      Jared Busch last edited by Jared Busch

      Sangoma continually updates FreePBX.

      Because of that, this guide will generalize some terms where possible.

      Screens may differ after an update.


      If your method for accessing the console does not allow you to copy and paste into the console, then we strongly recommend that you use SSH, as the root user, for this initial setup.

      This process requires that you have created a SSH keypair for secure login to Linux systems.

      If you need instruction for that see: Creating an ed25519 key in Windows 10


      1. However you installed FreePBX from the ISO, when that installation completes, the console screen should be waiting for a log in.

        1. The only login available immediately after installation will be the root user.
        2. You can log in to the console or via SSH. Be aware of the notice above about copy and paste.
          1. On the Console, enter root for the login and hit enter.
          2. Enter the root password you set during installation, the password will not be echoed back, then press enter.
            899a3caa-f07d-472b-bb9b-40c2d2c4beb2-image.png
          3. Or log in initially via SSH.
            7dfdff63-79be-43c6-8bb1-04ac12ea7c19-image.png
        3. Either way you will be greeted by the standard FreePBX message of the day (MOTD).
          f16cf3ee-05ab-425f-856c-907dc9e6946b-image.png
      2. The first thing to do is to secure SSH. This is accomplished by:

        1. Creating a non-root user with administrator rights (sudo).
        2. Disabling the ability of the root user to log with the SSH protocol.
        3. Disabling the ability to log in with a password.
        4. We have created a script to handle this initial root setup process. If you want to do it manually, please read the script to see how we did it.
      3. Execute this command to download the script from our public GitLab with this command:
        wget https://gitlab.com/bundyassociates/freepbx-scripts/setup-scripts/-/raw/master/root_setup.sh
        73cd9efe-38cb-4c48-9425-52108e441dab-image.png

      4. Set the downloaded script to be executable: chmod +x root_setup.sh
        ca63bbd5-4347-45c3-ae5d-c55d37de5090-image.png

      5. Execute the script: ./root_setup.sh

        1. It will prompt for your SSH username
          4af06f63-ab3d-42c9-ae34-804de3a98184-image.png
        2. Then tell you to log out.
          b142a8b9-28f8-4f67-9e89-4b03472d1620-image.png
      6. Logout of the root session by entering: exit

      7. Log in as the user you just created. You will be forced to update your password.

        1. Your current password is: ChangeMe
        2. Your new password can be whatever you want, try to be a bit secure about it.
        3. You will enter ChangeMe once to log in. Then again as the "current password" to be changed.
        4. It will automatically log you out after changing your password.
          a63a2450-64d8-474f-8e90-a3e3e2f12f78-image.png
      8. Before logging back in, you need to copy your SSH public key to the system.
        The command to do that is: ssh-copy-id [email protected]
        03d64ffa-8de8-4632-879f-0608866417af-image.png
        I have multiple keys on my system, so I need to specify the key I want to use with the -i option.

      9. Log in via SSH again, it will not ask for a password.
        5e88ba7b-074d-46b7-b83e-4ac2ae0a27fc-image.png

      10. Execute, with sudo, the setup script that was pre-downloaded during the root setup.
        sudo ./setup.sh

      11. You will be prompted for your password in order to execute the commands in the script with sudo access.
        c5e014db-f2f1-4949-9173-db68eac4b53c-image.png

      12. Get a coffee, this will take a while to finish.
        de922a87-76aa-4ac3-b1bf-e693eab5673a-image.png

        1. Especially if the updates include a new Linux kernel.
          ec5ab139-4ef0-4da0-8ba7-14353450108d-image.png
      13. When completed, it will tell you to reboot and go to the web interface to complete the setup.
        ad25c983-2512-4d7b-9988-277599e84c60-image.png

      14. Reboot the system as instructed
        sudo reboot
        7af3f0a7-9c61-486d-b804-2b8cc2d16aa1-image.png

      15. Wait for the reboot to complete and then go to the web interface as previously instructed to complete the setup.

        1. You know the reboot is complete when the console screen returns to this.
          3170c173-5acd-4086-bc9f-64c6e8cb2ad9-image.png
        2. Be prepared for warnings about insecure connections the the web interface. Part of the GUI process will be to create a valid SSL certificate.
          2cc50034-9293-4af5-bf4a-20c4e89e8213-image.png
      1 Reply Last reply Reply Quote
      • First post
        Last post