How-To: Install Dradis-CE 3 on Ubuntu Server 16.04

I wasted way too much time trying to figure out how to install Dradis-CE 3 from GitHub on a vanilla Ubuntu Server install. I finally got it all worked out and made a step-by-step guide.

###note: make sure to run all commands as root.

##comment out lines beginning with “deb cdrom” in /etc/apt/sources.list (may not be necessary)
nano /etc/apt/sources.list
apt-get update
#install ssh
apt-get install -y openssh-server
#now is when you would connect via ssh, if you want. after you’re reconnected, run the following
apt-get install -y git redis-server ruby ruby-dev gcc make zlib1g-dev libsqlite3-dev libmysqlclient-dev g++
cd /opt
###note: when I view this post there is a “1” added to the end of the git url. be sure not to include that
git clone GitHub - dradis/dradis-ce: Dradis Framework: Colllaboration and reporting for IT Security teams
cd /opt/dradis-ce
ruby bin/setup
##note: if you get an error when running ‘ruby bin/setup’ about the dradis-html_export plugin, re-run ‘ruby bin/setup’
##start the server to auto-create necessary directories
bundle exec rails server -b 0.0.0.0
##kill the process by pressing Control-C
##perform the following to edit the Nessus plugin template file to include severity
nano /opt/dradis-ce/templates/plugins/nessus/report_item.template
##add the following contents to report_item.template
#[Severity]#
%report_item.severity%

##create systemd service for server
nano /lib/systemd/system/dradis-ce.service
##add the following contents to dradis-ce.service
[Unit]
Description=Service for starting Dradis-CE

[Service]
Type=simple
WorkingDirectory=/opt/dradis-ce
ExecStart=/usr/local/bin/bundle exec rails server -b 0.0.0.0

[Install]
WantedBy=multi-user.target

##create systemd service for worker
nano /lib/systemd/system/dradis-ce-worker.service
##add the following contents to dradis-ce-worker.service
[Unit]
Description=Service for starting Dradis-CE worker

[Service]
Type=simple
WorkingDirectory=/opt/dradis-ce
ExecStart=/usr/local/bin/bundle exec rake resque:work

[Install]
WantedBy=multi-user.target

##enable the services
systemctl enable dradis-ce.service
systemctl enable dradis-ce-worker.service

##start the services
systemctl start dradis-ce.service
systemctl start dradis-ce-worker.service

##using a web browser, nagivate to the setup page by using the IP address or hostname of the system on port 3000
###note: if you get an error page make sure you’re going to the /setup page. for some reason it doesn’t appear to work using the hostname and navigating to the root before setup is completed.

http:// IP or hostname:3000/setup

##done!

1 Like

Hey @agreenbhm,

This is amazing, thanks for sharing!

Daniel

This is a great guide. Followed and all worked. Thanks very much.

Just one question: Nothing on the configuration page, is this because there is nothing to configure?
Mark

Thanks for the feedback. Glad it worked! I’m not sure the answer to your configuration page question, but I do know on mine it is also blank. When I ran Dradis from the package (rather than Git) it also was blank, so I’m guessing you’re correct about there not being anything to configure. @etd will need to confirm.

The configuration page is for add-ons that require configuration (e.g. your Mediawiki host, or your VulnDB credentials). If no add-ons that require configurations are loaded into the framework, nothing will show up.

Hope that makes sense,
Daniel

Etd
How would you add a add-on like mediawiki, is there a guide for Dradis-CE 3?

You’ll need to comment/uncomment lines in your Gemflie.plugins to disable/enable add-ons. Check out this quick guide for more details: Enable/Disable Add-ons | Dradis Framework
Any questions? Just let us know!

Thanks. This was very helpful

Hi, While I was installing got below error message. Any advice? Thank you for your time.

Bundler could not find compatible versions for gem “RedCloth”:
In snapshot (Gemfile.lock):
RedCloth (= 4.3.1)

In Gemfile:
RedCloth (= 4.3.1)

dradis-html_export (~> 3.9) was resolved to 3.10.0, which depends on
  RedCloth (~> 4.3.2)

Sincerely,
Sasi

Found a solution myself. commented on below parameter. ie. "gem ‘RedCloth’, ‘4.3.1’, require: ‘redcloth’ " in /opt/dradis-ce/Gemfile

TODO: Traveling Ruby - DANGER, DANGER: this version has an issue, but it’s

the last one supported by Traveling Ruby

gem ‘RedCloth’, ‘4.2.9’, require: ‘redcloth’

#gem ‘RedCloth’, ‘4.3.1’, require: ‘redcloth’

Could some comment on the above parameter change effects? Is it fine?

Hi @sboddepalli thanks for reaching out with this and I’m sorry about the delay! The technical team just merged a PR that should resolve this: update redcloth gem by dormi · Pull Request #340 · dradis/dradis-ce · GitHub. Can you give that a try and keep us posted?

Thank you very much. It is now working for me.

Another question: Could you please let us know, how to configure ssl/ self signed certs for dradis in GNU/ Linux machines?

@ agreenbhm, Your contribution is really appreciated. Thank you very much.

I believe this was answered and resolved here: Secure Connection Failed. Wanted to leave the link here in case others come across this thread in the future!

Trying to install Dradis-CE on Linux Mint 19.1, and it’s failing. Did the following:

sudo apt-get install -y git redis-server ruby ruby-dev gcc make zlib1g-dev libsqlite3-dev libmysqlclient-dev g++

cd /opt

sudo git clone […]GitHub - dradis/dradis-ce: Dradis Framework: Colllaboration and reporting for IT Security teams

cd /opt/dradis-ce

sudo ruby bin/setup

# got a couple of “can’t find gem bundler” errors, failed

# Support said do

sudo bundle install --path /opt/dradis-ce

# it failed, Gemfile not found, but that dir does contain a Gemfile

# and Support sends me to the community forum, I guess they can’t answer me

# tried “sudo bundle install --path /opt/dradis-ce” again today, get:
Traceback (most recent call last):
2: from /usr/local/bin/bundle:23:in <main>' 1: from /usr/lib/ruby/2.5.0/rubygems.rb:308:in activate_bin_path’
/usr/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe’: can’t find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)
# same if I run it without the sudo

Hi @BillDietrich, don’t worry, we’ll help you out here! I just wanted to move this to the forum so that others who run into the same error can find the debugging.

Is this the first ruby app you’re launching on your local system? There are some dependencies that we just need to get running for you. That bundle install command is assuming that you have the bundler gem installed but your output says:

can’t find gem bundler

Does the following work for you?

$ gem install bundler

Yes, first time with Ruby on my system.

sudo gem install bundler

did work, said:

Successfully installed bundler-2.0.1

1 gem installed

:raised_hands: Progress! Now, could you try the bundle install and bin/setup commands again? We’re basically following these instructions now: Installing Dradis from Git | Dradis Framework

$ bundle install --path /opt/dradis-ce

Could not locate Gemfile

$ ls -l /opt/dradis-ce/Gemfile

-rw-r–r-- 1 root root 5794 Jan 24 10:21 /opt/dradis-ce/Gemfile