Table of Contents
In today’s digital age, the demand for no-code tools has skyrocketed, allowing non-technical users to build and manage applications without writing code. One such powerful tool is Baserow, an open-source alternative to Airtable. This guide will walk you through everything you need to know about Baserow, including its advantages and a step-by-step tutorial on how to install and set up Baserow on an Ubuntu server using Docker.
What is Baserow?
Baserow is an open-source database tool that allows you to create and manage databases with a user-friendly, no-code interface. It is designed to be an alternative to Airtable, providing similar functionalities while being self-hosted and open-source. This means you have full control over your data and can customize the platform to suit your needs.
Why Choose Baserow Over Airtable?
Airtable is a popular tool for creating and managing databases with a spreadsheet-like interface. However, Baserow offers several key advantages, check out the benefits that you would get after setting up Baserow:
- Open Source: Baserow is open source, which means you can host it on your own servers and have full control over your data.
- Cost-Effective: Since Baserow is self-hosted, you avoid the subscription fees associated with Airtable.
- Customizability: With access to the source code, you can modify and extend Baserow to meet your specific requirements.
- Data Privacy: Self-hosting Baserow ensures that your data stays within your control, which is crucial for organizations with strict data privacy requirements.
Advantages of Baserow
- No-Code Platform: Baserow offers a simple and intuitive interface that allows users to create databases, manage data, and collaborate without writing any code.
- Self-Hosted: Being open source, Baserow can be hosted on your own servers, giving you complete control over your data.
- Customizable: With full access to the source code, you can customize and extend Baserow to fit your specific needs.
- Cost-Effective: Avoid the recurring subscription fees of proprietary platforms by hosting and set up Baserow yourself.
- Community Support: Benefit from the support and contributions of the open-source community.
How to Install and Set up Baserow on Ubuntu
This section will guide you through the installation of Baserow using Docker on a server running Ubuntu. These instructions assume you have a clean install of Ubuntu and a user account with root access or the ability to run Docker containers.
Step 1: Update Your System
First, ensure your system is up to date:
sudo apt update
sudo apt upgrade -y
Step 2: Install Docker
If Docker is not already installed on your system, follow these steps to install it:
1. Remove old Docker versions (if any):
sudo apt-get remove docker docker-engine docker.io containerd runc
2. Install Docker dependencies:
sudo apt-get update
sudo apt-get install -y \
ca-certificates \
curl \
gnupg \
lsb-release
3. Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
4. Set up the Docker repository:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
5. Install Docker Engine:
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
6. Add your user to the Docker group:
sudo usermod -aG docker $USER
7. Refresh the group membership:
Refresh the group membership:
8. Verify Docker installation:
docker run hello-world
Step 3: Run Baserow with Docker
Now that Docker is installed and running, you can set up Baserow.
1. Run the Baserow container:
docker run -e BASEROW_PUBLIC_URL=http://localhost \
--name baserow \
-d \
--restart unless-stopped \
-v baserow_data:/baserow/data \
-p 80:80 \
-p 443:443 \
baserow/baserow:1.24.2
-e BASEROW_PUBLIC_URL=http://localhost
: Sets the public URL for Baserow. Replacehttp://localhost
with your domain name or server IP if accessing remotely.--name baserow
: Names the containerbaserow
.-d
: Runs the container in detached mode (in the background).--restart unless-stopped
: Ensures the container restarts unless explicitly stopped.-v baserow_data:/baserow/data
: Creates a Docker volume for persistent storage.-p 80:80
: Maps port 80 on the host to port 80 in the container (HTTP).-p 443:443
: Maps port 443 on the host to port 443 in the container (HTTPS).
3. Watch the logs for Baserow to become available:
docker logs -f baserow
Migration from Baserow 1.8.2 or Earlier
If you are upgrading from an older version of Baserow, follow these steps:
# === Docker Install ===
#
# Install Docker following the guide at https://docs.docker.com/engine/install/ubuntu/.
# If you have already installed Docker then please skip this section.
#
# The steps are summarized below but we encourage you to follow the guide itself:
#
sudo apt-get remove docker docker-engine docker.io containerd runc
# Setup docker
sudo apt-get update
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
# Add yourself to the docker group
sudo usermod -aG docker $USER
newgrp docker
# Verify Docker install worked you should see:
#
# Unable to find image 'hello-world:latest' locally
# latest: Pulling from library/hello-world
# ...
# Hello from Docker!
docker run hello-world
# === Baserow Upgrade ===
# When you are ready to stop your old Baserow server by running
sudo supervisorctl stop all
# === Extract your secret key ===
# Extract your current SECRET_KEY value from /etc/supervisor/conf.d/baserow.conf
cat /etc/supervisor/conf.d/baserow.conf | sed -nr "s/^\s*SECRET_KEY='(\w+)',/\1/p" > .existing_secret_key
# Check this file just contains your exact secret key by comparing it with
# /etc/supervisor/conf.d/baserow.conf
cat .existing_secret_key
# === Configure your Postgres to allow connections from Docker ===
# 1. Find out what version of postgresql is installed by running
sudo ls /etc/postgresql/
# 2. Open /etc/postgresql/YOUR_PSQL_VERSION/main/postgresql.conf for editing as root
# 3. Find the commented out # listen_addresses line.
# 4. Change it to be:
listen_addresses = '*' # what IP address(es) to listen on;
# 5. Open /etc/postgresql/YOUR_PSQL_VERSION/main/pg_hba.conf for editing as root
# 6. Add the following line to the end which will allow docker containers to connect.
host all all 172.17.0.0/16 md5
# 7. Restart postgres to load in the config changes.
sudo systemctl restart postgresql
# 8. Check the logs do not have errors by running
sudo less /var/log/postgresql/postgresql-YOUR_PSQL_VERSION-main.log
# === Launch Baserow ===
# Please change this variable to the password used by the baserow user in your
# postgresql database.
YOUR_BASEROW_DATABASE_PASSWORD=yourpassword
# Change BASEROW_PUBLIC_URL to your domain name or http://YOUR_SERVERS_IP if you want
# to access Baserow remotely.
# This command will run Baserow so it uses your existing postgresql database and your
# existing user uploaded files in /baserow/media.
# It will store it's redis database and password, any data related to the automatic
# HTTPS setup provided by Caddy in the new baserow_data docker volume.
docker run \
-d \
--name baserow \
-e SECRET_KEY_FILE=/baserow/.existing_secret_key \
-e BASEROW_PUBLIC_URL=http://localhost \
--add-host host.docker.internal:host-gateway \
-e DATABASE_HOST=host.docker.internal \
-e DATABASE_USER=baserow \
-e DATABASE_PASSWORD=$YOUR_BASEROW_DATABASE_PASSWORD \
--restart unless-stopped \
-v $PWD/.existing_secret_key:/baserow/.existing_secret_key \
-v baserow_data:/baserow/data \
-v /baserow/media:/baserow/data/media \
-p 80:80 \
-p 443:443 \
baserow/baserow:1.24.2
# Check the logs and wait for Baserow to become available
docker logs baserow
Baserow Documentations
https://gitlab.com/baserow/baserow
Conclusion
Baserow offers a powerful, open-source alternative to Airtable, providing you with full control over your data and the flexibility to customize the platform to your needs. By following this guide, you can easily install and set up Baserow on an Ubuntu server using Docker. Enjoy the benefits of a no-code platform while maintaining control over your data and infrastructure.
Related Resources