Host your bot free 24/7 using amazon AWS service for a year.

  • @EchersDK @ScaniaTV

    Thank you again and thank you so much!

    I was using the right IP address, but I did not know to set up a firewall within the Instance’s settings. I added the new TCP rule with the correct ports and I can now access my Phantombot Control Panel from a web browser, even from my phone!

    Wonderful ^_^

  • Unfortunately, AMZ AWS does not provide support for their free basic service. When I follow the “How to Set up PhantomBot on CentOS7”, step #2 appears to work. But, when I type in “java -version” I get the following:

    [[email protected] ~]$ java -version
    java version "1.7.0_131"
    OpenJDK Runtime Environment (amzn- u131-b00)
    OpenJDK 64-Bit Server VM (build 24.131-b00, mixed mode)
    [[email protected] ~]$

    No matter what I do, I can’t get it to java 1.8, which is required. Any suggestions? :8ball: oh magic 8 ball what is your recommendation~~!

  • @Wolf solved all of my java update problems with the following command. i can only confirm it is in working order as of today: wget --no-cookies --header “Cookie: gpw_e24=xxx; oraclelicense=accept-securebackup-cookie;” “

  • @Wolf omfg the bot is in my channel and i can access the control panel. nirvana reached, altho not aaron hernandez nirvana.

  • @Wolf u can do running without acess them?

    I can config the AWS and start the bot via http://public.ip:25005/panel just only when i enter into the bot folder (execute

    I try to add bot as a service but seems doesnt work eventho i did exactly the tutorial said.

  • @miguel747 I can’t say at the moment, I’m away. I hate to be overly optimistic, I still have a lot to learn about phantombot. Since I’m new at this better take what I say with a grain of salt. I’m stoked about getting phantombot working though

  • forging ahead…trying to install phantombot as a service under AWS EC2… i would like to use “systemctl” in the following way:

    systemctl daemon-reload [Enter]

    anyone know how this might be done?

  • @Wolf systemctl not implemented in AMS EC2. Amazon Linux is based off of Enterprise Linux 6. Enterprise Linux OSes (Fedora/RedHat/CentOS) didn’t adopt systemd until EL7.

    AMZ AWS EC2 Linux: No current support for systemctl

    Summary: phantombot cannot currently be installed as a service under AWS EC2 Linux. there’s rumor that will change in 2018.

    well fine then, i’m gonna rent my own server for phantombot.

  • @Wolf I did exactly these instructions but the service doenst work either.

    I have to execute ./ and access them via http://public.ip:25005/panel

  • @Wolf u know what EC2 server phantombot can be implemented on 24/7?

  • @miguel747 like i said, i’m new to phantombot. and i’m certainly not linux savvy. that said, you could probly do it on your EC2 server. that should work, shouldn’t it? cheers m8!

  • Bot Developer

    Like Wolf has said, Amazon Linux doesn’t support systemctl or systemd. It uses sysinitv, which has been used for years in certain flavors of Unix. Any EC2 instance should be able to run PhantomBot 24x7, as long as it has enough memory available and CPU power. However, remember that you have only so many free credits to use before you have to start paying for service.

    Personally, while I don’t run PhantomBot in EC2, I do run several Tomcat instances for my company under t2.micro (dev/test) and t2.small (production) instances 24x7 and they run fine.

    If you are trying to keep PhantomBot running 24x7 and have it auto-restart, you might consider first adding a script to the sysinit system (/etc/init.d), and allow the system to auto-start the application. Another way you could do this is setup a cronjob that runs every few minutes with a script to see if PhantomBot is running based on the PID file it creates and then starting up the application if the application is not running as the PID in the PID file. This is basically what systemctl and systemd sort of do, you provide them with a PID file to monitor or a process name to watch, and they auto-restart as needed.

    Given the CPU and memory usage that PhantomBot has on my couple of Linux servers (one is in a data center, one at home), you probably want one with at least 1GB of memory to be safe, although you can probably get by with 512MB, depending upon what all features you enable and how busy your chat is. A busier chat requires more memory resources for PhantomBot to keep up with. A t2.nano provides 512MB of memory, the t2.micro provides 1GB of memory. So, if you have a small chat, and not enabling every feature, a t2.nano should be fine. If you have a fairly busy chat, I wouldn’t go any lower than a t2.micro with 1GB of memory.

  • Bot Developer

    Sample script to run from cron to check to see if PhantomBot is running as a service every minute and restart as needed:

    # Run this from crontab of the user that runs PhantomBot:
    # * * * * * /path/to/this/script/
    # Put the path to PhantomBot here
    # Put the name of your bot here that you use in botlogin.txt
    # Function : startPhantomBot
    # Purpose  : Starts PhantomBot via the script.
    function startPhantomBot {
        echo "Starting Bot"
        exit 0
    # Main Script
    if [[ ! -d ${PBOT_HOME} ]]; then
        echo "That directory does not exist: ${PBOT_HOME}"
        exit 1
    if [[ ! -e ${PBOT_HOME}/botlogin.txt ]]; then
        echo "Does not appear to be a PhantomBot installation: ${PBOT_HOME}"
        exit 1
    if [[ ! -x ${PBOT_HOME}/ ]]; then
        echo "Script not found/not executable: ${PBOT_HOME}/"
        exit 1
    if [[ ! -e ${PBOT_PID_FILE} ]]; then
    PID=$(cat ${PBOT_PID_FILE})
    PID_INFO=$(ps -p ${PID} | grep -c java)
    if [[ ${PID_INFO} -ne "1" ]]; then

    Copy/paste the script to, your home directory or the PhantomBot directory would be fine. Be sure to chmod +x after you create the file.

    Test it from the command line of course to make sure that you have the variables set correctly that I indicate that you need to set. Then you can have cron run the script every minute as indicated in the script. Yes, worst case, your bot is down for a minute if it dies or the instance reboots.

  • I personally use a windows 2012 instance for my AWS. Sure, I could use linux, but seeing as I’m only running one bot instance and it’s free for a year, that’s not something I’m worried about for awhile.

    The instance is only 1gb ram and on the t2.micro instance, which qualifies for the “free” tier.

    Haven’t had issues with it yet, but then again I’m hosting for a channel of 100-150 users peak. And setting up for a windows vps is like setting up for a windows pc, so most already know how to do it. The only additional step is adding the port rules to access it from outside the VPS, which some do as is.

  • @IllusionaryOne Thanks a mil for that contribution. I’m gonna get to work on implementing this.

  • @IllusionaryOne nice done. I will implement this and report later.

  • Bot Developer

    @miguel747 honestly if you use screen you can alt tab out of the window and close the console and the bot will run forever. usually try sudo screen then try launching the bot in that window

  • @PhantomIndex when i try to execute sudo screen with putty software it juss shows new screen and if i trey to close it says that sessions will close out.

  • @IllusionaryOne One question for now,

    Run this from the crontab of the user that runs PhantomBot:

    0,4,9,14,19,24,29,34,39,44,49,54 * * * * /path/to/this/script/

    I’m curious…will the above check every 5 minutes to see if PhantomBot is still executing in a normal fashion? And another question for anybody, how do you get the code section to appear for a post?

  • @IllusionaryOne THANKS U SO MUCH. i add this script into the crontab (root) and my bot runs ever. Nice job man.

Log in to reply

Looks like your connection to PhantomBot Community Forums was lost, please wait while we try to reconnect.