Create your own online database without technical experience. Our user-friendly no-code tool gives you the powers of a developer without leaving your browser.
bashdocker run -v baserow_data:/baserow/data -p 80:80 -p 443:443 baserow/baserow:2.4.1
Run the command below to start a Baserow server running locally listening on port 80.
You will only be able to connect to Baserow from the machine running the server via
http://localhost.
bashdocker run \ -d \ --name baserow \ -e BASEROW_PUBLIC_URL=http://localhost \ -v baserow_data:/baserow/data \ -p 80:80 \ -p 443:443 \ --restart unless-stopped \ baserow/baserow:2.4.1
BASEROW_PUBLIC_URL to https://YOUR_DOMAIN or http://YOUR_IP to enable
external access. Ensure that this address matches the one you enter in your browser's
URL bar. Any different address will be ***ed a published application.-e BASEROW_CADDY_ADDRESSES=:443 to enable
https://caddyserver.com/docs/automatic-https.-e DATABASE_URL=postgresql://user:pwd@host:port/db to use an external
Postgresql.-e REDIS_URL=redis://user:pwd@host:port to use an external Redis.There is a security flaw with docker and the ufw firewall. By default docker when exposing ports on 0.0.0.0 will bypass any ufw firewall rules and expose the above container publicly from your machine on its network. If this is not intended then run with the following ports instead:
-p 127.0.0.1:80:80 -p 127.0.0.1:443:443which makes your Baserow only accessible from the machine it is running on. Please see https://github.com/chaifeng/ufw-docker for more information and how to setup ufw to work securely with docker.
The baserow/baserow:2.4.1 image by default runs all of Baserow's various services in
a single container for maximum ease of use.
This image is designed for simple single server deployments or simple container deployment services such as Google Cloud Run.
If you are instead looking for images which are better suited for horizontal scaling (e.g. when using K8S) then please instead use our baserow/backend and baserow/web-frontend images instead which deploy each Baserow service in its own container independently.
A quick summary of its features are:
/baserow/data folder inside the container.DATABASE_URL or the DATABASE_... variables to disable the internal postgres
and instead connect to an external Postgres. This is highly recommended for any
production deployments of this image, so you can easily connect to the Postgres
database from any other services or processes you might have.REDIS_URL or the REDIS_... variables to disable the internal redis and instead
connect to an external Postgres.BASEROW_CADDY_ADDRESSES to https://YOUR_DOMAIN.com and it will
https://caddyserver.com/docs/automatic-https#overview
for
you and store the keys and certs in /baserow/data/caddy.bashdocker stop baserow
docker run command you usually use to run your
Baserow and start up a brand-new container:bash# We haven't yet deleted the old Baserow container so you need to start this new one # with a different name to prevent an error like: # `response from daemon: Conflict. The container name "/baserow" is already in use by # container` docker run \ -d \ --name baserow_version_REPLACE_WITH_NEW_VERSION \ # YOUR STANDARD ARGS HERE baserow/baserow:REPLACE_WITH_LATEST_VERSION
bashdocker logs -f baserow_version_REPLACE_WITH_NEW_VERSION
[BASEROW-WATCHER][2022-05-10 08:44:46] Baserow is now available at ...
WARNING: If you have not been using a volume to persist the
/baserow/datafolder inside the container this will delete all of your Baserow data stored in this container permanently.
bashdocker rm baserow
Upgrading in place like this is the recommended way to move to a newer Baserow, no
matter how old your current version is. Everything in your data volume comes along:
users, workspaces, permissions, API tokens, webhooks, comments, row history and uploaded
files. Do not use the export_workspace_applications and import_workspace_applications
management commands to move an instance to a newer version: they only export
applications and their files, and versions before 1.30 cannot export more than 2 GB of
files.
Depending on how old your installation is, a couple of extra steps apply:
Upgrades across many versions take longer than usual. While the backend is still applying
migrations, the background workers in the same container may log errors such as
django.db.utils.ProgrammingError: column ... does not exist. These are expected and
stop once the migrations finish. Wait for the Baserow is now available log line before
checking your data.
On November 2023 https://www.postgresql.org/about/news/postgresql-161-155-1410-1313-1217-and-1122-released-2749/ a final update for version 11 of the database together with an end-of-life notice for this version. This means, that PostgreSQL 11 will no longer receive security and bug fixes.
If you are using an embedded PostgreSQL database (an embedded one is when you do not provide POSTGRESQL_* environment variables when launching Baserow, as opposed to an external one, where you provide connection details to your external PostgreSQL instance), and your data directory was initialized with PostgreSQL version 11, a newer Baserow image doesn't start up anymore and raises an error because you need to upgrade your data directory to be compatible with PostgreSQL version 15. This is the case for every embedded database that was first created on a Baserow version before 1.24, regardless of the version you are running now. Baserow provides an image to automatically upgrade your data directory to PostgreSQL version 15, which is now the version officially supported by Baserow.
If you don't want to upgrade at this point in time, jump to Legacy PostgreSQL version section below. Although, be aware, that we will only support PostgreSQL 11 for a limited amount of time and that this version won't receive official updates from PostgreSQL anymore.
To upgrade your data directory to be compatible with PostgreSQL 15, follow these steps:
CAUTION: before doing this, make sure to Back up your Baserow instance to avoid potential data loss.
docker ps. If Baserow is running, stop the container with docker stop baserow.docker run \ --name baserow-pgautoupgrade \ # ALL THE ARGUMENTS YOU NORMALLY ADD TO YOUR BASEROW INSTANCE --restart no \ baserow/baserow-pgautoupgrade:1.30.1
Upgrade complete and exits. The exit code is non-zero even on success, that is expected. You can now start Baserow as you did before, with any newer image tag, including the latest version. There is no need to start the version mentioned in the success message first.Starting from January 1, 2025, we will no longer create new images with PostgreSQL 11. If you are using the embedded PostgreSQL version in a Baserow version before 1.24, or any version through the baserow-pg11 image, and want to upgrade to the latest version, you must first use the latest pgautoupgrade image to upgrade PostgreSQL to version 15, and then upgrade to the latest version of Baserow. If you do not wish to upgrade PostgreSQL, version 1.30.1 is the last image we provide with PostgreSQL 11, but it will not receive any updates.
To run the latest Baserow image that uses the legacy PostgreSQL 11 version, use the following command:
docker run \ --name baserow-pg11 \ # ALL THE ARGUMENTS YOU NORMALLY ADD TO YOUR BASEROW INSTANCE --restart unless-stopped \ baserow/baserow-pg11:1.30.1
See Configuring Baserow for more detailed information on all the other environment variables you can configure.
If you have a domain name and have correctly configured DNS then you can run the following command to make Baserow available at the domain with https://caddyserver.com/docs/automatic-https#overview provided by Caddy.
Append
,http://localhostto BASEROW_CADDY_ADDRESSES if you still want to be able to access your server from the machine it is running on using http://localhost. See https://caddyserver.com/docs/caddyfile/concepts#addresses for all supported values for BASEROW_CADDY_ADDRESSES.
bashdocker run \ -d \ --name baserow \ -e BASEROW_PUBLIC_URL=https://www.REPLACE_WITH_YOUR_DOMAIN.com \ -e BASEROW_CADDY_ADDRESSES=:443 \ -v baserow_data:/baserow/data \ -p 80:80 \ -p 443:443 \ --restart unless-stopped \ baserow/baserow:2.4.1
bashdocker run \ -d \ --name baserow \ -e BASEROW_PUBLIC_URL=https://www.yourdomain.com \ -v baserow_data:/baserow/data \ -p 80:80 \ --restart unless-stopped \ baserow/baserow:2.4.1
bashdocker run \ -d \ --name baserow \ -e BASEROW_PUBLIC_URL=https://www.yourdomain.com:3001 \ -v baserow_data:/baserow/data \ -p 3001:80 \ --restart unless-stopped \ baserow/baserow:2.4.1
bashdocker run \ -d \ --name baserow \ -e BASEROW_PUBLIC_URL=https://www.yourdomain.com \ -e DATABASE_HOST=TODO \ -e DATABASE_NAME=TODO \ -e DATABASE_USER=TODO \ -e DATABASE_PASSWORD=TODO \ -e DATABASE_PORT=TODO \ -v baserow_data:/baserow/data \ -p 80:80 \ -p 443:443 \ --restart unless-stopped \ baserow/baserow:2.4.1
bashdocker run \ -d \ --name baserow \ -e BASEROW_PUBLIC_URL=https://www.yourdomain.com \ -e REDIS_HOST=TODO \ -e REDIS_USER=TODO \ -e REDIS_PASSWORD=TODO \ -e REDIS_PORT=TODO \ -e REDIS_PROTOCOL=TODO \ -e REDIS_SSL_CERT_REQS=TODO \ -e REDIS_SSL_CA_CERTS=TODO \ -v baserow_data:/baserow/data \ -p 80:80 \ -p 443:443 \ --restart unless-stopped \ baserow/baserow:2.4.1
bashdocker run \ -d \ --name baserow \ -e BASEROW_PUBLIC_URL=https://www.yourdomain.com \ -e EMAIL_SMTP=True \ -e EMAIL_SMTP_HOST=TODO \ -e EMAIL_SMTP_PORT=TODO \ -e EMAIL_SMTP_USER=TODO \ -e EMAIL_SMTP_PASSWORD=TODO \ -e EMAIL_SMTP_USE_TLS= \ -v baserow_data:/baserow/data \ -p 80:80 \ -p 443:443 \ --restart unless-stopped \ baserow/baserow:2.4.1
This is assuming you are using the postgresql server bundled by ubuntu. If not then you will have to find the correct locations for the config files for your OS.
sudo ls /etc/postgresql//etc/postgresql/YOUR_PSQL_VERSION/main/postgresql.conf for editing as root# listen_addresses line.listen_addresses = '*' # what IP address(es) to listen on;/etc/postgresql/YOUR_PSQL_VERSION/main/pg_hba.conf for editing as roothost all all 172.17.0.0/16 md5sudo systemctl restart postgresqlsudo less /var/log/postgresql/postgresql-YOUR_PSQL_VERSION-main.logbashdocker run \ -d \ --name baserow \ --add-host host.docker.internal:host-gateway \ -e BASEROW_PUBLIC_URL=http://localhost \ -e DATABASE_HOST=host.docker.internal \ -e DATABASE_PORT=5432 \ -e DATABASE_NAME=YOUR_DATABASE_NAME \ -e DATABASE_USER=YOUR_DATABASE_USERNAME \ -e DATABASE_PASSWORD=REPLACE_WITH_YOUR_DATABASE_PASSWORD \ --restart unless-stopped \ -v baserow_data:/baserow/data \ -p 80:80 \ -p 443:443 \ baserow/baserow:2.4.1
The DATABASE_PASSWORD, SECRET_KEY and REDIS_PASSWORD environment variables can
instead be loaded using a file by using the *_FILE variants:
bashecho "your_redis_password" > .your_redis_password echo "your_secret_key" > .your_secret_key echo "your_pg_password" > .your_pg_password docker run \ -d \ --name baserow \ -e BASEROW_PUBLIC_URL=http://localhost \ -e REDIS_PASSWORD_FILE=/baserow/.your_redis_password \ -e SECRET_KEY_FILE=/baserow/.your_secret_key \ -e DATABASE_PASSWORD_FILE=/baserow/.your_pg_password \ -e EMAIL_SMTP_PASSWORD_FILE=/baserow/.your_smtp_password \ --restart unless-stopped \ -v $PWD/.your_redis_password:/baserow/.your_redis_password \ -v $PWD/.your_secret_key:/baserow/.your_secret_key \ -v $PWD/.your_pg_password:/baserow/.your_pg_password \ -v baserow_data:/baserow/data \ -p 80:80 \ -p 443:443 \ baserow/baserow:2.4.1
If you want to directly access the embedded Postgresql database then you can run:
bashdocker run -it \ --rm \ --name baserow \ -p 5432:5432 \ -v baserow_data:/baserow/data \ baserow/baserow:2.4.1 \ start-only-db # Now get the password from docker exec -it baserow cat /baserow/data/.pgpass # Finally connect on your host machine to the Baserow postgres database at port 5432 # the password above with the username `baserow`.
The build in Caddy server is configured to automatically handle additional application
builder domains. Depending on the environment variables, it will also automatically
fetch SSL certificates for those domains. Note that the BASEROW_CADDY_ADDRESSES
environment variable must be :80 or :443 to allow multiple domains. If you have set
a URL there, it won't work.
By default, it will accept requests of any domain over the http protocol, which is
perfect if you have a proxy in front of Baserow. If BASEROW_CADDY_ADDRESSES starts
with https protocol or is :443, then it will redirect http requests to https, and
will handle the SSL certificate part automatically. This is recommended when the
container is directly exposed to the internet.
If you want to run a one off backend command against your Baserow data volume without
starting Baserow normally you can do so with the backend-cmd-with-db argument like so:
bashdocker run -it \ --rm \ --name baserow \ -v baserow_data:/baserow/data \ baserow/baserow:2.4.1 \ backend-cmd-with-db manage dbshell
This image can also be configured to deploy Baserow in a horizontally scalable way.
We recommend you first *** using our baserow/backend and baserow/web-frontend
single service per container images
on K8S/Helm.
However, if you just want to easily horizontally scale Baserow on something like
AWS ECS or Google Cloud Run then the baserow/baserow can be used.
To deploy this image in a horizontally scalable way you need to ensure all state is stored externally and not inside containers or volumes. To do this you will need a:
With this image we recommend you set the following environment variables to scale it horizontally.
See our https://baserow.io/docs/installation%2Fconfiguration for more details on the following environment variables.
DATABASE_* env vars need to be set to point Baserow at an external
postgresREDIS_* env vars need to be set to point Baserow at an external redisDISABLE_VOLUME_CHECK=yes needs to be set as this image has a
check for less technical users that /baserow/data is mounted to an external
volume on startup. Instead, you want your containers to be stateless and so this
check needs to be disabled.AWS_*/GC_*/AZURE_* env vars need to be set connecting Baserow to an external
file storage service.
This image has the following "horizontal scaling" environment variables:
BASEROW_AMOUNT_OF_GUNICORN_WORKERS this controls the number of REST API
workers (the things that do most of the API work) per container.BASEROW_AMOUNT_OF_WORKERS controls the number of background task celery
runners, these run realtime collaboration tasks, cleanup jobs and other slow tasks
like big file exports/imports.
BASEROW_RUN_MINIMAL=yes AND BASEROW_AMOUNT_OF_WORKERS=1.
Baserow stores all of its persistent data in the /baserow/data directory by default.
We strongly recommend you mount a docker volume into this location to persist Baserows
data so you do not lose it if you accidentally delete your Baserow container.
The backup and restore operations discussed below are best done on a Baserow server which is not being used.
Note, that this only works if you're not using an external PostgreSQL server. This will backup:
Otherwise if you remove the Baserow container you will lose all of your data.
The command below assumes you have been running Baserow with the
-v baserow_data:/baserow/data volume. Please change this argument accordingly if you
have mounted the /baserow/data folder differently.
bash# Ensure Baserow is stopped first before taking a backup. docker stop baserow docker run --rm -v baserow_data:/baserow/data -v $PWD:/backup ubuntu tar cvf /backup/backup.tar /baserow/data
bash# Ensure Baserow is stopped first before taking a backup. docker stop baserow docker run --rm -v baserow_data:/baserow/data -v $PWD:/backup ubuntu tar cvf /backup/backup.tar /baserow/data docker run --rm -v new_baserow_data_volume:/results -v $PWD:/backup ubuntu bash -c "mkdir -p /results/ && cd /results && tar xvf /backup/backup.tar --strip 2" # Now launch Baserow using the new data volume with your normal run command: docker run -v new_baserow_data_volume:/baserow/data .....
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务
以下是 baserow/baserow 相关的常用 Docker 镜像,适用于 不同场景 等不同场景: