Skip to content

HTTP API for accessing Tailscale devices via OAuth2.

License

Notifications You must be signed in to change notification settings

f-gillmann/tailscale-device-proxy

Repository files navigation

Tailscale Device Proxy

HTTP API for accessing Tailscale devices via OAuth2.

This lets you query your Tailscale devices without using API keys that expire after 90 days.

Built primarily for use with the Glance Tailscale widget.

Setup

Get your OAuth2 client ID and secret from the Tailscale Admin Console (grant devices:core:read scope).

Docker

docker run -d \
  --name tailscale-device-proxy \
  -p 8080:8080 \
  -e OAUTH_CLIENT_ID="xxx" \
  -e OAUTH_CLIENT_SECRET="xxx" \
  -e TZ="Europe/Berlin" \
  --restart unless-stopped \
  ghcr.io/f-gillmann/tailscale-device-proxy:latest

Or use the included docker-compose.yml:

cp .env.example .env
# Edit .env with your credentials
docker-compose up -d

Endpoints

  • GET /health - Health check
  • GET /api/devices - List all devices in your tailnet

Environment Variables

  • OAUTH_CLIENT_ID - Your Tailscale OAuth client ID (required)
  • OAUTH_CLIENT_SECRET - Your Tailscale OAuth client secret (required)
  • LISTEN_ADDR - Server port (default: ':8080')
  • TZ - Timezone for logs (default: UTC)

License

MIT License

About

HTTP API for accessing Tailscale devices via OAuth2.

Topics

Resources

License

Stars

Watchers

Forks

Packages