---
title: Run Script over Tunnel
url: https://www.tines.com/docs/actions/tools/run-script/run-script-over-tunnel/
updated: 2026-03-18T17:31:56+00:00
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/llms.txt) › [Actions](https://www.tines.com/llm/docs/actions.md) › [Tools](https://www.tines.com/llm/docs/actions/tools.md) › [Run script](https://www.tines.com/llm/docs/actions/tools/run-script.md)*

# Run Script over Tunnel

*[View on tines.com](https://www.tines.com/docs/actions/tools/run-script/run-script-over-tunnel/)*

You can use [Tines Tunnel](https://www.tines.com/docs/tunnel/) to connect your [Run Script](https://www.tines.com/docs/run-script/) actions to the tines-command-runner container running on your self-hosted platform. This way, your Python code runs within your environment, can access resources in your network, and you can install custom packages.

> **TIP:** This is an alternative to [Command-over-HTTP](/docs/self-hosting/additional-applications/command-over-http/) for Python via Tunnel which provides more flexibility and isolation.

To get started, you will need:

- A Tines Tunnel with a running `tines-tunnel` container in your network.
- A running `tines-command-runner` container 
- The `tines-tunnel` container must be able to reach `tines-command-runner`

Once this is set up, you can configure a Run Script action to use:

> **Implementation for Run Script**: `Docker`
> **Use tunnel**: `<your tunnel>`
> **Command Runner URL (optional)**: URL where the tines-command-runner container can be accessed from the perspective of the tunnel container.

![](https://www.datocms-assets.com/55802/1742237225-screenshot-2025-03-17-at-2-46-33-pm.png)

> **TIP:** You won't be able to find the use tunnel option until you've selected Docker as the Implementation for Run Script. This is because tunnels cannot be used with Run script on cloud.

## Example via `docker run`:

```bash
docker network create tines-net

docker run -d --name tines-command-runner -p 4400:4400 --network tines-net   tines/tines-command-runner:latest

docker run -d --name tines-tunnel --env TINES_TUNNEL_SECRET="..." --network tines-net tines/tines-tunnel:latest
```

You can also combine the [tines-tunnel docker-compose file](/docs/admin/tunnel/#deploying-tunnel) with the [tines-command-runner docker compose file](https://www.tines.com/docs/self-hosted/deploying-tines/docker-compose/run-script-setup/#docker-compose-configuration).
