Can't connect to remote LAPI with agent

On my Nginx Proxy Manager VM I am running the crowdsec server. This works so far as I already have another service successfully using it. But I only provided the URL, machine name and API_KEY because the service handles everything itself and just required the lapi credentials. Now I have another service which I have to configure manually. I installed the crowdsec agent via docker. This is my config.yaml for my log processor (this is not running the LAPI server)
common:
log_media: stdout
log_level: info
log_dir: /var/log/
config_paths:
config_dir: /etc/crowdsec/
data_dir: /var/lib/crowdsec/data/
simulation_path: /etc/crowdsec/simulation.yaml
hub_dir: /etc/crowdsec/hub/
index_path: /etc/crowdsec/hub/.index.json
notification_dir: /etc/crowdsec/notifications/
plugin_dir: /usr/local/lib/crowdsec/plugins/
crowdsec_service:
acquisition_path: /etc/crowdsec/acquis.yaml
acquisition_dir: /etc/crowdsec/acquis.d
parser_routines: 1
plugin_config:
user: nobody
group: nobody
cscli:
output: human
db_config:
log_level: info
type: sqlite
db_path: /var/lib/crowdsec/data/crowdsec.db
flush:
max_items: 5000
max_age: 7d
use_wal: false
api:
client:
insecure_skip_verify: false
credentials_path: /etc/crowdsec/local_api_credentials.yaml
server:
log_level: info
listen_uri: 0.0.0.0:8080
profiles_path: /etc/crowdsec/profiles.yaml
trusted_ips: # IP ranges, or IPs which can have admin API access
- 127.0.0.1
- ::1
online_client: # Central API credentials (to push signals and receive bad IPs)
credentials_path: /etc/crowdsec//online_api_credentials.yaml
enable: false
prometheus:
enabled: true
level: full
listen_addr: 0.0.0.0
listen_port: 6060
common:
log_media: stdout
log_level: info
log_dir: /var/log/
config_paths:
config_dir: /etc/crowdsec/
data_dir: /var/lib/crowdsec/data/
simulation_path: /etc/crowdsec/simulation.yaml
hub_dir: /etc/crowdsec/hub/
index_path: /etc/crowdsec/hub/.index.json
notification_dir: /etc/crowdsec/notifications/
plugin_dir: /usr/local/lib/crowdsec/plugins/
crowdsec_service:
acquisition_path: /etc/crowdsec/acquis.yaml
acquisition_dir: /etc/crowdsec/acquis.d
parser_routines: 1
plugin_config:
user: nobody
group: nobody
cscli:
output: human
db_config:
log_level: info
type: sqlite
db_path: /var/lib/crowdsec/data/crowdsec.db
flush:
max_items: 5000
max_age: 7d
use_wal: false
api:
client:
insecure_skip_verify: false
credentials_path: /etc/crowdsec/local_api_credentials.yaml
server:
log_level: info
listen_uri: 0.0.0.0:8080
profiles_path: /etc/crowdsec/profiles.yaml
trusted_ips: # IP ranges, or IPs which can have admin API access
- 127.0.0.1
- ::1
online_client: # Central API credentials (to push signals and receive bad IPs)
credentials_path: /etc/crowdsec//online_api_credentials.yaml
enable: false
prometheus:
enabled: true
level: full
listen_addr: 0.0.0.0
listen_port: 6060
My local_api_credentials.yaml
url: http://IP_OF_REMOTE:8080
login: machine_name
password: generatedPassword
url: http://IP_OF_REMOTE:8080
login: machine_name
password: generatedPassword
2 Replies
CrowdSec
CrowdSec2w 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 ❤️
Domme
DommeOP2w ago
When starting the container it always shows
crowdsec | Error: no matches found
crowdsec | Generate local agent credentials
crowdsec | level=warning msg="crowdsec local API is disabled because 'enable' is set to false"
crowdsec | Error: no matches found
crowdsec | Generate local agent credentials
crowdsec | level=warning msg="crowdsec local API is disabled because 'enable' is set to false"
When enabling the server again it starts normally (but probably doesn't use the remote server?) My acquis.d/vaultwarden
---
filenames:
- /var/log/vaultwarden.log
labels:
type: Vaultwarden
---
filenames:
- /var/log/vaultwarden.log
labels:
type: Vaultwarden
docker-compose.yaml
crowdsec:
container_name: crowdsec
image: docker.io/crowdsecurity/crowdsec:latest
restart: always
network_mode: bridge
# ports:
# - "127.0.0.1:7422:7422"
# - "8080:8080"
environment:
- "TZ=Europe/Somewhere..."
- "COLLECTIONS=Dominic-Wagner/vaultwarden"
volumes:
- "./crowdsec/conf:/etc/crowdsec"
- "./crowdsec/data:/var/lib/crowdsec/data"
- "./data:/opt/vaultwarden:ro"
crowdsec:
container_name: crowdsec
image: docker.io/crowdsecurity/crowdsec:latest
restart: always
network_mode: bridge
# ports:
# - "127.0.0.1:7422:7422"
# - "8080:8080"
environment:
- "TZ=Europe/Somewhere..."
- "COLLECTIONS=Dominic-Wagner/vaultwarden"
volumes:
- "./crowdsec/conf:/etc/crowdsec"
- "./crowdsec/data:/var/lib/crowdsec/data"
- "./data:/opt/vaultwarden:ro"
This is everything I have configured for crowdsec

Did you find this page helpful?