legal contact

autostarting cuckoo 2.0

To have your Cuckoo start automatically after reboot and watch it to be running/restarting, use the supervisord to help you with this job.

You can edit the supervisord.conf that installs with the cuckoo deployment. Use the below alterations as an excample of my additions.

logfile = /var/log/supervisor/supervisord.log
pidfile = /home/cuckoo/.cuckoo/supervisord/pidfile
user = root

serverurl = unix:///home/cuckoo/.cuckoo/supervisord/unix.sock

supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

file = /home/cuckoo/.cuckoo/supervisord/unix.sock

command = /home/cuckoo/venv/bin/cuckoo rooter
user = root
startsecs = 10
autorestart = true

command = /home/cuckoo/venv/bin/cuckoo -d -m 10000
user = cuckoo
startsecs = 30
autorestart = true

command = /home/cuckoo/venv/bin/cuckoo process p%(process_num)d
process_name = cuckoo-process_%(process_num)d
numprocs = 4
user = cuckoo
autorestart = true

command = /home/cuckoo/venv/bin/cuckoo web -H -p 8000
user = cuckoo
startsecs = 30
autorestart = true

command = /home/cuckoo/venv/bin/cuckoo api -H -p 8080
user = cuckoo
startsecs = 30
autorestart = true

programs = cuckoo-rooter, cuckoo-daemon, cuckoo-process, cuckoo-web, cuckoo-api

command = /home/cuckoo/venv/bin/python -m cuckoo.distributed.worker
user = cuckoo
autostart = false
autorestart = true
environment = CUCKOO_APP="worker",CUCKOO_CWD="/home/cuckoo/.cuckoo"

To bring it to live use:

service supervisor stop
cp supervisord.conf /etc/supervisor/conf.d/cukcoo.conf
service supervisor start

Check that everything went allright:

"ps aux" should give you:

cuckoo /home/cuckoo/venv/bin/python2 /home/cuckoo/venv/bin/cuckoo -d -m 10000
cuckoo /home/cuckoo/venv/bin/python2 /home/cuckoo/venv/bin/cuckoo process p0
cuckoo /home/cuckoo/venv/bin/python2 /home/cuckoo/venv/bin/cuckoo process p3
cuckoo /home/cuckoo/venv/bin/python2 /home/cuckoo/venv/bin/cuckoo process p2
root /home/cuckoo/venv/bin/python2 /home/cuckoo/venv/bin/cuckoo rooter
cuckoo /home/cuckoo/venv/bin/python2 /home/cuckoo/venv/bin/cuckoo web -H -p 8000
cuckoo /home/cuckoo/venv/bin/python2 /home/cuckoo/venv/bin/cuckoo process p1
cuckoo /home/cuckoo/venv/bin/python2 /home/cuckoo/venv/bin/cuckoo api -H -p 8080