How to install bitwarden in pantavisor

Here you will see the details on how to install bitwarden in your pantavisor device, this bitwarden version comes with ngrok preinstalled in order to expose the bitwarden server using ngrok, in that way been able to use it outside your local network.

In order to install bitwarden you need to clone your pantavisor device like this:

pvr clone https://pvr.pantahub.com/USERNAME/DEVICENAME pantavisor_device

You can find the pvr clone url in hub.pantacor.com

After de device has been cloned you can do:

cd pantavisor_device

Install the bitwarden application from the one marketplace

pvr app add --from https://pvr.pantahub.com/highercomve/one_marketplace_experimental#bitwardenrs,_config/bitwardenrs --type=pvr bitwardenrs

Then open the file _config/bitwardenrs/etc/ngrok/config.json inside you will find a json with only one key authtoken, there is where you are going to set up your ngrok Authtoken.

After the configuration is done you only need to deploy a new device revision.

pvr add .
pvr commit 
pvr post -m "Install bitwarden application"

After that revision is installed on the device you can go to your bitwarden account and check for the new endpoint created.

Then visit the https URL given by ngrok and you are ready to go!

Happy Hacking!

2 Likes

Hello Sergio

Thank you for the guide.

After running the command to install the app from marketplace I get this error

Imported 3 objects to /var/pvr-sdk/.pvr/objects
rename /root/pantavisor_device/bitwardenrs,_config/bitwardenrs /root/pantavisor_device/bitwardenrs: no such file or directory

I can still continue and edit _config/bitwardenrs/etc/ngrok/config.json and add the Authtoken.
But when I run

pvr post -m "Install bitwarden application"

I get this error

Getting remote repositor info ... [OK]
ERROR: REST call failed. 404  404 Not Found
REST call failed. 404  404 Not Found

Hello!

I know that bug, sorry that bug is solved in our PVR CLI development branch and is going o be solved in the next release of pvr but for now, you can go and update pvr to use the development branch

In order to updated you can do this:

pvr global-config set DistributionTag=develop
pvr self-upgrade

after that repeat the steps from the top.

Sorry for the inconvenience.

1 Like

Hi Sergio

Thank you for the help. I was able to install Bitwarden and it works.

I have one more question, I am not so good in Linux and Pantavisor and do not know how all works, and searched for documentation but could not find a solution to this.
Do you know how I can access Bitwarden files on Pantavisor, or add environment variables for example to disable new user registration or enable Admin Panel?

Yes for sure, if you see your pantavisor device (after pvr clone)

you will see a bitwarden folder with a src.json file inside.

Inside that file, you can add ENV variables.

something like:

{
....   
"docker_config": {
       ....
        "Env": [
            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            "LC_ALL=C.UTF-8",
            "DEBIAN_FRONTEND=noninteractive",
            "UDEV=off",
            "QEMU_CPU=arm1176",
            "ROCKET_PROFILE=release",
            "ROCKET_ADDRESS=0.0.0.0",
            "ROCKET_PORT=8643"
        ],
...
}

In there you will be able to add as many as you need, and after that, you will need to run the pvr app install NAME_OF_APP

And finally pvr add . && pvr commit && pvr post -m "add bitwarden environment variables"