Installation
This guide covers the manual installation of Suricatavel with full control over each component.
For a quick automated installation, see the Quickstart Guide.
Installation steps
Section titled “Installation steps”Step 1: Install PostgreSQL 18 and TimescaleDB
Section titled “Step 1: Install PostgreSQL 18 and TimescaleDB”-
Add repositories
Terminal window # Add PostgreSQL repositoryapt-get install -y gnupg2 wget lsb-releasemkdir -p /usr/share/keyringswget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /usr/share/keyrings/postgresql-archive-keyring.gpgecho "deb [signed-by=/usr/share/keyrings/postgresql-archive-keyring.gpg] http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list# Add TimescaleDB repositorywget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | gpg --dearmor -o /usr/share/keyrings/timescaledb-archive-keyring.gpgecho "deb [signed-by=/usr/share/keyrings/timescaledb-archive-keyring.gpg] https://packagecloud.io/timescale/timescaledb/ubuntu/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/timescaledb.list -
Install packages
Terminal window apt-get updateapt-get install -y postgresql-18 postgresql-client-18 timescaledb-2-postgresql-18# Ensure PostgreSQL 18 cluster exists (optional if already created by install)# If the cluster 'main' already exists, this command will safely error out or can be skippedif ! pg_lsclusters | grep -q "18 main"; thenpg_createcluster 18 main --startfi# Optimize PostgreSQL configuration# --quiet --yes runs it non-interactively with recommended settingstimescaledb-tune --quiet --yessystemctl restart postgresql -
Create Database
Terminal window # Create database and usersudo -u postgres psql -c "CREATE USER suricatavel WITH PASSWORD 'secret_password';"sudo -u postgres psql -c "CREATE DATABASE suricataveldb OWNER suricatavel;"
-
Add repositories
Terminal window # Add PostgreSQL repositorydnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm# Disable built-in postgresql modulednf -qy module disable postgresql# Add TimescaleDB repository (using el/9 for compatibility)tee /etc/yum.repos.d/timescale_timescaledb.repo <<EOF[timescale_timescaledb]name=TimescaleDBbaseurl=https://packagecloud.io/timescale/timescaledb/el/9/\$basearchenabled=1gpgcheck=1repo_gpgcheck=1gpgkey=https://packagecloud.io/timescale/timescaledb/gpgkeyEOF -
Install and Configure
Terminal window # Install PostgreSQL 18 and TimescaleDBdnf install -y postgresql18-server postgresql18 timescaledb-2-postgresql-18# Initialize Database/usr/pgsql-18/bin/postgresql-18-setup initdb# Start and enable service so timescaledb-tune can connectsystemctl enable --now postgresql-18# Optimize PostgreSQL configuration# --quiet --yes runs it non-interactively with recommended settingstimescaledb-tune --quiet --yes# Restart to apply changessystemctl restart postgresql-18 -
Create Database
Terminal window # Create database and usersudo -u postgres psql -c "CREATE USER suricatavel WITH PASSWORD 'secret_password';"sudo -u postgres psql -c "CREATE DATABASE suricataveldb OWNER suricatavel;"
Step 2: Install PHP (8.5)
Section titled “Step 2: Install PHP (8.5)”# Add Ondřej Surý PHP PPA apt install -y lsb-release ca-certificates apt-transport-https software-properties-common add-apt-repository ppa:ondrej/php -y apt update
# Install PHP 8.5 and extensions apt install -y php8.5-cli \ php8.5-pgsql php8.5-pdo \ php8.5-mbstring php8.5-xml php8.5-curl \ php8.5-zip php8.5-bcmath php8.5-intl \ php8.5-redis php8.5-opcache
# Optional: Kafka extension (only if using Kafka transport) apt install -y php8.5-rdkafka# Add Ondřej Surý DPA apt install -y lsb-release ca-certificates apt-transport-https software-properties-common curlcurl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' apt update
# Install PHP 8.5 and extensions apt install -y php8.5-cli \ php8.5-pgsql php8.5-pdo \ php8.5-mbstring php8.5-xml php8.5-curl \ php8.5-zip php8.5-bcmath php8.5-intl \ php8.5-redis php8.5-opcache
# Optional: Kafka extension (only if using Kafka transport) apt install -y php8.5-rdkafka# Add Remi repository dnf install -y epel-release dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm
# Enable PHP 8.5 dnf module reset php -y dnf module enable php:remi-8.5 -y
# Install PHP 8.5 and extensions dnf install -y php php-cli \ php-pgsql php-pdo \ php-mbstring php-xml php-curl \ php-zip php-bcmath php-intl \ php-redis php-opcache php-process \ php-pecl-swoole
# Optional: Kafka extension (only if using Kafka transport) dnf install -y php-pecl-rdkafkaVerify PHP installation:
php -vphp -m | grep -E "pdo|pgsql|pcntl|posix"Step 3: Install Nginx
Section titled “Step 3: Install Nginx” apt install -y nginx dnf install -y nginxNginx site: the package installs /etc/nginx/conf.d/suricatavel.conf when there is none (it never overwrites
yours), from the same template Ansible uses:
- The host of
APP_URLis the server name; an IP address orlocalhostanswers on any name. - With an
httpsAPP_URLand the certificate and key in/etc/ssl/certs/suricatavel.crtand/etc/ssl/private/suricatavel.key, it serves HTTPS with HSTS and redirects port 80. Otherwise it serves plain HTTP and warns about it. - Requests up to 10 MB reach the application.
Install Nginx before the package, and configure APP_URL and the certificate first, so the site is right from the
start. Debian’s default site is also the default server on port 80: disable it
(rm /etc/nginx/sites-enabled/default) or the generated site is set aside as suricatavel.conf.rejected. To render
the site again (after changing APP_URL or adding the certificate), remove it and run
sh /usr/share/suricatavel/support/nginx/web-vhost-setup.sh as root.
The agent channel (port 8443, mutual TLS with Suricatavel’s internal CA) is not part of this site: the package
installs it as /etc/nginx/conf.d/suricatavel-agent-channel.conf. Do not add a server block on port 8443 to this site.
Step 4: Install Supervisor
Section titled “Step 4: Install Supervisor” apt install -y supervisor systemctl enable --now supervisor dnf install -y supervisor systemctl enable --now supervisordStep 5: Configure Suricatavel repository
Section titled “Step 5: Configure Suricatavel repository”# Import GPG keysudo mkdir -p /etc/apt/keyringscurl -fsSL https://repository.suricatavel.org/pubkey.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/suricatavel.gpg
# Add repository source (.sources)sudo tee /etc/apt/sources.list.d/suricatavel.sources << 'EOF'Types: debURIs: https://repository.suricatavel.org/Suites: stableComponents: suricatavelSigned-By: /etc/apt/keyrings/suricatavel.gpgEOF
# Update package cachesudo apt update# Create repository file tee /etc/yum.repos.d/suricatavel.repo > /dev/null << 'EOF'[suricatavel]name=Suricatavel Repositorybaseurl=https://repository.suricatavel.org/rpm/stable/enabled=1gpgcheck=1gpgkey=https://repository.suricatavel.org/pubkey.gpgEOF
# Update cache dnf makecacheStep 6: Install Suricatavel package
Section titled “Step 6: Install Suricatavel package” apt install -y suricatavel dnf install -y suricatavelWhat the package does:
- Creates system user
suricatavel(no login shell). - Installs the code to
/usr/share/suricatavel. - Creates the configuration, state, cache and log directories with their permissions (see below).
- Generates
APP_KEYand the Reverb credentials in/etc/suricatavel/.env. - Runs database migrations (if DB is accessible).
- Configures Supervisor workers.
Directory layout:
| Path | Contents | Owner |
|---|---|---|
/usr/share/suricatavel |
Code, with its package, icon and component caches already built | root, read-only for the application |
/etc/suricatavel/.env |
Configuration | suricatavel, mode 0600 |
/var/lib/suricatavel |
State: internal CA and channel certificate (certs/ca), secrets, SSH keys, backups; home of the suricatavel user |
suricatavel |
/var/cache/suricatavel |
Compiled views | suricatavel |
/var/log/suricatavel |
Logs of the application and its workers | suricatavel |
The configuration is read at every start: there is no configuration or route cache to rebuild after editing .env.
Step 7: Configure the application
Section titled “Step 7: Configure the application”Edit the environment file:
nano /etc/suricatavel/.envEssential configuration:
APP_NAME=SuricatavelAPP_ENV=productionAPP_DEBUG=falseAPP_URL=http://your-domain.com
DB_CONNECTION=pgsqlDB_HOST=127.0.0.1DB_PORT=5432DB_DATABASE=suricataveldbDB_USERNAME=suricatavelDB_PASSWORD=secret_password
# Optional: Kafka configuration (high throughput)#KAFKA_BROKERS=localhost:9092#KAFKA_CONSUMER_GROUP_ID=suricatavel
# Optional: HTTP configuration (simpler setup)#SURICATAVEL_AGENT_TRANSPORT=http#SURICATAVEL_AGENT_HTTP_ENDPOINT=http://your-domain.com/api/v1/events#SURICATAVEL_AGENT_HTTP_TOKEN=your-agent-token
# Optional: Redis for cacheREDIS_HOST=127.0.0.1REDIS_PASSWORD=nullREDIS_PORT=6379
# Mail configurationMAIL_MAILER=smtpMAIL_HOST=smtp.example.comMAIL_PORT=587MAIL_PASSWORD=your-smtp-passwordMAIL_ENCRYPTION=tlsIf the database was not accessible during installation, run migrations manually:
suricatavel deploy --migrateRebuild caches after configuration changes:
suricatavel maintenance cacheStep 8: Verify workers
Section titled “Step 8: Verify workers”The suricatavel package automatically configures Supervisor. Check the status:
suricatavel statusYou should see processes like web, worker, scheduler in RUNNING state. If Kafka is enabled, kafka should also be running.
Post-installation
Section titled “Post-installation”Initialize Suricatavel
Section titled “Initialize Suricatavel”Initialize the application:
suricatavel bootOr in non-interactive mode (creates default admin user):
suricatavel boot -sDefault credentials:
- Email:
[email protected] - Password:
123456
Agent channel
Section titled “Agent channel”Sensors register and send telemetry to port 8443/tcp. The package opens it in firewalld or ufw when one of
them is active; allow it in any router, NAT or cloud security list in front of the controller. The package creates the internal CA, issues the channel certificate
for the host of APP_URL (and of the Agent channel URL setting) and enables the Nginx server block; each upgrade
re-issues the certificate when one of those hosts is missing. Check that it listens on the controller:
ss -ltn | grep 8443curl -sk -o /dev/null -w '%{http_code}\n' https://localhost:8443/api/v1/agent/ca # 200When sensors use another name or address (a private IP, or a public one behind NAT), add it and reload Nginx:
suricatavel pki channel --host=controller.example.com --host=203.0.113.10systemctl reload nginxPass --missing to keep the hosts the certificate already covers and only re-issue it when it is missing or lacks any of the configured or --host entries (for example after changing APP_URL or Agent channel URL):
suricatavel pki channel --missing# or adding a new host while preserving existing ones:suricatavel pki channel --host=agent.example.com --missingsystemctl reload nginxIf you configured APP_URL after installing the package, run sh /usr/share/suricatavel/support/nginx/agent-channel-setup.sh
as root (or reinstall the package) so the certificate covers it.
Update Suricatavel
Section titled “Update Suricatavel”For zero-downtime updates with automatic rollback, use the CLI:
suricatavel updateThe update command will handle backup, maintenance mode, package updates, and migrations automatically.
For manual updates via package manager:
apt updateapt upgrade suricataveldnf upgrade suricatavelTimescaleDB updates
Section titled “TimescaleDB updates”When the system updates TimescaleDB (apt upgrade or dnf upgrade), the database keeps the previous version of the
extension until it is updated, and meanwhile its background jobs fail: the hourly aggregates stop refreshing and the
dashboard statistics freeze. Suricatavel status and the system health panel report it. Update the extension in each
database that uses it, as the first command of a new session (-X skips .psqlrc), with the workers stopped:
suricatavel workers stop allsudo -u postgres psql -X suricataveldb -c "ALTER EXTENSION timescaledb UPDATE;"suricatavel workers start allTroubleshooting
Section titled “Troubleshooting”See the quickstart guide for common issues.
Next steps
Section titled “Next steps”- Configure suricatavel-agent to stream events from sensor nodes
- Deploy IDS rules for detection
- Configure notifications for alerts
- Configure feeds for threat intelligence
- Review configuration options
For questions or issues, consult the FAQ or contribute.

