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 tunaSetup
1. Create a Cloudflare API Token
Visit Cloudflare API Tokens and create a token with these permissions:
| Scope | Permission |
|---|---|
| Account → Cloudflare Tunnel | Edit |
| Account → Access: Apps and Policies | Edit |
| Zone → DNS | Edit |
| Account → Account Settings | Read |
2. Login to Tuna
tuna --loginEnter your API token and domain when prompted. Credentials are stored securely in your macOS Keychain.
3. Configure Your Project
Run the interactive setup:
tuna --initOr manually add to your package.json:
{
"tuna": {
"forward": "my-app.example.com",
"port": 3000
}
}4. Run Your Dev Server
tuna npm run devYour 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