This page is the reference for the bash commands and shell scripts that ship with the Porta VM image. They are available from any shell on the VM — over SSH, or at the VirtualBox console — and are grouped by the task they help you accomplish.
For a quick-reference cheatsheet covering helpers, log paths, container internals, and monitoring URLs together, see the Porta VM Diagnostics Cheatsheet.
Commands appear as bare names, like porta_check_version. These are bash shortcuts available on VM image 0.9.14.2 and newer. Type them at the prompt and press Enter.
Scripts appear with their full path, like ~/scripts/setup_static_ip.sh. These are the underlying shell scripts and are available on all VM images. Run them by executing the full path.
Available since indicates the earliest Porta VM image version that ships the helper. All means it has been there since the first release. Run porta_check_version (or read the VM image filename) to find your version.
Shows the group replication status as reported by this machine.
0.9.14.2+
porta_all_group_status
Runs the same status query against every machine in the group using the entries in /etc/hosts. Each VM’s /etc/hosts must be correct for this to work.
0.9.14.2+
porta_start_repl
Runs START GROUP_REPLICATION on this machine.
0.9.14.2+
porta_stop_repl
Runs STOP GROUP_REPLICATION on this machine.
0.9.14.2+
porta_bootstrap
Bootstraps the replication group from this machine. Check first with porta_all_group_status — only run this if no other member is already primary.
0.9.14.2+
porta_set_bootstrap_ON
Persists the bootstrap flag as ON. This machine will always set itself as primary on startup. Useful only for single-VM setups — never use it on a multi-VM replication group, as it can cause split-brain.
0.9.14.2+
porta_set_bootstrap_OFF
Persists the bootstrap flag as OFF. This is the default state for a Porta VM.
These helpers query the same Scheduler tables but on different machines in the replication group. Use the variant that matches the machine you are currently on — for example, run porta_playouts from the main machine, porta_backup_playouts from the backup machine.
Helper
What it shows
Available since
porta_playouts
Last 50 Scheduler playouts, including the currently active and next entries. Main machine only.
0.9.14.2+
porta_playout_history
Last 50 Scheduler playout history items. Main machine only.
0.9.14.2+
porta_backup_playouts
Last 50 Scheduler playouts. Backup machine only.
0.9.14.2+
porta_backup_playout_history
Last 50 Scheduler playout history items. Backup machine only.
0.9.14.2+
porta_arbiter_playouts
Last 50 Scheduler playouts. Arbiter machine only.
0.9.14.2+
porta_arbiter_playout_history
Last 50 Scheduler playout history items. Arbiter machine only.
Picks a new hostname and unique machine ID, updates /etc/hosts, and reboots. Run this after importing the VM image to a second or third host so the copies don’t share an identity. See Manually Resetting the Identity of a Porta On Prem VM.
All
~/scripts/setup_static_ip.sh
Sets a static IP via netplan. The Porta VM PowerShell setup script does this automatically — only run manually if setup failed mid-flight. See Manually Setting Up a Static IP.
All
~/scripts/disable_static_ip.sh
Disables the static IP configuration by renaming /etc/netplan/99-portacfg.yaml. The VM will fall back to DHCP on next boot.
All
~/scripts/reset_dhcp.sh
Forces a new DHCP lease and clears cached leases. Only meaningful when the VM is not using a static IP.
All
~/scripts/static_ip_info.sh
Prints the current netplan static IP configuration.
Downloads the latest available Porta Manager build and runs the installer. Automatically runs backup-env.sh first so APP_KEY is preserved across the update.
All
mngr_init_user
Initialises the first Porta Manager admin user. Only needed after a full Porta Manager database wipe.
0.9.14.2+
mngr_backup_env
Copies the .env file from the porta-manager-app container to ${MNGR_CONFIG_DIR}/.env to preserve APP_KEY between updates. Runs automatically when calling update_manager.
0.9.14.2+
mngr_restore_env
Restores the preserved .env file from ${MNGR_CONFIG_DIR}/.env back into the porta-manager-app container.
0.9.14.2+
mngr_recreate
Recreates the Porta Manager containers from their existing images, preserving data volumes. Useful if the VM’s IP changed without running Fix IP Settings in the Porta Manager dashboard.
0.9.14.2+
mngr_wipe_recreate
Destructive — wipes Porta Manager data and storage volumes, then recreates the containers from existing images. Porta application data is not affected.
0.9.14.2+
~/scripts/porta-manager/install-manager.sh
Underlying script for update_manager.
All
~/scripts/porta-manager/init-manager-user.sh
Underlying script for mngr_init_user.
All
~/scripts/porta-manager/backup-env.sh
Underlying script for mngr_backup_env. Runs automatically as part of install-manager.sh.