Self-host CrowdSec Local API with Levelrail
Collaborative security engine run here as the local API that other agents and bouncers register with. The log reading agent and the online API are switched off.
- Authorcrowdsecurity
- LicenceMIT
- Memory256 MiB
- Services1
How to self-host CrowdSec Local API
-
Pull the images
One image is pulled on your server.
Show images
crowdsecurity/crowdsec:v1.8.2
-
Create the app
One service starts in a single Compose app, with 2 named volume mounts for your data, on port 8080.
-
Fill in the secrets
2 settings are preset, you do not have to fill in anything.
-
Open it
Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.
After the first start
- Register an agent or bouncer with cscli machines add or cscli bouncers add inside the container, then point it at this address.
CrowdSec Local API requirements
- Memory
- About 256 MiB
- Architectures
- amd64 unknown, arm64 unknown
- Ports
- 8080
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- MIT, permissive license
- Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then CrowdSec Local API. New to Levelrail? Install it on a fresh VPS first.
docker pull ghcr.io/glincker/levelrail:latest Then levelrail-cli login --device. See Getting started and the CrowdSec Local API docs page.
Deploy CrowdSec Local API your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy CrowdSec Local API from the CLI
levelrail-cli templates deploy crowdsec --name my-crowdsec Deploy CrowdSec Local API with the API
curl -X POST -H "Authorization: Bearer $TOKEN" \
https://levelrail.example.com/api/v1/service-templates/crowdsec/deploy CrowdSec Local API configuration
CrowdSec Local API services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| crowdsec | crowdsecurity/crowdsec:v1.8.2 | 8080 | config -> /etc/crowdsecdata -> /var/lib/crowdsec/data |
CrowdSec Local API environment variables
| Variable | Service | Value |
|---|---|---|
| DISABLE_AGENT | crowdsec | Preset by the template |
| DISABLE_ONLINE_API | crowdsec | Preset by the template |
Ports and volumes
- Ports
- 8080
- Volumes
- 2 named mounts: config -> /etc/crowdsec, data -> /var/lib/crowdsec/data
CrowdSec Local API FAQ
How much memory does CrowdSec Local API need?
The catalog lists about 256 MiB of memory for CrowdSec Local API.
Does CrowdSec Local API run on arm64?
For CrowdSec Local API, arm64 support is not confirmed; amd64 is unknown.
What licence is CrowdSec Local API under?
CrowdSec Local API is licensed under MIT, which is permissive, with few conditions on reuse.
Does CrowdSec Local API need configuration before it starts?
No. The template fills in its own defaults.
Which ports does CrowdSec Local API use?
CrowdSec Local API listens on port 8080 inside the stack.
Where does CrowdSec Local API keep its data?
In named volumes: config mounted at /etc/crowdsec and data mounted at /var/lib/crowdsec/data.
Can I deploy CrowdSec Local API on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id crowdsec for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image crowdsecurity/crowdsec:v1.8.2 is what you deploy there.