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.4 or 8.5)
Section titled “Step 2: Install PHP (8.4 or 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.4 and extensions apt install -y php8.4-cli \ php8.4-pgsql php8.4-pdo \ php8.4-mbstring php8.4-xml php8.4-curl \ php8.4-zip php8.4-bcmath php8.4-intl \ php8.4-redis php8.4-opcache
# Optional: Kafka extension (only if using Kafka transport) apt install -y php8.4-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.4 and extensions apt install -y php8.4-cli \ php8.4-pgsql php8.4-pdo \ php8.4-mbstring php8.4-xml php8.4-curl \ php8.4-zip php8.4-bcmath php8.4-intl \ php8.4-redis php8.4-opcache
# Optional: Kafka extension (only if using Kafka transport) apt install -y php8.4-rdkafka# Add Remi repository dnf install -y epel-release dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm
# Enable PHP 8.4 dnf module reset php -y dnf module enable php:remi-8.4 -y
# Install PHP 8.4 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 nginxConfigure Nginx for Suricatavel:
Create /etc/nginx/sites-available/suricatavel (or conf.d/suricatavel.conf on RHEL):
server { listen 80; listen [::]:80; server_name your-domain.com; root /var/opt/suricatavel/public;
index index.php; error_page 404 /index.php;
# Main application handling through Octane (Swoole) location / { proxy_pass http://127.0.0.1:8089; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_set_header Scheme $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }
# Reverb WebSocket server location /apps/ { proxy_pass http://127.0.0.1:8080; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }
location ~ /\.(?!well-known).* { deny all; }}Enable the site:
ln -s /etc/nginx/sites-available/suricatavel /etc/nginx/sites-enabled/ nginx -t systemctl restart nginx nginx -t systemctl restart nginxStep 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 keycurl -fsSL https://suricatavel.org/suricatavel.gpg | gpg --dearmor -o /etc/apt/keyrings/suricatavel.gpg
# Add repositoryecho "deb [signed-by=/etc/apt/keyrings/suricatavel.gpg] https://repository.suricatavel.org stable main" | tee /etc/apt/sources.list.d/suricatavel.list > /dev/null
# Update package cache 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://suricatavel.org/suricatavel.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 application files to
/var/opt/suricatavel. - Creates working directories with proper permissions.
- Generates
APP_KEYfor Laravel. - Runs database migrations (if DB is accessible).
- Configures Supervisor workers.
- Builds Laravel caches.
Step 7: Configure the application
Section titled “Step 7: Configure the application”Edit the environment file:
nano /var/opt/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
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 suricatavelTroubleshooting
Section titled “Troubleshooting”See the Quickstart Guide for common issues.
Next steps
Section titled “Next steps”- Configure agents to send events
- 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.