Add tunnel feature documentation

linuztx committed May 15, 2025 at 07:43 UTC 4ec7b8024c96dd39a3dd26e697afdf6aea8c32fa
1 file changed +56
docs/tunnel.md new
+56
@@ -0,0 +1,56 @@
1 +# Agent Zero Tunnel Feature
2 +
3 +The tunnel feature in Agent Zero allows you to expose your local Agent Zero instance to the internet using Flaredantic tunnels. This makes it possible to share your Agent Zero instance with others without requiring them to install and run Agent Zero themselves.
4 +
5 +## How It Works
6 +
7 +Agent Zero uses the [Flaredantic](https://pypi.org/project/flaredantic/) library to create secure tunnels to expose your local instance to the internet. These tunnels:
8 +
9 +- Are secure (HTTPS)
10 +- Don't require any configuration
11 +- Generate unique URLs for each session
12 +- Can be regenerated on demand
13 +
14 +## Using the Tunnel Feature
15 +
16 +1. Open the settings and navigate to the "External Services" tab
17 +2. Click on "Flare Tunnel" in the navigation menu
18 +3. Click the "Create Tunnel" button to generate a new tunnel
19 +4. Once created, the tunnel URL will be displayed and can be copied to share with others
20 +5. The tunnel URL will remain active until you stop the tunnel or close the Agent Zero application
21 +
22 +## Security Considerations
23 +
24 +When sharing your Agent Zero instance via a tunnel:
25 +
26 +- Anyone with the URL can access your Agent Zero instance
27 +- No additional authentication is added beyond what your Agent Zero instance already has
28 +- Consider setting up authentication if you're sharing sensitive information
29 +- The tunnel exposes your local Agent Zero instance, not your entire system
30 +
31 +## Troubleshooting
32 +
33 +If you encounter issues with the tunnel feature:
34 +
35 +1. Check your internet connection
36 +2. Try refreshing the tunnel URL
37 +3. Restart Agent Zero
38 +4. Check the console logs for any error messages
39 +
40 +## Adding Authentication
41 +
42 +To add basic authentication to your Agent Zero instance when using tunnels, you can set the following environment variables:
43 +
44 +```
45 +AUTH_LOGIN=your_username
46 +AUTH_PASSWORD=your_password
47 +```
48 +
49 +Alternatively, you can configure the username and password directly in the settings:
50 +
51 +1. Open the settings modal in the Agent Zero UI.
52 +2. Navigate to the "Authentication" section.
53 +3. Enter your desired username and password.
54 +4. Save the settings.
55 +
56 +This will require users to enter these credentials when accessing your tunneled Agent Zero instance.
\ No newline at end of file