Set up LAMP stack in a Pantahub device(RPI3 B+)

Follow the below steps to set up LAMP stack in your Pantahub device(RPI3)

Step 1: Burn the RPI3 initial stable image into your sd card.

a) Download RPI3 image

Click to download:

b) unxz the device image

Run $ unxz rpi3_initial_stable.img.xz

c) Burn image into sd card using Raspberry Pi Imager 1.2

Step 2: Boot your RPI3

a) Insert your sd card and supply the power

Step 3: Detect & Claim your device

a) Connect a LAN cable between your RPI3 & computer/Router.

b) Open your terminal & run $pvr scan

c) Claim your device

$ pvr claim -c grossly-pleasant-polliwog

d) Log into and check whether the newly claimed device appeared in the dashboard or not.

Step 4: Clone the device to your computer

$ pvr clone vastly_measured_caribou

Step 5: Add a new app named “apache-php” & Deploy to the device

a) Move to device root dir

 `$ cd vastly_measured_caribou`

b) Add new app “apache-php” into the device

$ pvr app add apache-php --from=arm32v7/php:7.2-apache

c) Deploy the changes to the device

$ pvr add .
$ pvr commit
$ pvr post

d) Check the device status changes in dashboard & wait for the status to become “DONE

Status 1:

Status 2:

Status 3:

Status 4:

e) Verify the “apache-php” installation

Access the device IP: in your web browser.

Now you can see that the Apache server is started serving on port 80 in your RPI3 device. But it is showing as “Forbidden” because there is nothing to serve.

Step 6: Serve a php script using the newly installed apache2.4 server

a) Add your ssh key to your device user meta data using dashboard

Note: the key name you should use is pvr-sdk.authorized_keys

b) SSH to the newly created app container “apache-php”

 $ ssh -p 8222 php-apache@

c) Install vim editor

$ apt-get update
$ apt-get install vim

d) Place a PHP script index.php inside the apache Document Root folder

$ cd /var/www/html
$ vim index.php

e) Access your device IP: in your web browser

Step 7: Add “mysql” app to the device & deploy the change

a) Add “mysql” app

$ pvr app add mysql --from=yobasystems/alpine-mariadb:arm32v7 --config-json=<(echo -n -e '{
"Env": [

b) Deploy the changes

 $ pvr add .
 $ pvr commit
 $ pvr post

Step 8: Add “adminer” app to the device for managing the mysql database

Adminer is a dashboard app which can be used to visually manage the mysql database

By default Adminer will be server through port 8080

a) Add “adminer” app

pvr app add adminer —from=arm32v7/adminer

b) Deploy the changes

 $ pvr add .
 $ pvr commit
 $ pvr post

c) Access the Adminer dashboard by using

d) Log into the Adminer dasdhboard by entering the below mysql credentials


Now you can easily Create/update/delete mysql databases/tables through Adminer Now you can deploy your custom LAMP app source code into the dir: /var/www/html of docker image:arm32v7/php:7.2-apache and update docker image tag in src.json then run

pvr app update apache-php --from=arm32v7/php:<NewTag>