Portable App Distribution for Linux

Last modified: March 26, 2026

Introduction

Portable App Distribution refers to packaging applications in a self-contained format that includes all necessary dependencies, allowing them to run on various Linux systems without requiring traditional installation.

This documentation provides guidance for deploying Portable App Distribution in a Linux environment and serves as a helpful reference rather than official implementation support.

Prerequisites

To deploy your app to an on-premises Cloud Foundry configuration using Portable App Distribution, ensure that you fulfill the following prerequisites:

  • A Linux environment. This can be a virtual machine, a physical server, or a cloud instance (for example, AWS EC2, Azure VM, Google Cloud VM). You will need sudo or root privileges for some commands.

  • Java Development Kit (JDK). Your application requires a compatible Java runtime. For installation instructions, refer to the following sections.

  • Your Portable App Distribution .zip file.

  • A method to transfer the .zip file onto your Linux machine, for example:

    • Cloud storage - If your Linux machine is in the cloud, you can use the cloud provider's CLI (for example, AWS S3, Azure Blob Storage, Google Cloud Storage).
    • SFTP/SCP - For direct file transfer from your local machine.
    • Version Control System (VCS) - If your .zip is stored in a repository.
    • Artifactory/Nexus: For artifact management.

Deploying an App with Portable App Distribution

To deploy your app to Linux, perform the following steps:

  1. Connect to your Linux server by running the following command: ssh -i "<your SSH private key, if applicable>.pem" <your username on the Linux instance>@<public IP address or host name of your server>

  2. Optional: Update your package lists and installed packages by running one of the following commands:

    • For Debian/Ubuntu-based systems:

      sudo apt update -y
      sudo apt upgrade -y
    • For RHEL/CentOS/Amazon Linux-based systems: sudo yum update -y or sudo dnf update -y

  3. Install the Java Development Kit by running one of the following commands:

    • For Amazon Linux: sudo yum install java-21-amazon-corretto -y
    • For Debian/Ubuntu-based systems: sudo apt install temurin-21-jdk -y
    • For RHEL/CentOS-based systems: sudo yum install temurin-21-jdk -y or sudo dnf install temurin-21-jdk -y

If your application requires it, you can change the Java version on vendor as needed, for example, openjdk-21-jdk or java-17-amazon-corretto.

  1. Verify that Java is correctly installed by running the following command: java -version.

  2. Upload the Portable App Distribution .zip file to a location where your Linux server can access it by using one of the following options, depending on the location and configuration of your Linux machine.

    • For Azure Blob Storage (often done as part of a CI/CD pipeline): az storage blob upload --account-name <your storage account name> --container-name <your container name> --name <your app>.zip --file <your project folder>/build/distributions/your-app.zip --auth-mode login

      You may need to log in to Azure CLI first with the az login.

    • For Cloud Storage (often done as part of a CI/CD pipeline): <cloud provider, for example, aws s3> cp <your project folder>/build/distributions/your-app.zip s3://<your bucket>/

      Adjust the cp command for your specific cloud provide (for example, gsutil cp for Google Cloud, or aws s3 for AWS S3).

    • For SFTP/SCP (when transferring directly from your local machine to the Linux server): scp -i "<your SSH private key if app>.pem" <path to the .zip file on your local machine> <your user name>@<your Linux server IP or host name>:/home/<your user>/

    • For JFrog Artifactory or similar: curl -u "<your Artifactory user name>:<your Artifactiory password>" -X PUT "https://<path to your file>.zip" -T <your app>.zip

      Use the -O flag to save the file with its original name.

    • From a public URL using wget: wget https://<path to your file>.zip

  3. Download the .zip file onto your Linux server by using one of the following options, depending on the location and configuration of your Linux machine.

    • For Azure Blob Storage: az storage blob download --account-name <your storage account name> --container-name <your container name> --name <your app>.zip --file /home/<your user name>/<your app>.zip --auth-mode login

      Ensure that the user running this command on the Linux instance has the necessary permissions to access the Azure Storage account and container. You may need to log in to Azure CLI first with the az login.

    • For Cloud Storage: <cloud provider, for example, aws s3> cp s3://<your bucket name>/<your app>.zip /home/<your user name>/<your app>.zip

      Adjust the cp command for your specific cloud provide (for example, gsutil cp for Google Cloud, or aws s3 for AWS S3).

      Ensure that the user running this command on the EC2 instance has read permissions for the specified S3 Bucket.

    • For SFTP/SCP (when transferring directly from your local machine to the Linux server): scp -i "<your SSH private key if app>.pem" <path to the .zip file on your local machine> <your user name>@<your Linux server IP or host name>:/home/<your user>/

    • For JFrog Artifactory or similar: curl -u "<your Artifactory user name>:<your Artifactiory password>" -0 "https://<path to your file>.zip" -T <your app>.zip

      You can also retrieve the files using wget.

  4. Extract the .zip file by running the following command: unzip <your app>.zip -d <your desired directory>.

  5. Navigate into the extracted directory and execute the start script by running the following command:

    cd your-desired-directory
    sh bin/start

    The bin/start script is a common convention for Portable App Distributions using the Default configuration. If your application uses a different configuration, start script, or command, adjust accordingly.

  6. Verify that the application is running by opening the following URL in your browser: http://<public IP of your Linux instance>:8080.

    8080 is the default port. If your application is configured to run on a different port, adjust accordingly.

    Ensure that the port is open in your Linux server's firewall (for example, firewalld, ufw), and any cloud security groups or network access control lists (NACLs).