Raspberry Pi 3, Ubuntu Mate and PhantomBot


So, interestingly, I got an error like yours after I ran that command, but then I also ran apt-get update and apt-get dist-upgrade and then that seemed to resolve itself.

It might be there are some out of sync items in your installation, at least, that is my guess at this point.


One more google recommendation is that Pi does not have the up to date NSS (security) library for the latest version of OpenJDK 8. I did notice my version of Debian uses Open JDK 1.8.0_40, and you say you are at the latest version.

I was having one more error with certificates for some websites, the recommendation was to go to the Oracle version of the JDK. I did that and it works fine now.


Finally, I don’t have your version of Linux running on my Pi, but these instructions seem reasonable:


It took me 4 hours to reply because of this restriction :man_facepalming:

I am not married to Ubuntu Mate, that’s just what ended up being the most stable version I have tried so far. I’ve tried Ubuntu Core 16, Ubuntu Classic Server 16.04 (which has major internal problems) and finally Ubuntu MATE 16.04.2 from this offering.

Where did you get your distro of Debian?

I won’t grab Docker :yum:

I used the instructions from the old PB forum for Linux/Ubuntu setup guide which has been moved here, but that post has been modified to where I don’t see the same instruction command anymore (I’ve noticed since I’ve used that guide for the past 3 weeks trying to get this to work :persevere:). So it was a Terminal command that retrieved and unzipped the OpenJDK. I did follow your instructions and updated Ubuntu and installed Java using apt-get but I don’t think it helped my connectivity issue. You said you have success with Debian running PhantomBot, may I please get a link for that and I’ll just go ahead and start over?

Thanks again for all your help!


This is a newer version than mine, but this is where I got mine from:

As root I installed:
apt-get install oracle-java8-jdk

Then ran:
update-alternatives --config java

And selected the Oracle JDK as my Java.

Ubuntu is based on Debian, so everything else you have done would probably transfer over, to the best of my knowledge.

Sorry about the restrictions on the board, I will talk to Zelakto about that, he is the primary admin.


Lost Connection to Twitch

Thank you for the link! You know, what I may do is burn an iso of what I have on my SD card now. Then I’ll flash the Raspbian image on the SD and see how it goes. Hopefully, it is what finally works. If not, I’ll have a backup of how it is now.

Yes, the board restriction was annoying because I saw your replies come in but I was trapped behind the barrier to respond immediately. :oncoming_police_car::policeman: Thanks for all your attention on this and I hope others can get a ton of learning out of it if they choose to try RPi as a PB server.


Sounds like a good plan, working with a Pi is like carpentry, measure twice (backup) and cut once (format). :smiley:

I have used the RPi some, but I admit, haven’t used it as much as I did a year ago when patching for small bugs here and there and testing a few things out. I should probably use mine more.



I remember I also had problems trying to set up PhantomBot on Raspbian (Pi 3), I had a topic on the old forum and the problem was solved by simply updating the openjdk version to the _111 version (the latest at that time), downloading it from the Oracle website as the raspberry’s package list only contained releases until _40 (I don’t know if they updated it now). Since then I had no problems with it, but now I’m using the bot with w10 so I can’t tell you if it still works on the pi with the newest versions


Thank the Maker! It works!

So far, I have confirmation that PhantomBot is connected to Twitch chat, which is a huge step!

I installed RASPBIAN JESSIE LITE from the link you provided above.
I installed Java using apt-get install oracle-java8-jdk
once all that was done, I ran apt-get update and apt-get dist-upgrade
then I followed the guide posted here to setup PhantomBot and all seems good.
I still need to move over my old PhantomBot settings and hopefully, that doesn’t break anything.

Yes, I like that analogy of the carpenter. I definitely have learned a lot of lessons in starting over from all this but I feel it is worth the knowledge gained!

Thanks again for walking me through this! Cheers!


Very glad to hear it is working!! Sorry you had to jump through a couple of hoops though!


Hello again @IllusionaryOne, maybe Raspbian is more thorough than other versions I’ve installed on the RPi, but when I was trying to write new instructions to this service I got an error…

sudo visudo

botuser ALL=NOPASSWD: systemctl start phantombot, systemctl stop phantombot, systemctl restart phantombot

>>> /etc/sudoers: syntax error near line 28 <<<
What now?

And the choices it gives me to edit the file again are

(e)dit sudoers file again
e(x)it without saving changes to sudoers file
(Q)uit and save changes to sudoers file (DANGER!)

Do you know why this code on 28 would be syntax erroring?


Can I see the whole file? That line looks ok to me on first glance, I wonder if line 28 is something different. The only thing I would do differently is provide the full path to systemctl (/usr/bin/systemctl) but I do not think that would cause an error.


Sure! I think this is all of it:

# This file MUST be edited with the 'visudo' command as root.
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
# See the man page for details on how to write a sudoers file.
Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:$

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d
botuser ALL=NOPASSWD: systemctl start phantombot, systemctl stop phantombot, systemctl restart phantombot


Looks reasonable, is ‘botuser’ a user on your machine, or does it have a different name, like ‘phantombot’ ? Also, use the full path to systemctl, /usr/bin/systemctl.


Yes, botuser is the name of the other account. I just followed the instructions to the letter.

Where do I place the /usr/bin/systemctl in this file? Sorry, I don’t know enough about the language to know where that goes. Thanks!


I reproduced, your line doesn’t work, but when I add the full path it accepts it:

botuser ALL=NOPASSWD: /bin/systemctl start phantombot, /bin/systemctl stop phantombot, /bin/systemctl restart phantombot

sudo wants the full path so that someone can’t just create a program named ‘systemctl’ and do whatever they want as root. Instead, the full path is required for security.


Oh wow! Thank you for clearing that up! I appreciate the explanation too. It helps me understand the system a bit better.

You know, I just thought that even though the Ubuntu 16.04 LTS Setup Guide is super helpful, it needs some revisions to solve these issues in the setup. Maybe @Zelakto can help with that?


I updated the visudo instructions.

I can look at taking the notes from here at some point and making a suggested Pi guide using Raspbian.



Thank you! I’m sure you all are busy and I appreciate your help. And as far as I know, Raspbian is the only version I have tried that works with my RPi 3 with no bugs or kernel issues. As a headless setup note, SSH needs to be enabled while connected to a monitor using raspi-config after the initial boot/login, because headless setup will not work without it turned on.



This topic was automatically closed after 30 days. New replies are no longer allowed.