You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prerequisites are written for bare metal installations. Please keep in mind the containerization layer may make some of these items unnecessary.
12
12
:::
13
13
14
+
:::warning
15
+
Since CrowdSec 1.7.0, it is mandatory to persist the `/var/lib/crowdsec/data` directory in a volume.
16
+
17
+
If you use the examples provided in this page, they will be.
18
+
19
+
If you choose to write your own compose file, make sure create a volume for it.
20
+
21
+
:::
22
+
14
23
Before getting started, it is advised to read the [introduction](/unversioned/getting_started/introduction.mdx) page to understand the prerequisites and concepts for running CrowdSec.
`Compose` snippet was taken from our [example-docker-compose repository](https://github.com/crowdsecurity/example-docker-compose) which contains many examples of how CrowdSec container can be used in different setups.
71
+
`Compose` snippet was taken from our [example-docker-compose repository](https://github.com/crowdsecurity/example-docker-compose) which contains many examples of how CrowdSec container can be used in different setups.
63
72
:::
64
73
65
74
#### Compose key aspects
@@ -77,7 +86,7 @@ volumes:
77
86
78
87
##### Persistent Data Directories
79
88
80
-
We recommend persisting the following directories:
89
+
The following directories _must_ be persisted, otherwise the container will refuse to start:
81
90
82
91
```yaml
83
92
volumes:
@@ -91,11 +100,11 @@ If you haven't used named volumes within Docker before you can read their [docum
91
100
92
101
##### Depends On
93
102
94
-
Depends on directive allows Docker to bring up the compose stack in "order", the reason we use it within the snippet the container `reverse-proxy` creates the log files on startup and we want to make sure CrowdSec finds these files to monitor.
103
+
Depends on directive allows Docker to bring up the compose stack in "order", the reason we use it within the snippet the container `reverse-proxy` creates the log files on startup and we want to make sure CrowdSec finds these files to monitor.
95
104
96
105
```yaml
97
106
depends_on:
98
-
- 'reverse-proxy'
107
+
- "reverse-proxy"
99
108
```
100
109
101
110
## Environment Variables
@@ -104,25 +113,24 @@ You can find a full list of available environment variables on our [Docker Hub i
104
113
105
114
Here are the most common environment variables for customizing CrowdSec in Docker:
| `COLLECTIONS` | _(none)_ | Space-separated list of CrowdSec collections to install (e.g., `crowdsecurity/nginx`). |
119
+
| `TZ` | UTC | Timezone for logs (e.g., `Europe/London`). |
120
+
| `CONFIG_FILE` | `/etc/crowdsec/config.yaml` | Path to the main config file. Useful if mounting a single file instead of a full directory. |
121
+
| `LOCAL_API_URL` | `http://0.0.0.0:8080` | Where the Local API listens. Normally doesn't need to be changed unless you're running in agent mode. |
122
+
| `DISABLE_LOCAL_API` | `false` | Set to `true` to disable LAPI and use this instance as an log processor only. |
123
+
| `DISABLE_AGENT` | `false` | Set to `true` to disable the log processor and use this instance as an LAPI only. |
124
+
| `AGENT_USERNAME` | _(none)_ | Required only if `DISABLE_LOCAL_API` is true. Username for connecting to central LAPI. |
125
+
| `AGENT_PASSWORD` | _(none)_ | Password for authenticating the agent. |
126
+
| `BOUNCER_KEY_<name>` | _(none)_ | Seed value as API key for remediation under `<name>` |
118
127
119
128
:::tip
120
129
Use a `.env` file or Docker secrets to avoid hardcoding sensitive variables like passwords or API keys.
121
130
:::
122
131
123
132
---
124
133
125
-
126
134
## Next Steps?
127
135
128
136
Great, you now have CrowdSec installed on your system. Within the [post installation steps](/getting_started/next_steps.mdx) you will find the next steps to configure and optimize your installation.
0 commit comments