Follow these steps to setup PhpMongoAdmin:

You may also wish to consult this page detailing some Nested and Alias setup requirements and warnings: Nested Installations and Aliases

  1. Before proceeding ensure that your setup meet the minimum requirement. Read then requirements doc for more information.
  2. In both of the following scenarios, you will need a directory structure that allows you to have files outside (above) of the web document root (/public)
    1. /hosting/websites
    2. /hosting/websites/phpmongoadmin
    3. /hosting/websites/phpmongoadmin/public
    4. Note: you may have to rename /public to /public_html if you are using CPanel or similar
  3. Downloading:
    1. Download to the application ZIP to a directory that is 1 level above your intended web root.
    2. Unzip to the current directory.  When you inspect the files/folders you will see the /public directory - that will be the 'Document Root' for your website configuration.
  4. Cloning:
    1. CD to the intended application root directory
    2. Clone the repository to the current directory:
      1. git clone .
  5. If all went according to plan - now its time to create the .env configuration file for the application.
    1. These files cannot be distributed as part of the application - they are unique for each installation.
    2. There are two possible methods to use.
      1. Copy the sample file provide by Laravel -
        • cp .env.example .env
      2. Create a new one from scratch:
        • touch .env will create the file
        • Alternatively let the editor create the file: nano .env or vi .env to open for editing
    3. Use this sample as a guide:
      • APP_NAME="PHP Mongo Admin"


        DB_DATABASE=/path to your application root/database/sqlite/database.sqlite



        MAIL_FROM_ADDRESS=personThis email address is being protected from spambots. You need JavaScript enabled to view it.
  6. Now that you have a basic configuration - its time to run some application initialization procedures:
    1. Run the composer install from the application root:
      • composer install
      • In some cases you may need to specify the full path to compose
    2. Run the artisan migration process to initialize the local SQLite database. First, create the directory and database file:
      • mkdir database/sqlite
      • touch database/sqlite/database.sqlite
      • NOTE: You are not constrained to this exact format - you may wish to use a different path and name, If so, the change must be reflected in the .env configuration file
      • php artisan migrate
    3. Run the Passport setup - this create the unique keys for your local user tokens
      • php artisan passport:install
      • php artisan passport:client --personal
  7. If you have configured your web server, you should now be able to load the application.
  8. Access the application URI:
    1. The initial setup will trigger.
    2. This process will setup your Control User.
      • Enter a name, username, password and email address - save when completed.
      • This user will be the Master Administrator account.
    3. Once the Control User is created, the application will load the login form.
      • You will have to select 'Localhost' from the Host dropdown.
      • NOTE: Currently PhpMongoAdmin only supports local login after initial setup - this will be updated before beta release.
      • Enter your Control User login credentials to continue.
    4. If the MongoDB daemon has been started without security -> authentication, then you should be able to see some databases and statistical information.
      1. You will not be required to create and Server configuration to use the application.
    5. If your MongoDB daemon has been started with security -> authentication enabled in the configuration, you will need to create a Server configuration.
      1. Click on Servers on the Top navigation
        1. NOTE: Please be aware that the 'password' you enter here is saved unencrypted into the local SQLite database (we'll be adding encryption later on)
        2. Enter the username and password details for a user that has MongoDB access.
        3. If the MongoDB is a local install, enter localhost into the host field.
        4. The default PORT setting should be OK.
        5. Check the 'Active' checkbox.
        6. After saving the server config, refresh the application (Ctrl F5 on windows)
  9. Please report any setup issues via our GitHub account:
  10. Support is also available via this website: please use this form to report problems.

Thank you for using PhpMongoAdmin...


Go To Top