Local install

Before you can use Bugsink, you’ll need to install it. A local install is a great way to determine if Bugsink is right for you and is even easier to set up than a production environment.

Bugsink’s License allows you to run it for yourself on your local machine for free.

When running locally, you won’t be able to send crash reports from your production application to Bugsink. However, it’s still a great improvement to your development workflow, and makes it easy to evaluate Bugsink’s features.

Install Python

Bugsink is written in Python, so you need to have Python installed on your system. You can download Python from the official website or using a package manager like apt or brew.

You can verify that Python is installed by running the following command:

python --version

and similarly for pip:

pip3 --version

and for venv:

python3 -m venv --version

If any of these commands fail, you may need to install Python and its dependencies. The exact steps depend on your operating system, so please refer to the official Python documentation for more information.

Set up a working dir

Both the Bugsink code and the data it collects will be stored somewhere. We’ll use a separate directory for this purpose. Create a new directory and navigate to it:

mkdir bugsink
cd bugsink

Set up a virtual environment and activate it

It’s a good practice to use a virtual environment to manage your Python dependencies. This way, you can avoid conflicts between different projects.

Run the following commands to create a virtual environment and activate it:

python -m venv .
source bin/activate

After running these commands, you should see the name of the virtual environment in parentheses at the start of your shell prompt, e.g. (bugsink).

Install Bugsink and its dependencies

You can install Bugsink using pip:

python -m pip install bugsink --upgrade

You should see output indicating that Bugsink and its dependencies are being installed. After the installation is complete, you can verify that Bugsink is installed by running:

bugsink-show-version

Configuration

Bugsink relies on a configuration file to determine how it should run. You can create a configuration file that’s suitable for local development by running:

bugsink-create-conf --template=local --port=8000

This will create a file bugsink_conf.py in the current directory. You may later edit this file to customize the configuration but for this tutorial the default configuration should be sufficient.

Initialize the database

Bugsink uses a database to store the data it collects. You can initialize the database by running:

bugsink-manage migrate

This will create a new SQLite database in the current directory and set up the necessary tables. You may verify the presence of the database by running:

ls db.sqlite3

Create a superuser

Create a superuser to manage the Bugsink installation. Run the following command and follow the prompts.

bugsink-manage createsuperuser

This will create a new user account with administrative privileges.

Run the Bugsink server

We will run Bugsink using Gunicorn. Gunicorn was already installed as part of the Bugsink dependencies, so we just need to run it.

gunicorn --bind="127.0.0.1:8000" --access-logfile - bugsink.wsgi

You should see output indicating that the server is running. You can now access Bugsink by visiting http://localhost:8000/ in your web browser and logging in with the superuser account you created earlier.

Next steps

You’ve successfully installed Bugsink on your local machine! You can now start using it to collect crash reports for your (local) applications. Log in with the superuser credentials you set up earlier and configure your first project.