Before you begin
- The process must have a running, ready instance. A process with 0 instances, a crashing process or a suspended application has nothing to connect to.
- Cron jobs and jobs can’t be opened: they only run on their schedule or around deployments.
Anyone who can view the application can open a web terminal in it, and the shell has the same access as the process, including its environment variables. Give access to the application with care.
Open a terminal
1
Open the Web terminal tab
In the sidebar, click Applications, then click the application. Click the Web terminal tab.
2
Pick the process and shell
Pick the Process (the web process is selected first) and the Shell:
sh, bash or zsh.3
Run commands
When the status reads Connected, type in the terminal.


- Which instance. The terminal connects to one ready instance of the process. With more than one instance, you can’t pick which one.
- Shells.
shis always available.bashandzshwork only if the image contains them; otherwise the terminal says the shell isn’t available in this process. - Switching. Changing the process or the shell starts a new session in that process; the current one ends.
- Environment. The shell sees the process’s runtime environment variables; run
printenvto list them. For images built with Buildpacks, the shell starts through the buildpack launcher, so the language runtimes are on thePATH. - Output. What you run in the terminal doesn’t appear in the runtime logs.
What persists
The terminal runs inside the instance’s container, so it changes only that instance:- Files you create or change are lost when the instance restarts or the application is deployed again, unless they’re on a disk.
- Other instances of the process don’t see the change.
- Processes you start from the terminal stop when the session ends.
Find language tools in a Nixpacks image
In images built with Nixpacks, language tools live under/nix/var/nix/profiles/default/bin/ (for example /nix/var/nix/profiles/default/bin/node), and Python packages are installed in a virtual environment in /opt/venv. To run Django or other Python commands, activate it first:
When a session ends
The status reads Disconnected when a session ends, with the reason and a Reconnect button.
An instance that restarts, for example during a deployment or after a crash, ends every session open in it.
Run a command without a terminal
To run one command from a script or an AI agent, use the Run a command in a process API operation. It runs a single command in a running instance and returns its output and exit code:- The command is an argument list (
["ls", "-la", "/app"]) run without a shell, so pipes, redirects and&&don’t work. Wrap it as["sh", "-c", "…"]when you need them. - It waits up to 15 seconds by default and 60 seconds at most.
- An API key with read access can run only read-only commands such as
ls,cat,env,psandgrep; a key with write access can run any command.
dash, ksh, csh and tcsh shells.