graylog2thehive icon indicating copy to clipboard operation
graylog2thehive copied to clipboard

Update for Ubuntu 22.04. Debian 11

Open willema-terse opened this issue 2 years ago • 0 comments

git clone https://github.com/ReconInfoSec/graylog2thehive.git /opt/graylog2thehive

Add a run_as user/group ie: myusername

root@thehive:/opt/graylog2thehive# adduser myusername root@thehive:/opt/graylog2thehive# chown myusername:myusername /opt/graylog2thehive/ -R

Update the .service file with the local username/group, and change to python3

cat init.d/graylog2thehive.service [Unit] Description=graylog2thehive After=multi-user.target

[Service] Type=idle Environment="HIVE_SECRET_KEY=blahblahblah" User=myusername Group=myusername

WorkingDirectory=/opt/graylog2thehive ExecStart=/usr/bin/python3 app.py runserver

StandardOutput=journal

StandardError=journal

[Install] WantedBy=multi-user.target root@thehive:/opt/graylog2thehive# root@thehive:/opt/graylog2thehive#cp init.d/graylog2thehive.service /etc/systemd/system/graylog2thehive.service

Change the requirements file to look like this, and run the pip update (if needed, apt install python3-pip):

thehive4py==1.6.0 requests #json #logging flask

root@thehive:/opt/graylog2thehive# pip install -r requirements.txt

Then tell linux the world has changed, and start your service.

root@thehive:/opt/graylog2thehive# systemctl daemon-reload root@thehive:/opt/graylog2thehive# systemctl enable graylog2thehive.service root@thehive:/opt/graylog2thehive# systemctl start graylog2thehive.service

willema-terse avatar Nov 04 '23 20:11 willema-terse