Compare commits

...
Author SHA1 Message Date
devydave 5ad8d0509a refactor: refactor to new access log implementation
continuous-integration/drone/pr Build is failing
2026-11-08 21:19:32 +01:00
devydave aac117f594 Merge branch 'master' into feat-crowdsec
continuous-integration/drone/pr Build is failing
2026-11-08 19:45:14 +01:00
p4u1 aa05fd724c chore: publish 6.5.1+v3.7.17 release
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2026-11-02 17:16:42 +01:00
renovate-bot 34225c7c3b chore(deps): update traefik docker tag to v3.7.17 (#154)
continuous-integration/drone/push Build is failing
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [traefik](https://github.com/containous/traefik) | patch | `v3.7.16` -> `v3.7.17` |

> ❗ **Important**
>
> Release Notes retrieval for this PR were skipped because no github.com credentials were available.
> If you are self-hosted, please see [this instruction](https://github.com/renovatebot/renovate/blob/master/docs/usage/examples/self-hosting.md#githubcom-token-for-release-notes).

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjQxLjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->

Reviewed-on: #154
Co-authored-by: Renovate Bot <renovate@coopcloud.tech>
2026-11-02 16:14:52 +00:00
fauno c67526651f feat: anything anubis is assigned to fauno (#153)
continuous-integration/drone/push Build is failing
Reviewed-on: #153
Reviewed-by: p4u1 <133+p4u1@noreply.git.coopcloud.tech>
Co-authored-by: f <f@sutty.nl>
2026-10-29 23:09:15 +00:00
renovate-bot 57f617c563 chore(deps): update ghcr.io/techarohq/anubis docker tag to v1.28.2 (#152)
continuous-integration/drone/push Build is failing
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/techarohq/anubis](https://images.chainguard.dev/directory/image/static/overview) ([source](https://github.com/chainguard-images/images/tree/HEAD/images/static)) | patch | `v1.28.1` -> `v1.28.2` |

> ❗ **Important**
>
> Release Notes retrieval for this PR were skipped because no github.com credentials were available.
> If you are self-hosted, please see [this instruction](https://github.com/renovatebot/renovate/blob/master/docs/usage/examples/self-hosting.md#githubcom-token-for-release-notes).

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjQxLjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->

Reviewed-on: #152
Co-authored-by: Renovate Bot <renovate@coopcloud.tech>
2026-10-28 21:23:26 +00:00
devydave e34a0e909d feat: adds crowdsec
continuous-integration/drone/pr Build is failing
2026-07-18 13:04:43 +02:00
10 changed files with 127 additions and 5 deletions
+6
View File
@@ -233,6 +233,12 @@ WRITE_TIMEOUT=0s
#ANUBIS_SERVE_ROBOTS_TXT=true
#ANUBIS_SLOG_LEVEL=INFO
## Crowdsec
#COMPOSE_FILE="$COMPOSE_FILE:compose.crowdsec.yml"
#CROWDSEC_ENABLED=1
#CROWDSEC_BOUNCER_ENABLED=1
#SECRET_CROWDSEC_LAPI_KEY_VERSION=v1 # generate=false
## Anubis metrics
#COMPOSE_FILE="$COMPOSE_FILE:compose.anubis-metrics.yml"
+1
View File
@@ -1 +1,2 @@
.*anubis.* @fauno
* @coop-cloud/traefik-maintainers
+46
View File
@@ -75,6 +75,52 @@ protection your apps.**
If you want to collect Prometheus metrics for Anubis, for instance with
[monitoring-ng](/monitoring-ng), uncomment the "Anubis metrics" section.
## Crowdsec
IMPORTANT even though Crowdsec is Open Source, the software sends information of the attacker IP and what decision(ban or captcha) to a centralized server for communit managed block lists.
On first deployment you need to generate an empty secret, because the lapi key is created at runtime.
```
abra app secret insert <domain> crowdsec_lapi_key v1
```
Then deploy your traefik recipe with the crowdsec compose and variables enabled and set `CROWDSEC_BOUNCER_ENABLED=0` to prevent initializing the bouncer that has no key yet.
When traefik is running, generate the LAPI key with the following command:
```
abra app run <domain> crowdsec cscli bouncers add crowdsecBouncer
```
After that insert the LAPI key(command below) and redeploy traefik with `CROWDSEC_BOUNCER_ENABLED=1` and `CROWDSEC_TRAEFIK_CONFIG_VERSION=v2`.
```
abra app secret insert <domain> crowdsec_lapi_key v2 -f -t <path-to/lapi-key-file>
```
When it is up and running go to the recipe you want to protect and add the following snippet and redeploy.
```
---
version: "3.8"
services:
app:
deploy:
labels:
- "traefik.http.routers.${STACK_NAME}.middlewares=crowdsec@file"
```
You can see if it is working by checking the ban list.
```
abra app run <domain> crowdsec cscli decisions list
```
When there are not bans yet you can try by banning your own IP.
```
abra app run <domain> crowdsec cscli decisions add --ip <your-ip> -d 10m # this will be effective 10min
```
Remove it with:
```
abra app run <domain> crowdsec cscli decisions remove --ip <your-ip> # this can still take a few minutes because of cache
```
## Enabling onion service
Uncomment the line in the config setting `ONION_ENABLED=1`. This will create a new entrypoint on port 9052 which can be used to bypass forced SSL. For more details, see the [onion recipe](https://recipes.coopcloud.tech/onion).
+3 -2
View File
@@ -1,4 +1,5 @@
export TRAEFIK_YML_VERSION=v37
export FILE_PROVIDER_YML_VERSION=v14
export TRAEFIK_YML_VERSION=v38
export FILE_PROVIDER_YML_VERSION=v15
export ENTRYPOINT_VERSION=v5
export ANUBIS_YML_VERSION=v1
export CROWDSEC_TRAEFIK_CONFIG_VERSION=v1
+1 -1
View File
@@ -7,7 +7,7 @@ services:
- "traefik.http.middlewares.anubis.forwardauth.address=http://anubis:8080/.within.website/x/cmd/anubis/api/check"
- "traefik.http.middlewares.anubis.forwardauth.trustForwardHeader=true"
anubis:
image: "ghcr.io/techarohq/anubis:v1.28.1"
image: "ghcr.io/techarohq/anubis:v1.28.2"
environment:
BIND: ":8080"
TARGET: " "
+42
View File
@@ -0,0 +1,42 @@
version: "3.8"
services:
app:
deploy:
labels:
- "traefik.http.routers.${STACK_NAME}.middlewares=crowdsec@file"
secrets:
- crowdsec_lapi_key
crowdsec:
image: crowdsecurity/crowdsec:v1.8.2
environment:
GID: "${GID-1000}"
COLLECTIONS: "crowdsecurity/traefik"
volumes:
- crowdsec-db:/var/lib/crowdsec/data/
- crowdsec-config:/etc/crowdsec/
- access-logs:/var/log/traefik/:ro
configs:
- source: crowdsec_traefik_config
target: /etc/crowdsec/acquis.d/traefik_config.yaml
mode: 0555
networks:
- internal
deploy:
update_config:
failure_action: rollback
order: stop-first
configs:
crowdsec_traefik_config:
name: ${STACK_NAME}_crowdsec_traefik_${CROWDSEC_TRAEFIK_CONFIG_VERSION}
file: crowdsec_traefik_config.yaml.tmpl
template_driver: golang
secrets:
crowdsec_lapi_key:
external: true
name: ${STACK_NAME}_crowdsec_lapi_key_${SECRET_CROWDSEC_LAPI_KEY_VERSION}
volumes:
crowdsec-db:
crowdsec-config:
+2 -2
View File
@@ -3,7 +3,7 @@ version: "3.8"
services:
app:
image: "traefik:v3.7.16"
image: "traefik:v3.7.17"
# Note(decentral1se): *please do not* add any additional ports here.
# Doing so could break new installs with port conflicts. Please use
# the usual `compose.$app.yml` approach for any additional ports
@@ -57,7 +57,7 @@ services:
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}.service=api@internal"
- "traefik.http.routers.${STACK_NAME}.middlewares=security@file"
- "coop-cloud.${STACK_NAME}.version=6.5.0+v3.7.16"
- "coop-cloud.${STACK_NAME}.version=6.5.1+v3.7.17"
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT}"
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
+5
View File
@@ -0,0 +1,5 @@
filenames:
- /var/log/traefik/*
labels:
type: traefik
+10
View File
@@ -22,6 +22,16 @@ http:
basicAuth:
usersFile: "/run/secrets/usersfile"
{{ end }}
{{ if eq (env "CROWDSEC_ENABLED") "1" }}
crowdsec:
plugin:
bouncer:
enabled: {{ if eq (env "CROWDSEC_BOUNCER_ENABLED") "1" }}true{{ else }}false{{ end }}
logLevel: DEBUG
crowdsecMode: live
crowdsecLapiKey: "{{ if eq (env "CROWDSEC_BOUNCER_ENABLED") "1" }}{{ secret "crowdsec_lapi_key" }}{{ else }}please_set_CROWDSEC_BOUNCER_ENABLED_to_1{{ end }}"
crowdsecLapiHost: crowdsec:8080
{{ end }}
ip-rate-limit:
rateLimit:
average: {{ or (env "RATE_LIMIT_AVERAGE") "100" }}
+11
View File
@@ -5,6 +5,9 @@ core:
log:
level: {{ env "LOG_LEVEL" }}
maxAge: {{ env "LOG_MAX_AGE" }}
{{- if eq (env "CROWDSEC_ENABLED") "1" }}
filePath: "/var/log/traefik.log"
{{- end }}
{{ if eq (env "ACCESS_LOG_ENABLED") "true" }}
accessLog:
@@ -188,3 +191,11 @@ certificatesResolvers:
- "1.1.1.1:53"
- "9.9.9.9:53"
{{- end }}
{{ if eq (env "CROWDSEC_ENABLED") "1" }}
experimental:
plugins:
bouncer:
moduleName: github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin
version: v1.8.1
{{- end }}