# Perform a major upgrade of a Podman image

Supported in: This document explains how to perform a major upgrade for an existing remote
agent using the Podman image. The procedure assumes you're viewing the
**Major Upgrade** dialog in the Google Security Operations SOAR platform. Before
you begin, confirm that your firewall allows outbound HTTPS access on TCP port
`443` to the container registries listed in
[Network and firewall requirements](https://docs.cloud.google.com/chronicle/docs/soar/working-with-remote-agents/requirements-and-prerequisites#network-and-firewall-requirements).

1. On the **Major Upgrade** dialog, copy the provided Podman run command:

   ```bash
   PODMAN_COMMAND
   ```
2. List the current running Podman containers:

   ```bash
   podman ps
   ```
3. Enter your agent's container ID:

   ```bash
   CONTAINER_ID
   ```
4. Enter your agent's container name:

   ```bash
   AGENT_NAME
   ```
   .
5. Pull the latest Podman image to your machine using the following command. You can replace the `:latest` tag with a specific version, such as `1.4.8.3`.

   ```bash
   podman pull us-docker.pkg.dev/siem-ar-public/images/agent:latest
   ```
6. Copy the original environment variables (`.bash_profile`) to a local temporary file.

   ```bash
   podman exec CONTAINER_ID cat /home/siemplify_agent/.bash_profile > temp_bash_profile.txt
   ```
7. Stop the agent's Podman container.

   ```bash
   podman stop CONTAINER_ID
   ```
8. Rename the container for backup.

   ```bash
   podman rename AGENT_NAME AGENT_NAME_backup
   ```
9. Run the new agent image. If you changed the `latest` tag, make sure the image tag matches the one pulled in.

   ```bash
   PODMAN
   ```
10. List the running Podman containers.

    ```bash
    podman ps
    ```
11. Enter your agent's new container ID:

    ```bash
    NEW_CONTAINER_ID
    ```
12. Copy the environment variables `.bash_profile` from the temporary file to the new container.

    ```bash
    cat temp_bash_profile.txt | podman exec -i 
        NEW_CONTAINER_ID sh -c 'cat > /home/siemplify_agent/.bash_profile'
    ```
13. Restart the agent service to apply the modified environment variables.

    ```bash
    podman exec NEW_CONTAINER_ID supervisorctl restart all
    ```

**Need more help?** [Get answers from Community members and Google SecOps professionals.](https://security.googlecloudcommunity.com/)