Skip to content

Publish a Service

Runta can make your agent publicly accessible.

Each runtime can publish up to 16 ports.

Create a runtime and publish runtime port 8080 over HTTPS.

Terminal window
runta run --name demo --cpus 2 --memory 2048 -p '8080/https'

Find the runtime ID:

Terminal window
runta ps -a

Open a shell in the runtime:

Terminal window
runta exec -it demo bash

Inside the runtime, start a simple HTTP server on port 8080:

Terminal window
python3 -m http.server 8080

From your local machine, verify the published service:

Terminal window
curl https://<port>-<runtime_id>.runta.dev

Replace <port> with the published runtime port and <runtime_id> with the UUID shown in the ID column from runta ps -a.