PVTX
To add a new container or app to a Pantavisor-enabled system, you can use the pvr CLI in conjunction with the Pantavisor UI (pvtx). This guide demonstrates how to download a Docker container from Docker Hub, prepare it for a Pantavisor device, and then upload it using the local network.
1. Prerequisites
You’ll need a few things set up on your development machine before you get started:
- Pantavisor pvr CLI: This command-line tool is essential for managing Pantavisor-enabled devices and their applications. You can download and install it from the official Pantavisor documentation.
- Docker: You’ll also need Docker installed and running on your development machine to pull and manage container images.
2. Creating a New Pantavisor App
Here’s how to create the app package for Home Assistant using the pvr CLI:
-
Create a working directory for your new app and navigate into it:
mkdir device-apps cd device-apps -
Initialize a new Pantavisor project in this directory:
pvr init -
Add Home Assistant from Docker Hub:
pvr app add homeassistant --from homeassistant/home-assistant:stable --platform linux/arm64This command pulls the image from Docker Hub and prepares the necessary files for Pantavisor.
-
Add the new files to your project’s revision history:
pvr add . -
Commit the changes with a descriptive message:
pvr commit -m "added homeassistant app" -
Export the app as a
.tar.gzfile:pvr export homeassistant.tar.gzThis command creates a compressed archive named
homeassistant.tar.gz.
3. Uploading the App to the Device
Now that you have your app package, you can upload it to your Pantavisor-enabled device using the local network and the pvtx UI.
-
Access the Pantavisor UI. Open a web browser and navigate to
http://<DEVICE_IP>:12368/app. -
Begin a transition. On the web page, click on “begin transition”.
-
Upload the
.tar.gzfile. Simply drag and drop thehomeassistant.tar.gzfile you created earlier.
-
Commit the transaction. Follow the on-screen prompts to commit the changes.
-
Verify the update. You can check the running apps using the serial console with
lxc-lsor access Home Assistant athttp://<DEVICE_IP>:8123.
Next Steps
Now that your application is running, you can:
- View more details about your apps to see their status.
- Learn how to Configure your application settings to customize how it runs.
