Documents
Plugn Quickstart (Day 1)
Plugn Quickstart (Day 1)
Type
Document
Status
Published
Created
Nov 5, 2025
Updated
Nov 5, 2025
Updated by
Dosu Bot

Day-1 Quickstart: plugn Backend

  1. Clone the repository:

    git clone <PLUGN_REPO_URL>
    cd plugn
    
  2. Start Docker Compose (recommended, sets up backend, MySQL, Redis):

    docker-compose up
    
  3. In a new terminal, enter the backend container:

    docker-compose exec backend bash
    
  4. Install PHP dependencies:

    php composer.phar install
    
  5. Create your local environment config:

    • Copy the appropriate environment files from environments/ as described in the env documentation, or run the init script interactively:
    ./init
    
    • Or non-interactively (example for Development):
    ./init --env=Development --overwrite=n
    
    • The script will copy config files and set up keys. Requires the OpenSSL PHP extension.
  6. Run database migrations:

    ./yii migrate
    
  7. (Alternative) To run backend with PHP built-in server (not recommended for full stack):

    php -S localhost:8083 -t web
    
  8. Wait for MySQL to be ready before running migrations or starting the backend for the first time.

  9. Run a frontend app (e.g., plugn-ionic or plugn-dashboard-ionic) in a separate terminal. Set its API_BASE_URL to:

    http://localhost:8083
    
    • Refer to the frontend's README for exact setup and where to configure API_BASE_URL.
  10. Access backend at http://localhost:8083.

For MySQL access:

docker-compose exec mysql bash
mysql -uroot -p12345

PhpMyAdmin: http://localhost:8080 (user: root, pass: 12345)

For more details, see the plugn README.