mirror of
https://github.com/ChrispyBacon-dev/DockFlare.git
synced 2026-04-30 12:49:33 +00:00
59 lines
2.8 KiB
Markdown
59 lines
2.8 KiB
Markdown
# Debugging & Logs
|
|
|
|
When troubleshooting issues with DockFlare, your primary tools are the logs generated by the DockFlare container and its managed `cloudflared` agent.
|
|
|
|
## 1. Checking the DockFlare Container Logs
|
|
|
|
The most important source of information is the log output from the DockFlare container itself. These logs provide a detailed, real-time view of what DockFlare is doing.
|
|
|
|
### What You'll Find in the Logs:
|
|
* Detection of Docker container start/stop events.
|
|
* Processing of `dockflare.*` labels.
|
|
* Calls being made to the Cloudflare API.
|
|
* Success messages or detailed error responses from the Cloudflare API.
|
|
* The status of background tasks like resource cleanup.
|
|
|
|
### How to View the Logs:
|
|
To view the logs, use the following Docker command in your terminal:
|
|
```bash
|
|
# View the full log history
|
|
docker logs dockflare
|
|
|
|
# Follow the logs in real-time
|
|
docker logs -f dockflare
|
|
```
|
|
|
|
## 2. Using the Web UI Real-time Logs
|
|
|
|
For convenience, the DockFlare dashboard includes a **real-time log viewer** at the bottom of the main page.
|
|
|
|
This viewer streams the exact same logs that you would see with `docker logs -f dockflare`, but provides an easy way to see what's happening right now without leaving your browser. This is particularly useful for watching the actions DockFlare takes immediately after you start or stop a container.
|
|
|
|
## 3. Checking the `cloudflared` Agent Logs
|
|
|
|
If you suspect the issue is with the connection between your server and the Cloudflare network, you can check the logs of the `cloudflared` agent container directly.
|
|
|
|
### How to View Agent Logs:
|
|
First, you need to find the name of the agent container. By default, it is named `cloudflared-agent-<tunnel-name>`, where `<tunnel-name>` is the name of the tunnel configured in your DockFlare settings.
|
|
|
|
You can find the exact name with `docker ps`.
|
|
|
|
Once you have the name, run:
|
|
```bash
|
|
# Replace with the actual container name
|
|
docker logs cloudflared-agent-dockflare-tunnel
|
|
```
|
|
|
|
These logs are useful for diagnosing:
|
|
* Connection errors to the Cloudflare edge.
|
|
* Authentication issues with your tunnel token.
|
|
* Protocol-level errors for the traffic being proxied.
|
|
|
|
**Note:** This only applies if you are using the default **Internal Mode**. If you are using [External Mode](External-cloudflared-Mode.md), you will need to check the logs of your own `cloudflared` agent process.
|
|
|
|
## 4. Checking the Cloudflare Dashboard
|
|
|
|
Finally, don't forget to use the Cloudflare dashboard as a debugging tool.
|
|
* **DNS Page:** Check if the CNAME records were created as you expected.
|
|
* **Zero Trust Dashboard:** Go to **Access -> Tunnels** to check the status of your tunnel and its ingress rules.
|
|
* **Zero Trust Dashboard:** Go to **Access -> Applications** to check the configuration and health of your Zero Trust policies. The "Last Seen" status on policies can be very informative.
|