tailserve

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2026 License: MIT Imports: 6 Imported by: 0

README

Tailserve

Small utility to generate a Tailscale serve config from a yaml file supporting TCP ports and http to https forwarding.

This is very small and probably only useful to me, but basically, it turns this tailserve.yml file:

tailnet: example.ts.net
output: serve.json

services:
  git:
    https: http://forgejo-forgejo-1:3000
    ports:
      - 22:forgejo-forgejo-1

Into this serve.json file:

{
  "Services": {
    "svc:git": {
      "TCP": {
        "22": { "TCPForward": "forgejo-forgejo-1:22" },
        "443": { "HTTPS": true }
      },
      "Web": {
        "git.example.ts.net:443": {
          "Handlers": {
            "/": { "Proxy": "http://forgejo-forgejo-1:3000" }
          }
        }
      }
    }
  }
}

Use tailserve --init to generate a boilerplate tailserve.yml.

Install

go install codeberg.org/codecat/tailserve@latest

Advertise

As an additional note, to advertise to your Tailnet that the services are available, you would have to run:

tailscale serve advertise svc:git

Or, if Tailscale is running in a Docker container:

docker exec -it my-container tailscale serve advertise svc:git

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL