crowdsec VS caddy-docker

Compare crowdsec vs caddy-docker and see what are their differences.

crowdsec

CrowdSec - the open-source and participative security solution offering crowdsourced protection against malicious IPs and access to the most advanced real-world CTI. (by crowdsecurity)

caddy-docker

Source for the official Caddy v2 Docker Image (by caddyserver)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
crowdsec caddy-docker
169 30
7,665 382
2.3% 4.5%
9.6 5.8
2 days ago 9 days ago
Go Dockerfile
MIT License Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

crowdsec

Posts with mentions or reviews of crowdsec. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-02.
  • Brute.Fail Watch brute force attacks in real time
    3 projects | news.ycombinator.com | 2 Jun 2023
    Hey we actually built the second part as a product. Its a modern revamp of fail2ban combined with crowdsourcing aspect to deliver an up-to-date blocklist of active threats. You can check it out at https://github.com/crowdsecurity/crowdsec
  • Did you have serious attacks on your exposed services before?
    2 projects | /r/selfhosted | 30 Apr 2023
    This tool crowdsec.net is really interesting to mitigate and enact defense systems for different scenarios.
  • Feature Request: CrowdSec
    3 projects | /r/firewalla | 25 Apr 2023
    CrowdSec is licensed under MIT open source license, you can find a copy of the text here: “Copyright 2020, CrowdSec SAS (http://crowdsec.net), Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.” That’s all there is to it. Like in the case of Debian, you can do anything you want with it, for free, period. You just need to embed this license when you redistribute the product.
  • Hardening exposed WireGuard ports
    3 projects | /r/selfhosted | 6 Nov 2022
    Do I need something like crowdsec, or is WireGuard secure enough on its own?
  • Banning users for certain actions
    3 projects | /r/flask | 8 Oct 2022
    You could try out https://crowdsec.net. It’s an advanced FOSS framework for detecting a number of different attacks and not limited to just brute force attacks like Fail2Ban as /u/nonself suggests. The basic concept of CrowdSes is that it reads log, detects attacks, mitigates attacks (CrowdSec integrates directly into the Flask application) and shares information about those attacks with everyone else using CrowdSec. Disclaimer: I am head of community at CrowdSec so my opinions may be a little biased :-)
  • How to access Docker containers on home server from public IP?
    6 projects | /r/selfhosted | 4 Oct 2022
    You need to setup reverse proxy. nginx-proxy-manager, swag. There are also more options like caddy, haproxy etc... You can also setup a VPN and or a service like authelia, fail2ban, crowdsec to restrict access to your site.
  • Crosscompiling CrowdSec on amd64 (Ubuntu 22.04) to arm64 (FriendlyWRT / OpenWRT 22.04)?
    2 projects | /r/CrowdSec | 24 Sep 2022
    Release v1.4.1 · crowdsecurity/crowdsec (github.com)
  • Block traffic from every country except the USA? - Apache2/SSH
    2 projects | /r/sysadmin | 15 Sep 2022
    Not what you suggested but have you considered https://crowdsec.net? Not just a collaborative and more advanced version of Fail2Ban but in this case you want it because of the collaborative blocklist; we made an article showing that 92% of attacks was blocked in advanced by ip reputation before any attacks were performed. Disclaimer: I am head of community so I might be a bit biased. It’s still a cool FOSS project though :-)
  • Newbie help...docker, portainer, godaddy
    6 projects | /r/selfhosted | 14 Sep 2022
    You need to look into reverse proxy. Most common one is nginx-proxy-manager which has a nice GUI. There is also SWAG. Both can been configured to get free SSL certificates. For security: authelia, fail2ban, crowdsec. I also suggest to configure wireguard, wg-easy. If you have any questions, we are here. Welcome and good luck!
  • Large scale Internet SSH brute force attacks seem to have stopped here
    10 projects | news.ycombinator.com | 29 Aug 2022
    So in that way everybody using CrowdSec are helping each other out. More information at https://crowdsec.net.

caddy-docker

Posts with mentions or reviews of caddy-docker. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-06.
  • Which reverse proxy for public and Lan sites with valid https?
    2 projects | /r/selfhosted | 6 Dec 2023
    The official Caddy documentation of their Docker image: https://hub.docker.com/_/caddy
  • Leaking Bitwarden's Vault with a Nginx vulnerability
    10 projects | news.ycombinator.com | 3 Jul 2023
    I use https://static-web-server.net/

    Cross-platform, written in Rust, straightforward configuration, secure defaults, also has a hardened container image and a hardened NixOS module.

    I wouldn't recommend Caddy. Their official docker image runs as root unnecessarily (and the reasoning suggests a lack of understanding) [1], and they don't provide a properly sandboxed systemd unit file [2].

    [1]: https://github.com/caddyserver/caddy-docker/issues/104

  • Which reverse proxy are you using?
    16 projects | /r/selfhosted | 7 Apr 2023
    There is also a short section about it on the Docker hub page under the "Adding custom Caddy modules" section: https://hub.docker.com/_/caddy
  • Caddy, Go, Docker and a Single Page App
    6 projects | dev.to | 3 Apr 2023
    Caddy uses a number of volumes. Two point directly at files within our project, first our Caddyfile, then our public folder which Caddy will serve live files. The other two are virtual filesystems Docker will create as defined by the master volumes parameters. We can assume the caddy_config volume is where active configuration is stored as it is not discussed on the Caddy Docker Official Image page, so we're copying their parameter exactly, but the caddy_data volume needs some extra discussion. It is used to store a number of things including SSL certificates. By default Docker creates and destroys volumes upon startup and exit. As we want to persist our certificate across sessions we can take advantage of an external Docker volume. These virtual filesystems are created before starting the Docker session for the first time. This can ve done from the command line or more easily from within the Docker Desktop app. Simply choose "Volumes", click the "Create" button and specify caddy_data.
  • Caddy with Cloudflare plugin?
    3 projects | /r/unRAID | 5 Mar 2023
  • I’m new to docker how can I run my website
    3 projects | /r/docker | 2 Sep 2022
    For a reverse proxy I would suggest Caddy. The configuration is super easy and it handles SSL for you out of the box using LetsEncrypt! There’s also an official docker image like PHP and MySQL here https://hub.docker.com/_/caddy
  • Can you people please suggest a suitable architecture for the following problem?
    3 projects | /r/devops | 14 Jul 2022
    Their image is dead simple to use, the config is fine, and auto-https is baked in. You can use it as a sidecar, proxy for multiple images, or just as a base to add your app into, depending on the complexity of your existing config.
  • NGINX Proxy Manager
    15 projects | news.ycombinator.com | 20 May 2022
    > First, what versions am I getting? Does using `2.5.1-builder` result in a customer built binary that's version `2.5.1`? The command usage [1] of the `xcaddy` command says it falls back to the `CADDY_VERSION` environment variable if it's not set explicitly. Since it's not set explicitly, I go looking for that variable in the Dockerfile [2].

    Yeah - the default version it'll build with is the version embedded in the builder image, so in that case, v2.5.1. But really, you can just use always use the latest builder image and specify the version you want in the xcaddy command, i.e. 'xcaddy build v2.5.1 --with ', or any other git ref if not a version (cause we're using Go to build and you can use any git ref, like a commit hash or branch name if you want to try a WIP pull request).

    We set it up with a good default so most users wouldn't need to ask that question, it should "just work" for them. But it's a valid question to ask.

    > That's some templating language I'm not familiar with and I can't track down where the variable gets set, at least not quickly.

    Yeah we're using Gomplate for generating the Dockerfiles for the official Docker Library builds, since we need to make builds for every CPU architecture, and even Windows docker images (I still have no idea why anyone would want those, but alas). Either way, that's an implementation detail of how we automate this stuff, doesn't matter to users.

    > Now, what version of `caddy-dns/cloudflare` am I getting?

    The latest, if you don't specify a version. The https://github.com/caddy-dns/cloudflare repo doesn't have tagged releases, so it'll just be the latest commit on the master branch. You can specify a specific commit like '--with github.com/caddy-dns/cloudflare@8ea1cff' for (as of this writing) the commit just before the latest.

    > What other risks come along with building and maintaining my own custom image?

    Honestly, none. Maybe problems with plugins not being compatible with eachother, but Caddy's plugin design means that should rarely happen, except if two plugins have the same module ID. But that's up to you to make sure you don't pick two plugins that try to do the same thing.

    Because of the way Go builds work, they can always be cross-compiled. We don't use CGO, so builds of Caddy are completely static and have zero dependencies. There's really no risk that it doesn't build in a specific environment, or whatever.

    > If I build a custom image, do I let other people I help with the odd tech thing use it or is all the effort for me only? I don't want to become the maintainer of a Docker image others rely on, so I can't even re-use any related config if I help others in the future since they won't have access to the needed image.

    Up to you. But that's the exact reason we don't maintain builds with plugins ourselves. There's literally an infinite amount of combinations possible. Some have suggested like "caddy-lite" and "caddy-full" sort of setups where we ship just a few vetted plugins or "yolo give me all the plugins" but that's silly. We don't have the time or resources to vet all the plugins.

    From your perspective it might seem like "duh, there should be an official build with Cloudflare", but really it's a pretty small percentage of users who need this.

    > Also, a 4 line Docker file looks nice in terms of being simple, but explicitly declaring or even adding comments describing some of the things I pointed out above can save people a lot of time. Even comments with links to the relevant portions of the docs would be super useful.

    (as I wrote in my other comment, the docs for this are on https://hub.docker.com/_/caddy)

    > The desire for wildcard certificates is to keep things from being discoverable via CTLogs.

    It's really trivial for someone to scan until they hit subdomains that return a successful response, if they really cared. This doesn't really protect from anything. Using wildcards for that is a bit of an antipattern.

    15 projects | news.ycombinator.com | 20 May 2022
    FYI for Caddy + cloudflare DNS plugin in Docker, you just need to write a Dockerfile like this (see https://hub.docker.com/_/caddy):

        FROM caddy:2.5.1-builder AS builder
    15 projects | news.ycombinator.com | 20 May 2022
    I appreciate the reply. I took some time to look at your example so I can give some feedback on where I end up when I think about building / maintaining my own image.

    My immediate reaction is that the example is nice as a one-off build, but it's much more complex if I need to set up something I can maintain long term. I might be overthinking it, but in the context of thinking about something I can maintain my thought process is below. The questions are mostly rhetorical.

    First, what versions am I getting? Does using `2.5.1-builder` result in a customer built binary that's version `2.5.1`? The command usage [1] of the `xcaddy` command says it falls back to the `CADDY_VERSION` environment variable if it's not set explicitly. Since it's not set explicitly, I go looking for that variable in the Dockerfile [2].

    That's some templating language I'm not familiar with and I can't track down where the variable gets set, at least not quickly. I'd probably have to spend an hour learning how those templates work to figure it out. To make a quicker, educated guess, it most likely matches the builder version. The docs said the version can be set to any git ref, so I can explicitly set it to v2.5.1 on the command line [3] to be certain.

    Now, what version of `caddy-dns/cloudflare` am I getting? The xcaddy custom builds section of the docs [4] says the version can optionally be specified, but it's not specified in the above example. There aren't any tags in the repo, so it's probably building off `master`. The doc says it functions similar to `go get`, but doesn't explain what the differences are and the default behavior isn't explained either.

    The docs for `go get` [6] say it can use a revision, so maybe a specific commit can be used for that, but I'd need to test it since I'm not super familiar with Golang.

    What other risks come along with building and maintaining my own custom image? I could end up with a subtly broken build that only occurs in my environment. Portability doesn't guarantee compatibility [7] and building custom images increases the risk of compatibility issues beyond what I get with official images (building and running vs just running). That blog post is a really cool read on it's own BTW.

    I need to consider the potential for breakage even if it's miniscule because my Docker infrastructure is self hosted and will be sitting behind my custom built Caddy image. If my custom image breaks, I need a guaranteed way of having access to a previous, known good version. This is as simple as publishing the images externally, but adds an extra step since I'll need an account at a registry and need to integrate pushes to that registry into my build.

    If I build a custom image, do I let other people I help with the odd tech thing use it or is all the effort for me only? I don't want to become the maintainer of a Docker image others rely on, so I can't even re-use any related config if I help others in the future since they won't have access to the needed image.

    To be fair, I also see things I don't like in the NGINX Proxy Manager Dockerfile [7]. The two that immediately jump out at me are things I consider common mistakes. Both require unlucky timing to fail, but can technically cause failure IMO. The first is using `apt-get update` which will exit 0 on failure and has the potential to leave `apt-get install` running against obsolete versions. The second is using `apt-get update` in multiple parts of a multistage build. If I were doing it I'd run `apt-get update` in a base image and avoid it in the builder + runtime images to guarantee the versions stay the same between the build container and the runtime container.

    It took me about 1h to work through that and write this comment, so it's not just a matter of building a Docker image and plugging in the config. There's a lot of nuance that goes into maintaining a Docker image (I'm sure you know that already) and not having an image with the DNS plugin(s) baked in is a show stopper for anyone like me that can't justify maintaining their own.

    Also, a 4 line Docker file looks nice in terms of being simple, but explicitly declaring or even adding comments describing some of the things I pointed out above can save people a lot of time. Even comments with links to the relevant portions of the docs would be super useful.

    My reason for wanting the Cloudflare DNS plugin is that I have some things I want to run 100% locally without ever exposing them to the internet. The desire for wildcard certificates is to keep things from being discoverable via CTLogs.

    I hope that's useful feedback. I realize someone bemoaning the difficulty of running your stuff at home lab / small business scale isn't exactly the target audience in terms of picking up customers that pay the bills. Thanks again for the reply / example.

    1. https://github.com/caddyserver/xcaddy#command-usage

    2. https://github.com/caddyserver/caddy-docker/blob/master/Dock...

    3. https://github.com/caddyserver/caddy/tree/v2.5.1

    4. https://github.com/caddyserver/xcaddy#custom-builds

    5. https://github.com/caddy-dns/cloudflare/tags

    6. https://go.dev/ref/mod#go-get

    7. https://www.redhat.com/en/blog/containers-understanding-diff...

    8. https://github.com/NginxProxyManager/docker-nginx-full/blob/...

What are some alternatives?

When comparing crowdsec and caddy-docker you can also consider the following projects:

Fail2Ban - Daemon to ban hosts that cause multiple authentication errors

Wazuh - Wazuh - The Open Source Security Platform. Unified XDR and SIEM protection for endpoints and cloud workloads.

pfSense - Main repository for pfSense

Nginx Proxy Manager - Docker container for managing Nginx proxy hosts with a simple, powerful interface

ModSecurity - ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache, IIS and Nginx that is developed by Trustwave's SpiderLabs. It has a robust event-based programming language which provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring, logging and real-time analysis. With over 10,000 deployments world-wide, ModSecurity is the most widely deployed WAF in existence.

Suricata - Suricata is a network Intrusion Detection System, Intrusion Prevention System and Network Security Monitoring engine developed by the OISF and the Suricata community.

docker-pi-hole - Pi-hole in a docker container

ansible-collection-hardening - This Ansible collection provides battle tested hardening for Linux, SSH, nginx, MySQL

Snort - Snort++

OSSEC - OSSEC is an Open Source Host-based Intrusion Detection System that performs log analysis, file integrity checking, policy monitoring, rootkit detection, real-time alerting and active response.

docker-fail2ban - Fail2ban Docker image