Configuration Overview
The CLI can be configured at multiple levels:- Command-line options - Override settings per command
- Environment variables - Set persistent defaults
- Configuration files - Store preferences and credentials
- System integration - Shell aliases and path configuration
CLI Data Directory
The CLI stores its configuration, logs, and cache in a data directory.Default Locations
- Linux
- macOS
- Windows
Custom Data Directory
Override the default location:Data Directory Structure
Environment Variables
The CLI respects several environment variables for configuration.Core Configuration
string
Override the CLI data directory location.
string
Disable interactive prompts (useful for scripts).
string
Disable colored terminal output.
Authentication
string
Provide an access token for tunnel authentication.
string
Provide a refresh token for tunnel authentication.
Tunnel Configuration
string
Require a specific token for command shell connections.
string
Custom user agent string for tunnel service requests.
Logging Configuration
Log Levels
Control the verbosity of CLI output:Log to File
Persist logs to a file for later analysis:Ensure the user has write permissions to the log file location.
Viewing Logs
- Real-time
- Service logs
- System logs
Editor Configuration
Multiple VS Code Instances
Run separate VS Code instances with different configurations:Create Profile Aliases
Create Profile Aliases
Add to your shell profile (Usage:
~/.bashrc, ~/.zshrc, etc.):Version Management
Configure which version of VS Code to use:Show Current Version
Tunnel Configuration
Persistent Tunnel Settings
Configure tunnels to start with specific settings:Tunnel Service Configuration
When installing as a service, the configuration is saved:Authentication Configuration
Authentication tokens are stored securely in your system’s credential manager:- Linux
- macOS
- Windows
- Secret Service (GNOME Keyring, KDE Wallet)
- keyutils (kernel keyring)
Server Configuration
Server Data Directory
Customize where tunnel server data is stored:- Server installations
- Extension storage
- Server logs
- User data
- Workspace storage
Extensions Directory
Use a custom location for server extensions:- Shared extension storage
- Network-mounted extensions
- Separate extension sets per project
Pre-installed Extensions
Automatically install extensions when starting a tunnel:Connection Settings
number
default:"10800"
Time in seconds to wait for client reconnection before shutting down the server.
Web Server Configuration
Configure the local web server (serve-web command).
Network Settings
Security Configuration
Server Paths
Shell Integration
Command Aliases
Create shortcuts for common operations:Git Integration
Configure VS Code as your Git editor:Shell Functions
Create more complex CLI operations:Advanced Configuration
Automation Scripts
Create scripts for complex workflows:Daily Development Script
Daily Development Script
CI/CD Pipeline Integration
CI/CD Pipeline Integration
Multi-Machine Sync Script
Multi-Machine Sync Script
Docker Integration
Run VS Code tunnel in a Docker container:Troubleshooting Configuration
Finding Configuration Files
Finding Configuration Files
Resetting Configuration
Resetting Configuration
Debugging Configuration Issues
Debugging Configuration Issues
Best Practices
Security
- Never commit access tokens to version control
- Use environment variables for sensitive data
- Rotate credentials regularly
- Use connection tokens for web servers
- Keep CLI updated for security patches
Organization
- Use separate data directories for different projects
- Create shell aliases for common operations
- Document your configuration in version control
- Keep extension lists backed up
- Use descriptive tunnel names
Performance
- Use appropriate log levels
- Set reasonable reconnection times
- Pre-install frequently used extensions
- Prune unused tunnel servers regularly
- Monitor resource usage
Maintenance
- Regularly update the CLI
- Clean up old log files
- Review and update configurations
- Test backup/restore procedures
- Document custom scripts
Configuration Examples
Complete Tunnel Setup
Development Environment
Next Steps
Commands Reference
Explore all CLI commands
Remote Tunnels
Set up remote access
Installation
Install the CLI
Overview
Back to CLI overview