2018-12-11 15:07:22 -05:00
# Interactive Web Terminals **[CORE ONLY]**
2018-07-19 10:49:32 -04:00
2018-09-10 05:54:38 -04:00
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/50144) in GitLab 11.3.
2018-08-17 02:14:25 -04:00
2018-07-19 10:49:32 -04:00
Interactive web terminals give the user access to a terminal in GitLab for
2018-12-31 12:44:15 -05:00
running one-off commands for their CI pipeline. Since this is giving the user
shell access to the environment where [GitLab Runner ](https://docs.gitlab.com/runner/ )
is deployed, some [security precautions ](../../administration/integration/terminal.md#security ) were
taken to protect the users.
2018-07-19 10:49:32 -04:00
NOTE: **Note:**
2018-12-13 16:48:03 -05:00
GitLab.com does not support interactive web terminal at the moment – neither
using shared GitLab.com runners nor your own runners. Please follow
[this issue ](https://gitlab.com/gitlab-org/gitlab-ce/issues/52611 ) for
2018-11-21 05:53:37 -05:00
progress.
2018-07-19 10:49:32 -04:00
## Configuration
Two things need to be configured for the interactive web terminal to work:
- The Runner needs to have [`[session_server]` configured
2018-12-11 15:07:22 -05:00
properly](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-session_server-section)
2018-09-28 07:33:45 -04:00
- If you are using a reverse proxy with your GitLab instance, web terminals need to be
2018-07-19 10:49:32 -04:00
[enabled ](../../administration/integration/terminal.md#enabling-and-disabling-terminal-support )
## Debugging a running job
NOTE: **Note:** Not all executors are
[supported ](https://docs.gitlab.com/runner/executors/#compatibility-chart ).
2018-09-24 08:45:39 -04:00
NOTE: **Note:** The `docker` executor does not keep running
after the build script is finished. At that point, the terminal will automatically
disconnect and will not wait for the user to finish. Please follow [this
issue](https://gitlab.com/gitlab-org/gitlab-runner/issues/3605) for updates on
improving this behavior.
2018-07-19 10:49:32 -04:00
Sometimes, when a job is running, things don't go as you would expect, and it
would be helpful if one can have a shell to aid debugging. When a job is
2018-08-16 08:10:25 -04:00
running, on the right panel you can see a button `debug` that will open the terminal
2018-07-19 10:49:32 -04:00
for the current job.
![Example of job running with terminal
available](img/interactive_web_terminal_running_job.png)
2018-08-16 08:10:25 -04:00
When clicked, a new tab will open to the terminal page where you can access
the terminal and type commands like a normal shell.
2018-07-19 10:49:32 -04:00
![terminal of the job ](img/interactive_web_terminal_page.png )
If you have the terminal open and the job has finished with its tasks, the
terminal will block the job from finishing for the duration configured in
2018-12-11 15:07:22 -05:00
[`[session_server].terminal_max_retention_time`](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-session_server-section) until you
2018-07-19 10:49:32 -04:00
close the terminal window.
![finished job with terminal open ](img/finished_job_with_terminal_open.png )