Skip to content

Update for Ubuntu 22.04. Debian 11 #5

Description

@willema-terse

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions