How to Install Beekeeper Studio on Debian Linux

Beekeeper Studio is an open-source SQL editor and database manager that simplifies working with MySQL, PostgreSQL, SQLite, SQL Server, CockroachDB, and other popular databases. Whether you need to write and test queries, browse table data, manage schema changes, or export results to CSV and JSON, Beekeeper Studio provides a clean interface that stays out of your way. Additionally, features like SSH tunneling, SSL encryption, saved queries, and tabbed workspaces make it practical for both local development and connecting securely to remote production servers.

This guide covers two installation methods: the official Beekeeper Studio APT repository (recommended for automatic updates) and Flatpak via Flathub (sandboxed installation with cross-distro compatibility). By the end, you will have Beekeeper Studio running and ready to connect to your first database.

Choose Your Installation Method

Beekeeper Studio can be installed through two channels on Debian. Choose the method that best fits your workflow:

MethodChannelVersionUpdatesBest For
APT RepositoryOfficial RepoLatestAutomatic via apt upgradeMost users who want seamless system integration
FlatpakFlathubLatestAutomatic via flatpak updateUsers who prefer sandboxed apps or need cross-distro portability

For most users, the APT repository method is recommended because it integrates directly with your system package manager and receives updates alongside your regular system maintenance. However, choose Flatpak if you prefer application sandboxing or already use Flatpak for other applications.

Update Debian Before Installation

Before installing any new software, update your package lists and upgrade existing packages to ensure system stability:

sudo apt update && sudo apt upgrade

Install Beekeeper Studio via APT Repository

The official Beekeeper Studio APT repository provides the latest stable releases with automatic updates through your system package manager.

Install Required Packages

First, install the packages needed to securely add external repositories:

sudo apt install curl ca-certificates gnupg -y

Import GPG Key and Add Repository

Download and import the Beekeeper Studio GPG key to verify package authenticity:

curl -fsSL https://deb.beekeeperstudio.io/beekeeper.key | gpg --dearmor | sudo tee /usr/share/keyrings/beekeeper.gpg > /dev/null

Next, add the Beekeeper Studio repository using the modern DEB822 format:

cat <<EOF | sudo tee /etc/apt/sources.list.d/beekeeper-studio.sources
Types: deb
URIs: https://deb.beekeeperstudio.io
Suites: stable
Components: main
Architectures: amd64
Signed-By: /usr/share/keyrings/beekeeper.gpg
EOF

Debian 13 (Trixie) defaults to DEB822 .sources format for APT repositories. Debian 12 (Bookworm) and Debian 11 (Bullseye) fully support this format, though legacy .list files remain common on older installations.

Install Beekeeper Studio

Update your package lists to include the new repository, then install Beekeeper Studio:

sudo apt update
sudo apt install beekeeper-studio

Remove Duplicate Repository File

The Beekeeper Studio package creates a legacy .list repository file during initial installation, even though you already configured a .sources file. This causes duplicate repository warnings during updates. Remove the legacy file:

sudo rm /etc/apt/sources.list.d/beekeeper-studio-app.list

This is a one-time cleanup. The .list file is only created during the initial package installation and will not return when you upgrade Beekeeper Studio in the future.

Verify APT Installation

Finally, confirm the installation and verify the package source:

apt-cache policy beekeeper-studio

Expected output:

beekeeper-studio:
  Installed: 5.x.x
  Candidate: 5.x.x
  Version table:
 *** 5.x.x 500
        500 https://deb.beekeeperstudio.io stable/main amd64 Packages
        100 /var/lib/dpkg/status

The version numbers shown are placeholders. Your output will display the actual installed version from the Beekeeper Studio repository.

Install Beekeeper Studio via Flatpak

Flatpak provides a sandboxed installation that runs independently of your system packages. Furthermore, this method works identically across all Debian versions and other Linux distributions.

Set Up Flatpak and Flathub

If you haven’t already configured Flatpak on your system, follow our guide to install Flatpak on Debian, which includes adding the Flathub repository.

Then, verify that Flathub is configured:

flatpak remotes

You should see flathub listed in the output. Otherwise, add it with:

flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

Install Beekeeper Studio from Flathub

Now, install Beekeeper Studio using the Flatpak command:

flatpak install --system flathub io.beekeeperstudio.Studio

Verify Flatpak Installation

Afterwards, confirm the installation with:

flatpak info io.beekeeperstudio.Studio

Expected output:

Beekeeper Studio - The SQL Editor and Database Manager Of Your Dreams

          ID: io.beekeeperstudio.Studio
         Ref: app/io.beekeeperstudio.Studio/x86_64/stable
        Arch: x86_64
      Branch: stable
      Origin: flathub
     Version: 5.x.x

Launch Beekeeper Studio

After installation, launch Beekeeper Studio from the terminal or your desktop environment’s application menu.

Terminal command (APT installation):

beekeeper-studio

Terminal command (Flatpak installation):

flatpak run io.beekeeperstudio.Studio

Alternatively, you can search for “Beekeeper Studio” in your desktop environment’s application menu and click the icon to launch.

Update Beekeeper Studio

Keep Beekeeper Studio current with the latest features and security fixes using the appropriate update command for your installation method.

APT installation:

