I had this same issue. You can’t just run selenium, you also need to hook it up to a display. Since digitalocean doesn’t have physical displays hooked up, something like Xvbf (X server virtual frame buffer) is a good option.
Here are the setup instructions I followed: http://www.installationpage.com/selenium/how-to-run-selenium-headless-firefox-in-ubuntu/
Hope that helps!