Install MISP 3.0 on Rocky Linux
This guide installs the MISP 3.0_wip branch on a clean Rocky Linux 9 or 10 server. It uses Apache with PHP-FPM, MariaDB, Redis or Valkey, and Supervisor. The checkout lives in /var/www/MISP and runs as the distribution’s apache account.
3.0_wip is the MISP 3.0 development branch. Evaluate it on an isolated server before deployment. For an existing MISP 2.5 database, follow the offline upgrade guide.
The package and application checks used Rocky Linux 9.9 and 10.3 x86_64 containers with services started directly. They used MISP 3.0_wip commit cd8a4f41. Verify systemd startup, firewall rules, and SELinux enforcement on the target host.
Prepare the host and install packages
Use a current Rocky Linux 9 or 10 minor release, a sudo account, a DNS name, and a trusted TLS certificate and key for that name. Keep web access restricted to administrators until you change the bootstrap password.
Enable CRB and EPEL for your Rocky Linux release. EPEL supplies Supervisor and the fuzzy-hash development library. These commands use Rocky Linux’s BaseOS, AppStream, CRB, and Extras repositories. Rocky Linux repositories · Fedora EPEL setup
sudo dnf upgrade --refresh
sudo dnf install dnf-plugins-core
sudo dnf config-manager --set-enabled crb
sudo dnf install epel-release
sudo dnf repolist| Component | Rocky Linux 9 | Rocky Linux 10 |
|---|---|---|
| PHP | Enable the AppStream php:8.3 stream |
Install the distribution’s PHP packages |
| MariaDB | Enable the AppStream mariadb:10.11 stream |
Install mariadb-server |
| Cache and queues | redis package and service |
valkey package and service |
MISP requires MariaDB 10.11 or later for this procedure. On Rocky Linux 10, MISP connects to Valkey through the PHP Redis extension and uses the same Redis settings. MISP software requirements
On Rocky Linux 9, select the streams before installing PHP or MariaDB.
sudo dnf module enable php:8.3 mariadb:10.11
sudo dnf install mariadb-server redisOn Rocky Linux 10, install MariaDB and Valkey.
sudo dnf install mariadb-server valkeyOn both releases, install the common dependencies and check PHP’s database and cache extensions. The /usr/bin/curl dependency also accepts curl-minimal on minimal installations.
sudo dnf install git /usr/bin/curl ca-certificates openssl unzip file-libs gnupg2 procps-ng iproute \
httpd mod_ssl php-cli php-fpm php-mysqlnd php-mbstring php-xml \
php-gd php-intl php-bcmath php-pecl-zip php-pecl-redis6 \
python3.12 python3.12-pip python3.12-devel gcc ssdeep-devel \
policycoreutils-python-utils supervisor
php --version
php --ri pdo_mysql
php --ri redis
mariadb --versionSet a shared PHP memory limit before running the initialization commands. Both the CLI and PHP-FPM load /etc/php.d/99-misp.ini. A 2 GiB limit gives the initial definitions import and larger MISP jobs room to run. MISP RPM installation
sudo tee /etc/php.d/99-misp.ini > /dev/null <<'INI'
memory_limit = 2048M
INI
php -r 'echo ini_get("memory_limit"), PHP_EOL;'
sudo php-fpm -i | grep '^memory_limit 'Both checks should show 2048M. If the apache PHP-FPM pool sets memory_limit separately, match the limit in the pool configuration as well. Inspect the pool with sudo php-fpm -tt.
Check out MISP and install its dependencies
Install Composer at /usr/local/bin/composer using the checksum-verified installer procedure. Run Git, Composer, and the Python environment as apache. Composer installation and verification
sudo install -d -o apache -g apache -m 0755 /var/www/MISP
sudo install -d -o apache -g apache -m 0750 /var/lib/misp \
/var/lib/misp/composer /var/lib/misp/attachments
sudo -u apache git clone --branch 3.0_wip --depth 1 \
--recurse-submodules --shallow-submodules \
https://github.com/MISP/MISP.git /var/www/MISP
sudo -u apache git -C /var/www/MISP rev-parse HEAD
sudo -u apache env COMPOSER_HOME=/var/lib/misp/composer \
/usr/local/bin/composer --working-dir=/var/www/MISP/app \
install --no-dev --no-interaction --prefer-dist
sudo -u apache env COMPOSER_HOME=/var/lib/misp/composer \
/usr/local/bin/composer --working-dir=/var/www/MISP/app \
check-platform-reqs --no-dev
sudo -u apache python3.12 -m venv /var/www/MISP/venv
sudo -u apache env HOME=/var/lib/misp /var/www/MISP/venv/bin/python \
-m pip install -r /var/www/MISP/requirements.txt
sudo -u apache /var/www/MISP/venv/bin/python -m pip checkInitialize MariaDB and MISP
Create /etc/my.cnf.d/90-misp.cnf, owned by root with mode 0644, to bind MariaDB to loopback.
[mariadb]
bind-address=127.0.0.1Keep the cache listener on loopback and protected mode enabled. Use systemctl cat redis.service on Rocky Linux 9 or systemctl cat valkey.service on Rocky Linux 10 to locate the packaged configuration file. Start MariaDB and the cache service for your release.
sudo systemctl enable --now mariadb# Rocky Linux 9
sudo systemctl enable --now redis
redis-cli ping# Rocky Linux 10
sudo systemctl enable --now valkey
valkey-cli pingAfter the cache returns PONG, open a MariaDB administrator session over the local socket with history disabled.
sudo env MYSQL_HISTFILE=/dev/null mariadb --protocol=socketCreate the database and a user for the application’s loopback TCP connection. Replace the placeholder with a unique database password.
CREATE DATABASE misp
CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci;
CREATE USER 'misp'@'127.0.0.1' IDENTIFIED BY 'REPLACE_WITH_DATABASE_PASSWORD';
GRANT ALL PRIVILEGES ON misp.* TO 'misp'@'127.0.0.1';
EXIT;Import the schema and copy the application configuration templates from the same checkout.
sudo mariadb --protocol=socket misp < /var/www/MISP/INSTALL/MARIADB.sql
for name in bootstrap core database config; do
sudo install -o apache -g apache -m 0640 \
"/var/www/MISP/app/Config/$name.default.php" "/var/www/MISP/app/Config/$name.php"
doneIn /var/www/MISP/app/Config/database.php, set host to 127.0.0.1, login to misp, and password to the database password. Keep database set to misp.
Update the corresponding keys under MISP in /var/www/MISP/app/Config/config.php, using your DNS name and organization.
'baseurl' => 'https://misp.example.org',
'external_baseurl' => 'https://misp.example.org',
'org' => 'Your organization',
'osuser' => 'apache',
'python_bin' => '/var/www/MISP/venv/bin/python',
'attachments_dir' => '/var/lib/misp/attachments',
'redis_host' => '127.0.0.1',
'background_jobs' => false,Generate an instance salt with openssl rand -hex 32 and set Security.salt in the same file. Run the initialization commands as apache and store the bootstrap API key in a root-only file.
sudo -u apache /var/www/MISP/app/Console/cake Admin runUpdates
sudo sh -c 'umask 077
runuser -u apache -- /var/www/MISP/app/Console/cake User init \
> /root/misp-bootstrap-api-key'
sudo -u apache /var/www/MISP/app/Console/cake Admin schemaDiagnosticsConfirm that schema diagnostics report zero pending and failed migrations.
Set up the instance signing key
Generate an OpenPGP signing key as apache for protected synchronization and signed notifications. Use a private Bash session and replace misp@example.org with the instance’s signing address.
sudo install -d -o apache -g apache -m 0700 /var/lib/misp/gnupg
gpg_email=misp@example.org
read -r -s -p 'Instance GnuPG passphrase: ' gpg_passphrase
printf '\n'
printf '%s\n' "$gpg_passphrase" | sudo -u apache /usr/bin/gpg \
--homedir /var/lib/misp/gnupg --batch --pinentry-mode loopback --passphrase-fd 0 \
--quick-generate-key "$gpg_email" ed25519 sign never
unset gpg_passphrase
sudo -u apache /usr/bin/gpg --homedir /var/lib/misp/gnupg --armor \
--output /var/www/MISP/app/webroot/gpg.asc --export "$gpg_email"
sudo -u apache /usr/bin/gpgconf --homedir /var/lib/misp/gnupg --kill gpg-agentStopping the agent from the setup session lets PHP-FPM start it in the web service’s SELinux context. In app/Config/config.php, set GnuPG.homedir to /var/lib/misp/gnupg, GnuPG.email to the signing address, and GnuPG.password to the passphrase. Keep GnuPG.binary set to /usr/bin/gpg and leave GnuPG.sign enabled for signed email. MISP encrypts outgoing OpenPGP email using recipients’ public keys. Include the instance’s private key and configuration in protected backups. Instance and user keys
Serve HTTPS with SELinux enforcing
Apply persistent SELinux labels to the paths the web process writes to. The application source under /var/www uses the distribution’s web content policy.
sudo semanage fcontext -a -t httpd_sys_rw_content_t \
'/var/www/MISP/app/(Config|tmp|files/scripts/tmp)(/.*)?'
sudo semanage fcontext -a -t httpd_sys_content_t '/var/lib/misp'
sudo semanage fcontext -a -t httpd_sys_rw_content_t \
'/var/lib/misp/attachments(/.*)?'
sudo semanage fcontext -a -t httpd_var_run_t '/var/lib/misp/gnupg(/.*)?'
sudo restorecon -F /var/lib/misp
sudo restorecon -RF /var/www/MISP /var/lib/misp/attachments /var/lib/misp/gnupg
sudo setsebool -P httpd_can_network_connect_db on
sudo setsebool -P httpd_can_network_connect onCheck getsebool httpd_use_gpg on the host. The stock Rocky Linux targeted policy reports httpd_use_gpg --> off. With that setting, PHP-FPM’s httpd_t domain can run GnuPG and its agent, and the httpd_var_run_t label lets the agent create Unix sockets in its home directory. With httpd_enable_cgi on, enabling httpd_use_gpg moves GnuPG into gpg_web_t, which lacks the agent execution and socket creation permissions this setup uses.
The database boolean permits the web process to connect to MariaDB. The network boolean permits other outbound connections from the web process, including Redis or Valkey and Supervisor. Apply your site’s network policy to the services MISP should reach. SELinux administration
Use the distribution’s Apache PHP-FPM integration and the apache pool. In /etc/httpd/conf.d/ssl.conf, replace the example TLS virtual host and keep the global TLS settings, including Listen 443 https. Use your hostname and the paths to its certificate chain and private key.
<VirtualHost *:443>
ServerName misp.example.org
DocumentRoot /var/www/MISP/app/webroot
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/misp-fullchain.pem
SSLCertificateKeyFile /etc/pki/tls/private/misp.key
<Directory /var/www/MISP/app/webroot>
Options -Indexes
AllowOverride FileInfo
Require all granted
DirectoryIndex index.php
</Directory>
</VirtualHost>The checkout’s app/webroot/.htaccess provides the rewrite and API authorization rules. Check that the default FPM pool listens on /run/php-fpm/www.sock and allows access by apache.
sudo restorecon -v /etc/pki/tls/certs/misp-fullchain.pem /etc/pki/tls/private/misp.key
sudo php-fpm -t
sudo httpd -t
sudo systemctl enable --now php-fpm httpdIf you use firewalld, check the active zones with sudo firewall-cmd --get-active-zones and allow the HTTPS service in the zone used for administration. Sign in over HTTPS as admin@admin.test with the bootstrap password admin. Change the password on first login before granting other clients access.
Start the background workers
Configure Supervisor’s authenticated loopback API in /etc/supervisord.conf. Add or update the following section with a dedicated password, for example one generated with openssl rand -hex 24.
[inet_http_server]
port=127.0.0.1:9001
username=supervisor
password=REPLACE_WITH_SUPERVISOR_PASSWORDCreate one worker for each queue and a separate scheduler.
{
printf '%s\n' '[group:misp-workers]' \
'programs=default,email,cache,prio,update,scheduler'
for worker in default email cache prio update scheduler; do
if [ "$worker" = scheduler ]; then
cake_command=scheduler_worker
else
cake_command="start_worker $worker"
fi
cat <<EOF
[program:$worker]
command=/var/www/MISP/app/Console/cake $cake_command
directory=/var/www/MISP
user=apache
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/var/www/MISP/app/tmp/logs/$worker-worker.log
EOF
done
} | sudo tee /etc/supervisord.d/misp-workers.ini > /dev/nullIn app/Config/config.php, set SimpleBackgroundJobs.redis_host and SimpleBackgroundJobs.supervisor_host to 127.0.0.1. Set supervisor_user and supervisor_password in that section to match Supervisor and keep its port at 9001. Set MISP.background_jobs to true.
sudo chmod 0600 /etc/supervisord.conf
sudo systemctl enable --now supervisord
sudo systemctl reload php-fpm
sudo supervisorctl status 'misp-workers:*'Once all six processes report RUNNING, check worker status and wait for a test job to complete in MISP. Background worker checks
Verify the installation
- Run
ss -lntto confirm that MariaDB, Redis or Valkey, and Supervisor are bound to loopback. - Check the HTTPS certificate and sign-in from a client that trusts your CA, then create and find a synthetic event with Your organisation only distribution.
- Check that GnuPG reports OK under Administration → Server Settings & Maintenance → Services with SELinux enforcing before using protected synchronization or signed mail. System health checks
- Verify a completed background job, then review the site organization, distribution defaults, mail settings, and backup and restore procedures before enabling sync or scheduled feeds. First steps after login
For a 2.5 upgrade on Rocky Linux, run the migration’s Cake commands as apache and restart php-fpm after the migration.
@misc{themispprojectcontributors2026install,
author = {{The MISP Project \& Contributors}},
title = {Install MISP 3.0 on Rocky Linux},
year = {2026},
month = {nov},
howpublished = {\url{https://www.circl.lu/doc/misp/install-rocky/index.html}},
url = {https://www.circl.lu/doc/misp/install-rocky/index.html},
urldate = {2026-11-29},
note = {In: MISP User Guide. Accessed: Nov. 29, 2026}
}@misc{themispprojectcontributors2026misp,
author = {{The MISP Project \& Contributors}},
title = {MISP User Guide},
year = {2026},
month = {nov},
isbn = {978-99987-458-0-3},
howpublished = {\url{https://www.circl.lu/doc/misp/}},
url = {https://www.circl.lu/doc/misp/},
urldate = {2026-11-29},
note = {Accessed: Nov. 29, 2026}
}