Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Getting Started

This guide will help you set up Tuna and create your first tunnel in under 5 minutes.

Prerequisites

  • Node.js 18 or higher
  • A Cloudflare account with a domain
  • macOS (Linux/Windows support coming soon)

Installation

npm
npm install -g tuna

Setup

1. Create a Cloudflare API Token

Visit Cloudflare API Tokens and create a token with these permissions:

ScopePermission
Account → Cloudflare TunnelEdit
Account → Access: Apps and PoliciesEdit
Zone → DNSEdit
Account → Account SettingsRead

2. Login to Tuna

tuna --login

Enter your API token and domain when prompted. Credentials are stored securely in your macOS Keychain.

3. Configure Your Project

Run the interactive setup:

tuna --init

Or manually add to your package.json:

{
  "tuna": {
    "forward": "my-app.example.com",
    "port": 3000
  }
}

4. Run Your Dev Server

tuna npm run dev

Your local server is now available at https://my-app.example.com!

Next Steps

  • Team Collaboration - Set up unique URLs per developer
  • Access Control - Restrict who can access your tunnel
  • Configuration Reference - All configuration options