Ubuntu 20.04.3 LTS dashboard setup failure

Installed crowdsec on a pristine Ubuntu Server 20.04.3 LTS machine and ran into an issue when running cscli dashboard setup. Included some information that will hopefully be useful.

% sudo cscli dashboard setup
INFO[15-09-2021 05:14:01 PM] Pulling docker image metabase/metabase:v0.37.0.2
INFO[15-09-2021 05:14:02 PM] creating container 'crowdsec-metabase'
FATA[15-09-2021 05:14:02 PM] container create: failed to create container : Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /var/lib/crowdsec/data

I manually modified permissions on the /var/lib/crowdsec/data directory after the problem initially occurred.

% ls -lsah /var/lib/crowdsec
total 12K
4.0K drwxr-xr-x  3 root root     4.0K Sep 15 00:37 .
4.0K drwxr-xr-x 46 root root     4.0K Sep 15 00:37 ..
4.0K drwxrwxr-x  3 root crowdsec 4.0K Sep 15 17:15 data

Crowdsec version information

% crowdsec --version
2021/09/15 17:19:14 version: v1.2.0-debian-pragmatic-0ecfe7568790a15791011da27eb24e96e7d4a39f
2021/09/15 17:19:14 Codename: alphaga
2021/09/15 17:19:14 BuildDate: 2021-09-14_15:15:36
2021/09/15 17:19:14 GoVersion: 1.16.7
2021/09/15 17:19:14 Constraint_parser: >= 1.0, <= 2.0
2021/09/15 17:19:14 Constraint_scenario: >= 1.0, < 3.0
2021/09/15 17:19:14 Constraint_api: v1
2021/09/15 17:19:14 Constraint_acquis: >= 1.0, < 2.0

OS Information

% lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.3 LTS
Release:	20.04
Codename:	focal

Docker version

% docker --version
Docker version 20.10.8, build 3967b7d28e

thank you very much for the detailed report, I’ll try to reproduce :slight_smile:


Surprisingly I was not able to reproduce :

curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | sudo bash
apt install crowdsec
cscli  dashboard setup

But I have similar environment to yours :

docker --version
Docker version 20.10.7, build 20.10.7-0ubuntu1~20.04.1
No LSB modules are available.

The /var/lib/crowdsec/data/ should be created by the package configuration : crowdsec/postinst at 9b5cb6abc9c3bae19c9c53f0b7a0f8834be64ad5 · crowdsecurity/crowdsec · GitHub

Can you tell me how you installed it ?

I used the following commands (I think these were straight from the website).

$ curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | sudo bash
$ sudo apt-get install crowdsec

Then I installed a bouncer

$ sudo apt install crowdsec-firewall-bouncer-iptables

The only other things that I did differently were changing the dashboard port from 8080 to 9090 and the listen address from to (my machine is behind another firewall and only receives a single port forward from the outside world).

Hello @jfilling ,

Can you paste us the output of the sudo apt-get install crowdsec if you can reproduce this behavior please?

I figured out what was going wrong and I really should have noticed it sooner.

Because I already have port 8080 in use on my machines, the crowdsec service doesn’t actually get started after installation. I had to edit the 2 configuration files to change port 8080 to something else, and then start the crowdsec service.

Ran into the same issue for the crowdsec-firewall-bouncer-iptables installation. It failed on initial install due to port 8080 being used, and I had to edit the config file to fix the port 8080 issue, then reinstall the package.

Apologies for the noise.