How do I jump into my containers for debugging in Porter?
Last updated: December 17, 2025
Context
When running applications in Porter, developers may need to access their deployed containers directly for debugging issues in staging or production environments. This requires the ability to SSH into specific containers to investigate and troubleshoot problems.
Answer
Porter provides a simple CLI command to access your containers for debugging purposes. You can use the porter app run command in two ways:
Create a copy of the container (default behavior):
porter app run <app-name> -- bashAccess an existing container directly:
Use the-eflag to connect to an existing container instead of creating a copy:porter app run -e <app-name> -- bashAccess containers in preview environments:
Use the-xflag followed by the preview branch name to connect to containers in specific preview environments:porter app run -x <preview-branch-name> <app-name> -- bash
For detailed information about additional command options and parameters, refer to the Porter CLI documentation.