Error: Could not connect to the API server

Hello,

No matter what I do (including starting over with a clean server), I cannot get beyond the “Could not connect to the API server” error message on the first screen, after trying to submit my registration form.

I have now spent hours trying the various solutions I found in this forum and in one github issue.

I’m trying out the various tools in this space to see which would suit us best. All the other ones installed without any issues…

Would love to try out Baserow, because I think it might suit us best, but this is getting so difficult, I’m about to give up.

Please help.

Thank you kindly.

Hi @db1 ,

Sorry to hear you are having problems. Could you please let us know:

  • What exactly you are trying to install Baserow on. The exact specifications would help the most.
  • What exact steps are you trying to follow?
  • How exactly are you trying to access your Baserow server? From a remote computer? Is it running behind a reverse proxy?

Hi @nigel ,

Thanks for getting back to me!

The operating system is: Ubuntu 20.04.5 LTS

I’m following your instructions from the official Baserow install page: https://baserow.io/docs/installation/install-on-ubuntu

Drawing on this, this is how I start the 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.12.0

I am trying to access Baserow from a remote computer via a VPN, using a custom hostname simply called ‘crm’ (the custom hostname works, as the initial Baserow page loads fine).

However, maybe the issue is related to the custom host? When I try to open the API url http://crm:8080/api/user/, I get the following error (with debugging on):

# DisallowedHost at /api/user/
Invalid HTTP_HOST header: 'crm:8080'. You may need to add 'crm' to ALLOWED_HOSTS.

Not quite sure what to do… Thank you for any help again!

Hi @db1 you need to change BASEROW_PUBLIC_URL to the url that you visit baserow on in your browser. In this case it should be http://crm:8080/.

After a first run with Docker Compose/Portainer

I’m Also getting: “Network error Could not connect to the API server.”

I have tried a few different variations of the Docker Compose config

I can reach the site via subdomain.domain and https is working via LetsEncrypt but always get the API error.
Any help appreciated

Config:

version: “3.4”
services:
baserow:
container_name: baserow-mywebsite
image: baserow/baserow:1.14.0
environment:
BASEROW_PUBLIC_URL: ‘http://10.0.50.147:8080
BASEROW_CADDY_ADDRESSES: ‘https://baserow.mywebsite.co.uk’ (also tried 443 here)
ports:
- “8080:80”
- “443:443”
volumes:
- baserow_data:/baserow/data
volumes:
baserow_data:

BASEROW_PUBLIC_URL needs to be https://baserow.mywebsite.co.uk/. In other words BASEROW_PUBLIC_URL needs to be the URL you are typing into your browser to access your website.

Thanks, I eventually got it working.
I had to set it the same for both, It wouldn’t work without the BASEROW_CADDY_ADDRESS.
Had to use both. Wouldn’t work with just the Public_URL
BASEROW_PUBLIC_URL: ‘https://baserow.mysite.co.uk
BASEROW_CADDY_ADDRESSES: ‘https://baserow.mysite.co.uk