PostgreSQL Login Details

Hi!

I’ve installed Baserow on self-server (Ubuntu 18). After I installed the application - PostgreSQL Server was created. I want to connect to created PostgreSQL by Beaver, but I can’t find any connection details, such as login/password/DB name or etc.

Where I can find it to connect remotely?

1 Like

Hi @Vladimir ,

Could you let me know the install guide you followed to install and setup Baserow?

If you used Install with Docker // Baserow or Installation on Ubuntu // Baserow ,or you are using the baserow/baserow:1.XY images, then follow the steps shown at Install with Docker // Baserow to get access to the embedded PSQL. These steps won’t apply if you’ve used a different install guide however.

Hi!

It doesn’t work. I found the password and tried the host with my IP address with database “baserow”, using the username “baserow” and the correct password, but then I got an error “Connection refused: connect”.

@Vladimir just to confirm you ran this command exactly:

docker run -it \
  --rm \
  --name baserow \
  -p 5432:5432 \
  -v baserow_data:/baserow/data \
  baserow/baserow:1.10.2 \
  start-only-db 

And then connected to http://localhost:5432 in your database software?

If you are running the above command on a remote host and then trying to connect to the database from a different machine you will need to make sure:

  1. There is no firewall blocking connections from your machine to the server on 5432
  2. That you can actually reach the server from your machine over the network
  3. That whatever networking configuration you have on the server allows you to expose docker container port to external networks
docker run -it \
  --rm \
  --name baserow \
  -p 5432:5432 \
  -v baserow_data:/baserow/data \
  baserow/baserow:1.10.2 \
  start-only-db ```

I've got an error that Docker already has run baserow.
I can connect to the server remotely (to http://myip, into web baserow) and I don't have any firewall rules.

Yes so that guide should make it clearer that you need to stop your existing Baserow server to then launch a version which only starts and exposes the database when using the baserow/baserow image and the start-only-db command.

If you instead want to launch both the embedded postgres database, access it remotely and have Baserow running at the same time then I recommend you launch and run your own postgres database separately from Baserow and configure Baserow to use that postgres database. Then you can expose your postgres database as you see fit in a safe manner.

For example you could do this by using docker-compose with the following file:

version: "3.4"
services:
  baserow:
    container_name: baserow
    image: baserow/baserow:1.10.2
    environment:
      BASEROW_PUBLIC_URL: 'http://localhost'
      DATABASE_HOST: "db"
      DATABASE_PASSWORD: REPLACE_ME_WITH_YOUR_PASSWORD
    ports:
      - "80:80"
    volumes:
      - baserow_data:/baserow/data
  db:
    image: postgres:11
    restart: unless-stopped
    ports:
      - "5432:5432"
    depends_on:
      - baserow
    environment:
      POSTGRES_USER: baserow
      POSTGRES_PASSWORD: REPLACE_ME_WITH_YOUR_PASSWORD
      POSTGRES_DB: baserow
    volumes:
      - pg_data:/var/lib/postgresql/data
volumes:
  baserow_data:
  pg_data:

Do you have existing data in your current Baserow server you would need to transfer to this new database?

Just fixed a small typo missing a : at the end of the example compose posted above

Ok, how I can use filters for API-request?

You can find our documentation on our API here: Backend API // Baserow