sudo apt update && sudo apt install --only-upgrade beekeeper-studio

Using apt install --only-upgrade updates only Beekeeper Studio without upgrading all system packages. Alternatively, a full sudo apt upgrade will include Beekeeper Studio alongside other available updates.

Flatpak installation:

flatpak update io.beekeeperstudio.Studio

Troubleshooting

GPG Key Import Fails

If the GPG key import command fails, you may see an error like:

curl: (6) Could not resolve host: deb.beekeeperstudio.io

First, verify your internet connection and ensure curl and gnupg are installed:

sudo apt install curl gnupg ca-certificates -y

Alternatively, download the key manually from https://deb.beekeeperstudio.io/beekeeper.key using a web browser, then import it:

cat beekeeper.key | gpg --dearmor | sudo tee /usr/share/keyrings/beekeeper.gpg > /dev/null

Verify the key was imported correctly:

gpg --show-keys /usr/share/keyrings/beekeeper.gpg

Expected output showing the Beekeeper Studio signing key:

pub   rsa3072 2021-02-11 [SC]
      BC1CD0DD651A3C0E382FC894E0DF9378AD1B460B
uid                      Beekeeper Studio <hello@beekeeperstudio.io>

After importing the key, rerun the APT update:

sudo apt update

Application Fails to Start

If Beekeeper Studio fails to launch or closes immediately, run it from the terminal to see error messages:

beekeeper-studio --verbose

A common error on headless systems or minimal installations:

Error: Cannot find module 'electron'
or
error: XDG_RUNTIME_DIR not set in the environment

These errors indicate missing display server configuration. Beekeeper Studio requires a desktop environment with a graphical display. If you are on a minimal server installation, install a desktop environment:

sudo apt install task-gnome-desktop -y

For the XDG_RUNTIME_DIR error when running as a non-standard user or in a container, set the environment variable:

export XDG_RUNTIME_DIR=/run/user/$(id -u)

Verify the application launches after applying these fixes by running beekeeper-studio from the terminal and confirming the main window appears.

Database Connection Issues

If you cannot connect to a database, you may see errors like:

ECONNREFUSED 127.0.0.1:3306
or
Connection timed out after 10000ms

First, verify that the database server is running. Debian uses MariaDB as the default MySQL-compatible database:

sudo systemctl status mariadb

If you installed MySQL from Oracle’s repository instead, check the mysql service:

sudo systemctl status mysql

Expected output for a running database service:

● mariadb.service - MariaDB 10.x.x database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled)
     Active: active (running)

If the service is not running, start it:

sudo systemctl start mariadb

For remote connections, verify that the database port is open and listening:

ss -tlnp | grep 3306

Expected output showing MariaDB listening on port 3306:

LISTEN 0      80       127.0.0.1:3306      0.0.0.0:*

If the database only listens on 127.0.0.1, remote connections will fail. Edit the MariaDB configuration to bind to all interfaces if needed, or use SSH tunneling for secure remote access through firewalls.

Additionally, check your firewall allows traffic on the database port:

sudo ufw status | grep 3306

If the port is not listed, allow it:

sudo ufw allow 3306/tcp

Verify database connectivity from the command line before testing in Beekeeper Studio:

mariadb -u root -p -e "SELECT 1;"

Remove Beekeeper Studio

If you no longer need Beekeeper Studio, follow the removal steps for your installation method.

Beekeeper Studio stores saved connections and settings in ~/.config/beekeeper-studio/ (APT) or ~/.var/app/io.beekeeperstudio.Studio/ (Flatpak). Copy this directory before uninstalling if you want to preserve your database connections.

Remove APT Installation

Uninstall the package and remove orphaned dependencies:

sudo apt remove beekeeper-studio
sudo apt autoremove

Then, remove the repository and GPG key:

sudo rm /etc/apt/sources.list.d/beekeeper-studio.sources
sudo rm -f /etc/apt/sources.list.d/beekeeper-studio-app.list
sudo rm /usr/share/keyrings/beekeeper.gpg

Finally, refresh your package lists and verify removal:

sudo apt update
apt-cache policy beekeeper-studio

Expected output confirming removal:

beekeeper-studio:
  Installed: (none)
  Candidate: (none)
  Version table:

Remove Flatpak Installation

Uninstall the Flatpak package:

flatpak uninstall io.beekeeperstudio.Studio

Additionally, you can optionally remove unused Flatpak runtimes to free disk space:

flatpak uninstall --unused

Remove User Configuration Data

To remove saved connections, query history, and application settings, delete the configuration directory.

Warning: The following commands permanently delete all saved database connections, stored queries, and application settings. This action cannot be undone. Export any important connection details before proceeding by opening Beekeeper Studio and manually noting your connection configurations.

APT installation:

rm -rf ~/.config/beekeeper-studio/

Flatpak installation:

rm -rf ~/.var/app/io.beekeeperstudio.Studio/

Conclusion

You now have Beekeeper Studio installed on Debian using either the APT repository for automatic updates or Flatpak for sandboxed operation. Create your first connection by selecting your database type and entering credentials. For production servers, enable SSL encryption in connection settings and configure SSH tunneling to securely access databases behind firewalls.

Leave a Comment