Configuracion

Configure InstaTunnel with config files and environment variables for persistent settings.

📁 Configuration Files

Global Configuration

Create a global config file at ~/.instatunnel.yaml:

# ~/.instatunnel.yaml
api_key: "your_api_key_here"
server_url: "https://api.instatunnel.my"

💡 Tip: Config file is automatically loaded if present in your home directory.

Custom Config File

Use a custom config file location with the --config flag:

# Use custom config file
$ instatunnel --config /path/to/config.yaml 3000
Using config file: /path/to/config.yaml
✅ Tunnel created: https://abc123.instatunnel.my

🌍 Environment Variables

Available Environment Variables

InstaTunnel automatically reads environment variables that match config keys:

# Set your API key
$ export API_KEY="your_api_key_here"
# Set custom server URL
$ export SERVER_URL="https://api.instatunnel.my"
# Now these are used automatically
$ instatunnel 3000

🔒 Security: Never commit API keys to version control. Use environment variables for sensitive data.

⚙️ Configuration Priority

InstaTunnel follows this configuration priority (highest priority first):

  1. Command-line flags - --api-key your_key
  2. Environment variables - API_KEY=your_key
  3. Config file - ~/.instatunnel.yaml
  4. Built-in defaults - Fallback values
# Example: Command-line flag overrides everything
$ instatunnel --api-key override_key 3000
✅ Using API key from command line

🛠 Available Configuration Options

Current Options

OptionFlagEnv VariableDescription
api_key--api-keyAPI_KEYYour InstaTunnel API key
server_url--serverSERVER_URLInstaTunnel server URL

🎯 Best Practice: Store your API key in the config file (~/.instatunnel.yaml) or environment variable for convenience. Use command-line flags for temporary overrides.

Necesitas una ruta rapida?

Mira planes y luego sigue una guia cuando quieras.

For MCP endpoints on Pro/Business, use instatunnel 8787 --mcp.

Documentacion | InstaTunnel