Make self-hosted also accessible through local IP

Hello everyone,

New Baserow user here with some self-hosted aspirations :wave: I recently set up my Baserow using a basic Docker Compose file similar to this:

version: "3.8"
services:
  baserow:
    container_name: baserow
    image: baserow/baserow:latest
    environment:
      BASEROW_PUBLIC_URL: 'https://baserow.custom.xyz'

    ports:
      - 8880:80
      - 4443:443
    volumes:
      - baserow_data:/baserow/data

volumes:
  baserow_data:

Pretty straightforward. I needed to point to a different ports, because I already have a Nginx Proxy Manager occupying ports 80 and 443. So far, so good, and my Baserow is accessible and working fine. Nevertheless I’m looking for a solution to also be able to access my Baserow instance in my LAN using the local IP address, let it be 192.168.1.5. Right now, when I go to this IP, all I get is the following:

To me it looks like the internal Caddy isn’t able to route things correctly. And my final question is - is it somehow possible to keep my existing setup, but additionally have the possibility to reach Baserow using the local IP?

Hi @cojoj, this is because Baserow can actually listen on multiple domains. It includes an application builder that can publish to any domain. This is the reason why you have to configure BASEROW_PUBLIC_URL because that’s the domain Baserow will route to the tool. Everything else will be treated as published application builder domain. It is also needed for Baserow to know which URL it’s running on for links in emails.

In your case, you’ve configured the Baserow tool to listen on https://baserow.custom.xyz. If you then visit http://192.168.1.5, it will not be recognized as the Baserow tool URL, and a published application doesn’t exist, so it will give you a Site not found error.

What you can try is to modify the hosts file of your local computer and add something like:

192.168.1.5 baserow.custom.xyz

If you then visit http://baserow.custom.xyz, you’re actually visiting the local IP address. I don’t know if it’s going to work, but it might be worth to try.

Thanks @bram for the reply!

The solution you suggested is just a way to trick my local machine. It’s not that I need Baserow to be accessible through the local IP - it’d be just nice to have. I have such a setup with n8n. I have the public domain where I can reach n8n from anywhere on the internet, but if I’m in my LAN, I can type in the IP:Port and get to the n8n web app as well.

So, I assume, that’s not the case for Baserow, and I have to stick to the BASEROW_PUBLIC_URL and use it as the only point of access to my Baserow instance.

Ah okay, in that case it’s not possible to access the Baserow tool via the other URL. I’ve created an issue here Allow setting multiple BASEROW_PUBLIC_URL (#2499) · Issues · Baserow / baserow · GitLab to introduce another environment variable that allows hosting the tool on multiple domains.

1 Like