Back to Blog

coding-agents

Relay Server Config: A Skill for Tunneling Agents

Learn how the relay-server-config skill helps coding agents configure, deploy, and debug portal-tunnel relays with full env-var and flag references.

OpenAgentSkillPublished:

Where this fits

You’ve just spun up a portal-tunnel relay for a client, but the SNI port won’t bind, the embedded frontend isn’t serving, and the logs point to a missing policy.json. You need to know every environment variable, flag fallback, and how the binary embeds config—without digging through main.go line by line. The relay-server-config skill gives your agent the complete reference so it can diagnose and fix these issues in seconds.

Why agents benefit

  • Instant env-var/flag mapping: The skill lists every configuration option with its default, so agents can translate a user’s docker-compose.yml or CLI flags into the exact runtime behavior.
  • Config embedding awareness: It explains how the SPA and policy files are embedded or loaded from disk, letting agents reason about why a custom frontend dir might be ignored.
  • Docker/Compose deployment insight: Agents can generate correct docker-compose snippets or debug port conflicts by knowing which ports are privileged and how to override them locally.
  • Error diagnosis: When a relay fails to start, the agent can cross-reference the error message against the env-var table to pinpoint misconfigurations (e.g., SNI_PORT on unprivileged port).
  • No source spelunking: The skill condenses cmd/relay-server/main.go and utils/cmd.go into a structured reference, saving tokens and time.

Practical scenarios

Debugging a relay that won't start on a non-root user

The user reports SNI_PORT=443 fails with permission denied. The agent recalls the skill’s note that SNI_PORT cannot bind unprivileged, suggests overriding to 8443, and updates the compose file accordingly.

Customizing the frontend directory

A developer wants to serve a custom SPA. The agent sees PORTAL_FRONTEND_DIR defaults to empty (embedded), and explains that setting this env var will load from disk instead—then verifies the path exists in the deployment.

Migrating from CLI flags to environment variables

In a CI pipeline, the user needs to switch from --api-port to API_PORT. The agent uses the skill’s table to confirm the env fallback and rewrites the command without changing behavior.

Add it to your agent workflow

Install the skill directly from the command line:

npx skills add gosuda/portal-tunnel --skill relay-server-config

Then, when your agent encounters a relay configuration task, it can reference the skill’s documentation. For example, ask: "Check my relay-server env vars against the defaults and explain what PORTAL_FRONTEND_DIR does." The agent will pull up the exact table and provide a precise answer.

For a broader view of how this skill fits into your agent’s toolkit, see the OpenAgentSkill listing.

Compare before adopting

Evaluate the skill’s freshness—check the repository’s last commit and whether it tracks the latest portal-tunnel release. Look at the star count (263) and community issues to gauge reliability. Also consider alternatives: you could manually maintain a config cheat sheet, but that drifts. The skill’s value depends on how closely it mirrors the current source, so verify the README’s accuracy against the main.go you’re using.

Why it is worth tracking

With 263 stars and an active author (gosuda), this skill is a solid, community-maintained reference for a niche but critical component. It’s worth tracking because relay configuration is notoriously fiddly—privileged ports, embedded assets, and env-var precedence trip up even experienced developers. As the project evolves, the skill will likely update in lockstep, making it a reliable resource for agents. Evaluate it when you first deploy a relay or when debugging a stubborn tunnel issue.

Featured Skill

relay-server-config

Skill by gosuda