problem enroll

hello i can't enroll with this comamnd :"sudo cscli console enroll -e context cljr4jq2f0000la0877idaaaa ", for example the yaml configuration files changed ,and cscli comand too . I have this feedback :"alexandre@ubuntu:~$ sudo cscli console enroll -e context cljr4jq2f0000la0877idaaaa FATA[0000] unknown shorthand flag: 'e' in -e
alexandre@ubuntu:~$ sudo cscli console enroll FATA[19-07-2025 18:53:23] accepts 1 arg(s), received 0
alexandre@ubuntu:~$ sudo cscli console enroll cljr4jq2f0000la0877idaaaa FATA[19-07-2025 18:53:32] Unable to load required Local API Configuration : loading online client credentials: failed unmarshaling api server credentials configuration file '/etc/crowdsec/online_api_credentials.yaml': yaml: unmarshal errors: line 1: field papi_url not found in type csconfig.ApiCredentialsCfg alexandre@ubuntu:~$ sudo cscli cscli is the main command to interact with your crowdsec service, scenarios & db. It is meant to allow you to manage bans, parsers/scenarios/etc, api and generally manage you crowdsec setup." could you help me ? "Regards
10 Replies
CrowdSec
CrowdSec2mo ago
Important Information
Thank you for getting in touch with your support request. To expedite a swift resolution, could you kindly provide the following information? Rest assured, we will respond promptly, and we greatly appreciate your patience. While you wait, please check the links below to see if this issue has been previously addressed. If you have managed to resolve it, please use run the command /resolve or press the green resolve button below.
Log Files
If you possess any log files that you believe could be beneficial, please include them at this time. By default, CrowdSec logs to /var/log/, where you will discover a corresponding log file for each component.
Guide Followed (CrowdSec Official)
If you have diligently followed one of our guides and hit a roadblock, please share the guide with us. This will help us assess if any adjustments are necessary to assist you further.
Screenshots
Please forward any screenshots depicting errors you encounter. Your visuals will provide us with a clear view of the issues you are facing.
© Created By WhyAydan for CrowdSec ❤️
blotus
blotus2mo ago
Can you provide the output of cscli version ? You likely have installed the version from the ubuntu repositories, not ours, and it lags behind quite a bit. If you have added our repository to the machine, it could be because of Ubuntu ESM, and you'll need to add some apt configuration to tell it to favor the crowdsec package from our repo, see https://docs.crowdsec.net/u/getting_started/installation/linux
Linux | CrowdSec
Before getting started, it is advised to read the introduction page to understand the prerequisites and concepts for running CrowdSec.
Sir Valen le Juste
Sir Valen le JusteOP2mo ago
hello , i've this :"sudo cscli version 2025/07/20 23:35:07 version: v1.4.6-6ubuntu0.24.04.2+esm1-debian 2025/07/20 23:35:07 Codename: alphaga 2025/07/20 23:35:07 BuildDate: 2025-06-20_04:35:38 2025/07/20 23:35:07 GoVersion: 1.22.2 2025/07/20 23:35:07 Platform: linux 2025/07/20 23:35:07 Constraint_parser: >= 1.0, <= 2.0 2025/07/20 23:35:07 Constraint_scenario: >= 1.0, < 3.0 2025/07/20 23:35:07 Constraint_api: v1 2025/07/20 23:35:07 Constraint_acquis: >= 1.0, < 2.0 alexandre@ubuntu:~$ "
iiamloz
iiamloz2mo ago
Yes you accidentally installed a very old version.
iiamloz
iiamloz2mo ago
https://docs.crowdsec.net/u/getting_started/installation/linux#:~:text=ESM/Pro%20Ubuntu There a section just below the install command which states how to change the apt policy so you can install the latest
Linux | CrowdSec
Before getting started, it is advised to read the introduction page to understand the prerequisites and concepts for running CrowdSec.
iiamloz
iiamloz2mo ago
But firstly best to purge the current crowdsec install then do the policy change
Sir Valen le Juste
Sir Valen le JusteOP2mo ago
hello , i cant do anything , and i've still this problem :""
iiamloz
iiamloz2mo ago
There is a full section about ESM ubuntu, but I paste it here cause you seem to miss it
Check the current package policy

To see which version of CrowdSec is currently available via APT:

apt-cache policy crowdsec

You may see output like the following:

crowdsec:
Installed: (none)
Candidate: 1.4.6-6ubuntu0.24.04.1+esm1
Version table:
....

If the Candidate version shown is 1.4.6, this means the default priority favors the Ubuntu-provided package. To ensure we retrieve the latest version from our repository, we need to adjust the package pinning.
Set CrowdSec repository priority

Open the preferences file with:

sudo vim /etc/apt/preferences.d/crowdsec

Then add the following content:

Package: *
Pin: release o=packagecloud.io/crowdsec/crowdsec,a=any,n=any,c=main
Pin-Priority: 1001

After saving the file, refresh your local package cache:

sudo apt update

Once the cache has been updated, check the policy again to confirm that the latest version is now selected:

apt-cache policy crowdsec

crowdsec:
Installed: 1.6.X
Candidate: 1.6.X
Version table:
...
Check the current package policy

To see which version of CrowdSec is currently available via APT:

apt-cache policy crowdsec

You may see output like the following:

crowdsec:
Installed: (none)
Candidate: 1.4.6-6ubuntu0.24.04.1+esm1
Version table:
....

If the Candidate version shown is 1.4.6, this means the default priority favors the Ubuntu-provided package. To ensure we retrieve the latest version from our repository, we need to adjust the package pinning.
Set CrowdSec repository priority

Open the preferences file with:

sudo vim /etc/apt/preferences.d/crowdsec

Then add the following content:

Package: *
Pin: release o=packagecloud.io/crowdsec/crowdsec,a=any,n=any,c=main
Pin-Priority: 1001

After saving the file, refresh your local package cache:

sudo apt update

Once the cache has been updated, check the policy again to confirm that the latest version is now selected:

apt-cache policy crowdsec

crowdsec:
Installed: 1.6.X
Candidate: 1.6.X
Version table:
...
remember purge your crowdsec install, then do the above
Sir Valen le Juste
Sir Valen le JusteOP2mo ago
i aldready done that apt-cache policy crowdsec i can retry today je sais pas ce que vous avez foutu , vous mettez la destination des attaques à la place de la source ! vive le gôchisme !
blotus
blotus2mo ago
- if you can avoid political comments, it would be nice - Please keep to english for the public channels - we need a little bit more details than that

Did you find this page helpful?