I hope the title intrigued you! The title is an oldie and inspired by a popular 1996 article on creating a buffer overflow. The author, Elias Levy, wrote a very detailed and useful how-to that I will hope to emulate here.

That said, today’s how-to is not about a buffer overflow, but rather how to get started with Botpress, where I have recently joined as a Developer Advocate. Today, I just want to give you a couple of nice tricks to deploy a bot using Botpress, to impress your friends, manager, or even your Mom. Hopefully, all those people will be impressed by your skills and the money you save as you deploy a prototype of a chatbot.

In this blog post, you will learn how to start a Botpress instance with Docker, and in particular, if you’ve never used Docker before, you’ll learn how to use the Docker Playground to set up your Botpress instance and get started on your first chatbot.

If you’re more of a “watch a video” learner, check out the video I made to follow along.

Building a Chatbot for Fun

Botpress is a fun tool to use. It has a huge range of modules and tools.

One of the most powerful features of Botpress is the NLU engine, which allows your chatbot to understand natural language and the user’s intent. This is an essential but more advanced feature of Botpress, which I’ll cover in a future how-to. If you want to dig in now, the Botpress documentation has an excellent introduction.

The best place to start is with a simple bot - a chatbot to return GIFs, a DnD rolling bot, CTF racking bot or a ChatOps bot. Botpress is a great tool for this, and the Botpress Studio will support you in your journey as a chatbot developer.

Building a Chatbot for Profit

As a developer myself, I like to use the very best free and hacky tools to test and have fun with my coding. I particularly love new tools that are free and open-source like Botpress. If your first chatbot turns out to be successful and profitable, I want to know! (mine was not, sadly).

Getting Started with Docker

I’m going to set up my Botpress instance and deploy my first chatbot using Docker.

For those of you who use already use Docker on your machine, you can start using Botpress like this:

docker run -p 3000:3000 --rm -it botpress/server

If you don’t have Docker, never fear. You don’t need to have Docker installed to use Docker - you can get started with the Docker Playground. Using their guide, you can get started with Botpress in just a few minutes.

To get started, click through to the Play with Docker playground. You’ll be prompted to login to Docker; If you don’t have a Docker account, you’ll need to create one - but it’s free and pretty useful. Once you create a Docker account and log in, you’ll be able to click `start’ to begin playing with Docker.

To get started, click on “Start” and Docker will create a new session for you. You can see from the screenshot below, the session is set for just 4 hours. Once in the session, you need to ‘Add New Instance’ and the instance will be created for you - an ubuntu 18.04 with 8 CPU and 30GB will be given to you. :D

You can start using Docker immediately, typing commands in your new instance. I’ll start by installing Botpress In the command line by typing the following:

docker run -p 3000:3000 --rm -it botpress/server

Command details:

  • `-p’ tells Docker to open a port on the machine where Docker is running
  • ‘3000:3000’ tells Docker to open a port inside the container; here we are binding the local port of the machine to the container port
  • ‘--rm’ is for delete - once the Botpress instance is closed or exited, all the data will be deleted
  • ‘-it’ specifies an interactive terminal, so we can get the logs from the Botpress server

Without a tag on ‘botpress/server’, Docker will choose the latest version ‘botpress/server:latest’

To learn more about the Botpress Docker image, you can go to dockerhub and see details there: hub.docker.com/r/botpress/server. You’ll be able to see all the tags Botpress uses.

With the installation done, a new button will be created for us, next to the ‘OPEN PORT’, reading ‘3000’. Click on it, and it will open the 3000 port, and open a new URL ...

And you’re in your new Botpress instance! This URL can be shared - with other devs, your manager, your mom - to show them the chatbots you create.

To start with Botpress, you can create an account.

This step - creating an account - isn’t super critical in this case, since I created this Botpress instance inside the Docker playground. Remember, this instance goes away completely in just 4 hours, so if you want to save anything you’ve done in Botpress, be sure to export everything before leaving or exiting.

And you can get started building your first chatbot! If you need further guidance, check out the Botpress Quick Start documentation.

Build better with Botpress

Get started today - it's free!

Related Articles

March 17, 2023

Top 10 Telegram Chatbot Builders

Learn more about chatbot creation and discover the top ten chatbot builders on the market.

January 30, 2023

9 Best AI Chatbot Platforms

Discover what AI chatbots are as well as the best chatbot platforms to build your bot.

March 30, 2022

The People of Botpress: Michael Masson, Site Reliability Developer

Challenging projects is what pushes Michael to do his best work. Find out what a regular day in the life of a software engineer looks like for him and why he chose to work at Botpress.