Table of Contents
Was this article helpful?
Try Vultr Today with

$50 Free on Us!

Want to contribute?

You could earn up to $600 by adding new articles.

Beanstalkd and Beanstalk Console on Ubuntu 14

Last Updated: Tue, Apr 14, 2015
Programming Server Apps Ubuntu
Archived content

This article is outdated and may not work correctly for current operating systems or software.


Beanstalkd is a work queue server that runs time-consuming tasks asynchronously. It comes in very handy if you manage or develop an application (web, mobile, etc.) that needs to perform time-consuming tasks (like sending emails), and you don't want your users to wait while the task is running. You can queue tasks with Beanstalkd and have your application move on to the next operation.

Beanstalk Console is a web admin interface for Beanstalkd that was written in PHP. It provides a friendly interface that you can use to see all the jobs and their current states (urgent, ready, reserved, delayed and buried).


  1. Spin up an Vultr server instance running Ubuntu 14.10 x64 and SSH into the server after it's done provisioning.

  2. Install Beanstalkd.

    sudo apt-get update
    sudo apt-get install -y beanstalkd
  3. Install Beanstalk Console by using PHP's package manager, Composer.

    sudo apt-get install -y php5 php5-cli
    curl -sS | php
    mv composer.phar /usr/local/bin/composer
    composer create-project ptrofimov/beanstalk_console -s dev /app/beanstalk-console
    # Note that "/app/beanstalk-console" can be any directory you choose

Running Beanstalk

  1. Make sure that Beanstalkd is running.

    sudo service beanstalkd start
  2. Start Beanstalk Console by going to the directory where it was installed and starting a PHP server instance.

    cd /app/beanstalk-console
    php -S [vultr-instance-ip]:7654 -t public
    # *where **[vultr-instance-ip]** is the IP address of the Vultr instance you spun up or a domain name pointing to it*
  3. Navigate to http://[vultr-instance-ip]:7654. You will be greeted with a "Hello!" screen that contains an "Add Server" button. Click the button and accept the defaults (localhost:11300).

One thing to note here is that you don't have to use PHP with Beanstalk. Beanstalk is technology agnostic. Also, there are two sides to a queue - adding jobs, and removing jobs. Removing jobs is usually done by what we refer to as a "worker process". If your technology stack uses PHP, you can use Pheanstalk to perform both tasks.


A queue server that can run jobs in the background asynchronously is a must considering users expect things to happen instantly with your application. Beanstalkd is a tried and tested work queue server that can reduce latency issues with your applications, thereby causing your users to have richer experiences.

Want to contribute?

You could earn up to $600 by adding new articles.