Skip to content

Expose private apps using Tailscale Services - #5

Open
macecchi wants to merge 1 commit into
dvassallo:mainfrom
macecchi:main
Open

Expose private apps using Tailscale Services#5
macecchi wants to merge 1 commit into
dvassallo:mainfrom
macecchi:main

Conversation

@macecchi

@macecchi macecchi commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Disclaimer: feel free to reject if you don't think this needs to be in this project - it might be specific to my needs, but could be a cool addition since we already use Tailscale on the server setup :)

Allows apps to be added with --tunnel private to be served only to your tailnet, with no public DNS or Cloudflare in the path.

Each private app becomes a Tailscale Service (svc:<name>, tagged tag:singleserver). The service is created through the Tailscale API using a stored OAuth client, and tailscale serve --service terminates HTTPS on the node and hands requests to Kamal.

Changes:

  • tunnel: public|private modeled as app config, fixed at add time; private apps default to https://<name>.<tailnet>.ts.net or take one --domain
  • connect tailscale accepts --oauth-client-id/--oauth-client-secret (validated against the API before storing); interactive add/connect walk through the one-time tailnet setup
  • list, status, and doctor are tunnel-aware: private apps show their qualified domain and deployed commit, and skip Cloudflare checks
  • Safety: service creation refuses to adopt a same-name service not created by Single Server, rolls back on failed provisioning, and surfaces tailscale serve shutdown failures instead of leaving a service serving
  • Docs updated (home page + docs site)

Testing: I've been using this on my own server, finally got the time to tidy it up for the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant