container-port-tunnel

Expose devcontainer servers to a laptop via SSH tunnels with pinned ports and tokens.

1|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/tony-zhelonkin/scio --skill container-port-tunnel-tony-zhelonkin
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: container-port-tunnel
Source: https://github.com/tony-zhelonkin/scio/tree/main/skills/container-port-tunnel
Command: npx skills add https://github.com/tony-zhelonkin/scio --skill container-port-tunnel-tony-zhelonkin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Browser tools like marimo, httpgd, and dashboards run inside a devcontainer that publishes no ports, so their URLs are unreachable from your laptop and break on every container rebuild or server restart. ## Core Features & Use Cases - Stable port assignment: Assign each long-lived notebook its own fixed port and record the mapping in the project's AGENTS.md so bookmarks and tunnel commands survive across sessions. - Pinned authentication tokens: Store per-port marimo tokens in files under ~/.config/ so the same URL keeps working after restarts, with tokens kept outside any repository. - Verified SSH tunnel handoff: Serve with marimo on the container IP, verify the URL returns HTTP 200 with curl, then hand the user an ssh -L command and a token-authenticated localhost URL. - Use Case: A teammate starts a marimo notebook on port 2719 inside the shared devcontainer; you pin the token, verify the endpoint, and give them two lines — an SSH tunnel command and a URL — that keep working after the next rebuild. ## Quick Start Start my marimo notebook in the devcontainer on a fixed port and give me a URL I can open from my laptop that will still work after a restart.

Frequently Asked Questions about container-port-tunnel

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I access a marimo server running inside a devcontainer?▼

Create an SSH tunnel targeting the container IP with ssh -L PORT:CONTAINER_IP:PORT user@lab-host, then open http://localhost:PORT with the access token. Get the container IP with hostname -I since it changes on every rebuild.

Why does my marimo URL stop working after a restart?▼

Marimo generates a random token on each launch, invalidating bookmarked URLs. Pin the token to a file under ~/.config/marimo-tokens/ and pass it with --token-password-file so the same URL works across restarts.

How do I check which ports are listening without ss or netstat?▼

Probe ports directly with a Python socket one-liner that calls connect_ex against 127.0.0.1 for each candidate port. The devcontainer image omits ss, netstat, and lsof, so direct socket probing is the available method.

Should I disable the marimo token for easier access?▼

No. These are edit servers, so an unauthenticated port is code execution for anyone who can reach the docker bridge. Keep tokens on and pin them to files outside any repository so they are never committed.

How do I edit a running marimo notebook without losing browser state?▼

Edit cells inside the running kernel using the marimo-pair skill, which preserves lassos, widget values, and scroll position. Reserve direct .py edits plus restart for large refactors, and kill the server first since a running kernel can overwrite disk edits on autosave.