Skip to content

Commit

Permalink
docs: fixes grammar and spelling errors (#3413)
Browse files Browse the repository at this point in the history
  • Loading branch information
amir20 authored Nov 20, 2024
1 parent 9d244cf commit 4c1f5b4
Show file tree
Hide file tree
Showing 17 changed files with 99 additions and 113 deletions.
9 changes: 4 additions & 5 deletions docs/guide/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ title: Container Actions

# Using Container Actions

Dozzle now supports **Container Actions**, which allows you to `start`, `stop` and `restart` container from within the UI in the dropdown menu.
Dozzle now supports **Container Actions**, which allows you to `start`, `stop` and `restart` containers from within the UI in the dropdown menu.

<img title="Container Actions" alt="Container Acions Menu UI" width="250" src="/.vitepress/theme/media/dozzle-ui-actions.png">

This feature is **disabled** by default, which can be enabled by setting environment variable`DOZZLE_ENABLE_ACTIONS` to `true`
This feature is **disabled** by default and can be enabled by setting the environment variable `DOZZLE_ENABLE_ACTIONS` to `true`.

::: code-group

Expand All @@ -24,7 +22,8 @@ services:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 8080:8080
environment: DOZZLE_ENABLE_ACTIONS=true
environment:
DOZZLE_ENABLE_ACTIONS: true
```
:::
36 changes: 18 additions & 18 deletions docs/guide/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Dozzle can run in agent mode which can expose Docker hosts to other Dozzle insta
> [!NOTE] Using Docker Swarm?
> If you are using Docker Swarm Mode, you don't need to use agents. Dozzle will automatically discover itself and create a cluster using swarm mode. See [Swarm Mode](/guide/swarm-mode) for more information.
## How to create an agent?
## How to Create an Agent

To create a Dozzle agent, you need to run Dozzle with the `agent` subcommand. Here is an example:

Expand Down Expand Up @@ -37,7 +37,7 @@ The agent will start and listen on port `7007`. You can connect to the agent usi
> [!TIP]
> You don't need to expose port 7007 if using Docker network. The agent will be available to other containers on the same network.

## How to connect to an agent?
## How to Connect to an Agent

To connect to an agent, you need to provide the agent's IP address and port. Here is an example:

Expand Down Expand Up @@ -65,9 +65,9 @@ Note that when connecting remotely, you don't need to mount local Docker socket.
> You can connect to multiple agents by providing multiple `DOZZLE_REMOTE_AGENT` environment variables. For example, `DOZZLE_REMOTE_AGENT=agent1:7007,agent2:7007`.

> [!WARNING]
> Dozzle uses the Docker API to gather information about hosts. Each aget needs a unique host ID. They use Docker's system ID or node ID to identify the host. If you are using swarm, then the node ID is used. If you don't see all hosts, then you may have duplicate hosts configured that have the same host ID. To fix this, remove `/var/lib/docker/engine-id` file. See [FAQ](/guide/faq#i-am-seeing-duplicate-hosts-error-in-the-logs-how-do-i-fix-it) for more information.
> Dozzle uses the Docker API to gather information about hosts. Each agent needs a unique host ID. They use Docker's system ID or node ID to identify the host. If you are using swarm, then the node ID is used. If you don't see all hosts, then you may have duplicate hosts configured that have the same host ID. To fix this, remove `/var/lib/docker/engine-id` file. See [FAQ](/guide/faq#i-am-seeing-duplicate-hosts-error-in-the-logs-how-do-i-fix-it) for more information.

## Setting up healthcheck
## Setting Up Healthcheck

You can set a healthcheck for the agent, similar to the healthcheck for the main Dozzle instance. When running in agent mode, healthcheck checks agent connection to Docker. If Docker is not reachable, the agent will be marked as unhealthy and will not be shown in the UI.

Expand All @@ -90,7 +90,7 @@ services:
- 7007:7007
```

## Changing agent's name
## Changing Agent's Name

Similar to Dozzle instance, you can change the agent's name by providing the `DOZZLE_HOSTNAME` environment variable. Here is an example:

Expand All @@ -115,11 +115,11 @@ services:

:::

This will change the agent's name to `my-special-name` and reflected on the UI when connecting to the agent.
This will change the agent's name to `my-special-name` and will be reflected on the UI when connecting to the agent.

## Custom certificates
## Custom Certificates

By default, Dozzle uses self-signed certificates for communication between agents. This is a private certificate which is only valid to other Dozzle instances. This is secure and recommended for most use cases. However, if Dozzle is exposed extenrally and an attacker knows exactly which port the agent is running on, then they can setup their own Dozzle instance and connect to the agent. To prevent this, you can provide your own certificates.
By default, Dozzle uses self-signed certificates for communication between agents. This is a private certificate which is only valid to other Dozzle instances. This is secure and recommended for most use cases. However, if Dozzle is exposed externally and an attacker knows exactly which port the agent is running on, then they can set up their own Dozzle instance and connect to the agent. To prevent this, you can provide your own certificates.

To provide custom certificates, you need to mount or use secrets to provide the certificates. Here is an example:

Expand All @@ -145,7 +145,7 @@ secrets:
```

> [!TIP]
> Docker secrets are preferred for providing certificates. The can be created using `docker secret create` command or as the example above using `docker-compose.yml`. The same certificates should be provided to the Dozzle instance connecting to the agent.
> Docker secrets are preferred for providing certificates. They can be created using `docker secret create` command or as the example above using `docker-compose.yml`. The same certificates should be provided to the Dozzle instance connecting to the agent.

This will mount the `cert.pem` and `key.pem` files to the agent. The agent will use these certificates for communication. The same certificates should be provided to the Dozzle instance connecting to the agent.

Expand All @@ -157,17 +157,17 @@ $ openssl req -new -key key.pem -out request.csr -subj "/C=US/ST=California/L=Sa
$ openssl x509 -req -in request.csr -signkey key.pem -out cert.pem -days 365
```

## Comparing agents with remote connection
## Comparing Agents with Remote Connection

Agents are similar to remote connections, but they have some advantages. Generally, agents are preferred over remote connections due to performance and security reasons. Here is a comparison:

| Feature | Agent | Remote Connection |
| ----------- | -------------------------- | ------------------------------- |
| Performance | Better with disturbed load | Worse on the UI |
| Security | Private SSL | Insecure or Docker TLS |
| Ease of use | Easy out of the box | Requires exposing Docker socket |
| Permissions | Full access to Docker | Can be controlled with a proxy |
| Reconnect | Automatically reconnects | Requires UI restart |
| Healthcheck | Built-in healthcheck | No healthcheck |
| Feature | Agent | Remote Connection |
| ----------- | ---------------------------- | ------------------------------- |
| Performance | Better with distributed load | Worse on the UI |
| Security | Private SSL | Insecure or Docker TLS |
| Ease of use | Easy out of the box | Requires exposing Docker socket |
| Permissions | Full access to Docker | Can be controlled with a proxy |
| Reconnect | Automatically reconnects | Requires UI restart |
| Healthcheck | Built-in healthcheck | No healthcheck |

If you do plan to use remote connections, make sure to secure the connection using Docker TLS or a reverse proxy.
10 changes: 5 additions & 5 deletions docs/guide/analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ title: Anonymous Analytics

# Data Collection of Analytics

Dozzle collects anonymous user configurations using a simple beacon written in Go. _Why?_ Dozzle is an open source project with no funding. As a result, there is no time to do user studies of Dozzle. Analytics is collected to prioritize features and fixes based on how people use Dozzle.
Dozzle collects anonymous user configurations using a simple beacon written in Go. _Why?_ Dozzle is an open source project with no funding. As a result, there is no time to do user studies of Dozzle. Analytics are collected to prioritize features and fixes based on how people use Dozzle.

## Where is data stored
## Where is Data Stored

Dozzle's sends anonymous data to DigitalOcean which is written to a flat file for processing.
Dozzle sends anonymous data to DigitalOcean, where it is written to a flat file for processing.

## Opting out
## Opting Out

Dozzle analytics helps to prioritize features and spend time on most important features. If you do not want to be tracked at all, use `--no-analytics` flag or `DOZZLE_NO_ANALYTICS` env variable.
Dozzle analytics helps to prioritize features and spend time on the most important improvements. If you do not want to be tracked, use the `--no-analytics` flag or `DOZZLE_NO_ANALYTICS` environment variable.
24 changes: 10 additions & 14 deletions docs/guide/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ title: Authentication

# Setting Up Authentication

Dozzle support two configurations for authentication. In the first configuration, you bring your own authentication method by protecting Dozzle through a proxy. Dozzle can read appropriate headers out of the box.
Dozzle supports two configurations for authentication. In the first configuration, you bring your own authentication method by protecting Dozzle through a proxy. Dozzle can read appropriate headers out of the box.

If you do not have an authentication solution then Dozzle has a simple file based user management solution. Authentication providers are setup using `--auth-provider` flag. In both of these configurations, Dozzle will try to save user settings to disk. This data is written to `/data`.
If you do not have an authentication solution, then Dozzle has a simple file-based user management solution. Authentication providers are set up using the `--auth-provider` flag. In both configurations, Dozzle will try to save user settings to disk. This data is written to `/data`.

## File Based User Management
## File-Based User Management

Dozzle supports multi-user authentication by setting `--auth-provider` to `simple`. In this mode, Dozzle will try to read `/data/users.yml`.

Expand Down Expand Up @@ -88,11 +88,11 @@ services:

:::

Note that only the duration is supported. You can only use `s`, `m`, `h` for seconds, minutes and hours respectively.
Note that only duration is supported. You can only use `s`, `m`, `h` for seconds, minutes and hours respectively.

## Generating users.yml

Dozzle has a builtin `generate` command to generate `users.yml`. Here is an example:
Dozzle has a built-in `generate` command to generate `users.yml`. Here is an example:

```sh
docker run amir20/dozzle generate admin --password password --email [email protected] --name "John Doe" > users.yml
Expand Down Expand Up @@ -126,7 +126,7 @@ services:

In this mode, Dozzle expects the following headers:

- `Remote-User` to map to the username eg. `johndoe`
- `Remote-User` to map to the username e.g. `johndoe`
- `Remote-Email` to map to the user's email address. This email is also used to find the right [Gravatar](https://gravatar.com/) for the user.
- `Remote-Name` to be a display name like `John Doe`

Expand Down Expand Up @@ -194,6 +194,7 @@ services:
- "--entrypoints.https.address=:443"
- "--log=true"
- "--log.level=DEBUG"

dozzle:
image: amir20/dozzle:latest
networks:
Expand All @@ -216,7 +217,7 @@ services:
```yaml [configuration.yml]
###############################################################
# Authelia configuration #
# Authelia configuration #
###############################################################

jwt_secret: a_very_important_secret
Expand Down Expand Up @@ -269,9 +270,7 @@ Valid SSL keys are required because Authelia only supports SSL.
### Setting up Dozzle with Cloudflare Zero Trust
Cloudflare Zero Trust is a service for authenticated access to selfhosted
software. This section defines how Dozzle can be setup to use Cloudflare Zero
Trust for authentication.
Cloudflare Zero Trust is a service for authenticated access to self-hosted software. This section defines how Dozzle can be set up to use Cloudflare Zero Trust for authentication.
```yaml [docker-compose.yml]
services:
Expand All @@ -291,7 +290,4 @@ services:
restart: unless-stopped
```
After running the Dozzle container, configure the Application in Cloudflare Zero
Trust dashboard by following the
[guide](https://developers.cloudflare.com/cloudflare-one/applications/configure-apps/self-hosted-apps/)
here.
After running the Dozzle container, configure the Application in Cloudflare Zero Trust dashboard by following the [guide](https://developers.cloudflare.com/cloudflare-one/applications/configure-apps/self-hosted-apps/).
4 changes: 2 additions & 2 deletions docs/guide/changing-base.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ services:
Dozzle will be available at `http://localhost:8080/foobar/`. This option rewrites all assets to `/foobar/{file.path}` and automatically redirects `/foobar` to `/foobar/`.

## Example with proxy
## Example with Proxy

Here is an example with Nginx and proxy Dozzle with a different base:
Here is an example with Nginx to proxy Dozzle with a different base:

```nginx
location ^~ /foobar/ {
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
title: Debugging
---

# Debugging with logs
# Debugging with Logs

By default, Dozzle does not output a lot of logs. However this can be changed with `--level` flag. The default value is `info` which only prints limited logs. You can use `debug` or `trace` which will show details about memory, configuration and other stats. `DOZZLE_LEVEL` can be used in compose configurations. Below is an example of using `docker-compose.yml` file to enable `debug` level.
By default, Dozzle does not output a lot of logs. However, this can be changed with the `--level` flag. The default value is `info` which only prints limited logs. You can use `debug` or `trace` which will show details about memory, configuration and other stats. `DOZZLE_LEVEL` can be used in compose configurations. Below is an example of using `docker-compose.yml` file to enable `debug` level.

```yaml
services:
Expand Down
24 changes: 12 additions & 12 deletions docs/guide/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ server {

### Disabling compression in traefik

Traefik reverse proxy can be configures via middlewares to support compression. If implemented, the usual configuration looks like this:
Traefik reverse proxy can be configured via middlewares to support compression. If implemented, the usual configuration looks like this:

```
http:
Expand All @@ -40,8 +40,8 @@ http:
compress: {}
```

With this setup, you may find that certain containers do not show logs in dozzle anymore if you open dozzle via traefik (e.g. dozzle.mydomain.com).
You will also note that the same dozzle instance does show the logs when accessed directly (e.g. localhost:8080).
With this setup, you may find that certain containers do not show logs in dozzle anymore if you open dozzle via traefik (e.g., dozzle.mydomain.com).
You will also note that the same dozzle instance does show the logs when accessed directly (e.g., localhost:8080).

Containers where this has been observed (non-exhaustive list) are: dozzle, homepage, glances, filebrowser.

Expand All @@ -56,7 +56,7 @@ http:
- text/event-stream
```

## We have tools that uses Dozzle when a new container is created. How can I get a direct link to a container by name?
## We have tools that use Dozzle when a new container is created. How can I get a direct link to a container by name?

Dozzle has a special [route](https://github.com/amir20/dozzle/blob/master/assets/pages/show.vue) that can be used to search containers by name and then forward to that container. For example, if you have a container with name `"foo.bar"` and id `abc123`, you can send your users to `/show?name=foo.bar` which will be forwarded to `/container/abc123`.

Expand All @@ -73,36 +73,36 @@ WARNING: No memory limit support
WARNING: No swap limit support
```

In this case, you'll need to add the following line to your `/boot/cmdline.txt` file and reboot your device.
In this case, you'll need to add the following line to your `/boot/cmdline.txt` file and reboot your device:

```
cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1
```

## I am seeing duplicate hosts error in the logs. How do I fix it?

If you are seeing the following error in the logs, then you may have duplicate hosts in configred that with the same host ID.
If you are seeing the following error in the logs, then you may have duplicate hosts configured with the same host ID:

```
time="2024-07-10T13:35:53Z" level=warning msg="duplicate host ID: *********, Endpoint: 1.1.1.1:7007 found, skipping"
```

Dozzle uses the Docker API to gather information about the hosts. Each host must have a unique ID. This ID is used to identify the host in the UI. In swarm mode, Dozzle uses the node ID from `docker systen info` to identify the host. If you are not using swarm mode, then Dozzle will use the system ID from `docker system info` as the host ID.
Dozzle uses the Docker API to gather information about the hosts. Each host must have a unique ID. This ID is used to identify the host in the UI. In swarm mode, Dozzle uses the node ID from `docker system info` to identify the host. If you are not using swarm mode, then Dozzle will use the system ID from `docker system info` as the host ID.

Somettimes, VMs maybe restored from back ups, with the same host ID. This can cause Dozzle to think that the host is already present and skip adding it to the list of hosts. To fix this, you need to remove `/var/lib/docker/engine-id` file. This file contains the host ID and is created when the Docker daemon starts.
Sometimes, VMs may be restored from backups with the same host ID. This can cause Dozzle to think that the host is already present and skip adding it to the list of hosts. To fix this, you need to remove `/var/lib/docker/engine-id` file. This file contains the host ID and is created when the Docker daemon starts.

## I am seeing host not found error in the logs. How do I fix it?

This should be mainly a Podman only error: Using Podman doesn't create an engine-id like Docker.
If you are using Docker check if the ```engine-id``` file exists with correct permissions in ```/var/lib/docker``` and has the UUID inside.
If you are using Docker check if the `engine-id` file exists with correct permissions in `/var/lib/docker` and has the UUID inside.

To resolve the error take following steps:

1. Create the folders: ```mkdir -p /var/lib/docker```
1. Create the folders: `mkdir -p /var/lib/docker`
2. Install uuidgen if necessary
3. Using uuidgen generate an UUID: ```uuidgen > engine-id```
3. Using uuidgen generate a UUID: `uuidgen > engine-id`

The engine-id file should now have an UUID inside.
The engine-id file should now have a UUID inside.

An example setup for Ansible can be found in [Podman Infos](podman.md)

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Dozzle supports multiple ways to run the application. You can run it using Docke

## Running with Docker <Badge type="tip" text="Updated" />

The easiest way to setup Dozzle is to use the CLI and mount `docker.sock` file. This file is usually located at `/var/run/docker.sock` and can be mounted with the `--volume` flag. You also need to expose the port to view Dozzle. By default, Dozzle listens on port 8080, but you can change the external port using `-p`. You can also run using compose or as a service in Swarm.
The easiest way to set up Dozzle is to use the CLI and mount `docker.sock` file. This file is usually located at `/var/run/docker.sock` and can be mounted with the `--volume` flag. You also need to expose the port to view Dozzle. By default, Dozzle listens on port 8080, but you can change the external port using `-p`. You can also run using compose or as a service in Swarm.

::: code-group

Expand Down
Loading

0 comments on commit 4c1f5b4

Please sign in to comment.