How to publish application to the custom domain

Hi, I am now using baserow in self host for my job very well.

I want to know how to publish application to the custom domain.

My self host domain is ‘bd.abc.com’ (for example).

I want to publish my baserow application web page to the ‘demo.xyz.com’.

I set the name of CNAME to demo.xyz.com, and set the content of CNAME to bd.abc.com in Cloudflare.

But if I access demo.xyz.com in my web browser, 404 Not Found is displayed.
I can’t get the baserow application builder web page with demo.xyz.com

How can I resolve this problem?

I am using baserow behind NPM(Nginx Proxy Manager).

Hey @hslee ,

We have not yet a dedicated procedure for people hosting Baserow behind a proxy but I would say that you need to redirect every URL you want to bind to your Baserow instance. Pay also attention to what you are listening also on the Baserow instance itself as it needs to respond to all incoming requests. Usually it can be done by setting the following env variable BASEROW_CADDY_ADDRESSES=:443 (See this page for more details).

Additionally, the SSL certificate for the wesbite is generated by the caddy instance embeded in our Baserow image so this image must have access to the web to make this operation possible.

Finally, check that you have a homepage (a page with the path /) to make sure you don’t end up on a 404 page just because of that.

Thanks for your reply, jrmi.

Restarting Baserow docker container with adding BASEROW_CADDY_ADDRESSES=:443 generates “Too many redirects” error, which makes me impossible to connect my baserow.

I’m using Nginx Proxy Manger not caddy.

How did you create your baserow instance? Are you using the all-in-one image?

Yes, it was created by an all-in-one image.
My docker-compose.yml is like the below.

version: '3.8'
services:
  baserow:
    container_name: baserow
    image: baserow/baserow:latest
    environment:
      BASEROW_PUBLIC_URL: 'https://baserow.abc.com' // example
    ports:
      - 3080:80
      - 3443:443
    volumes:
      - baserow_data:/baserow/data

volumes:
  baserow_data:

networks:
  default:
    external: true
    name: npm

And it(=baserow) is behind Nginx Proxy Manager.

image

When you use the all-in-one image you have an embeded caddy instance that routes all the requests. That’s why you need to configure it as well. If you use the default configuration it will refuse to answer any request done on domains that don’t match the PUBLIC_URL.

In your case I’m not sure but as you are using the port 3443 may be you need this instead:

  • BASEROW_CADDY_ADDRESSES=:3443 or BASEROW_CADDY_ADDRESSES=:3080 or something like that.

However, in your configuration I see that you are using an external network for docker and your NPM proxy seems to be configured to bypass the caddy proxy and directly access to http://baserow instance. It should work but In this case you have to generate manually the ssl certificate or configure your NPM to do it automatically. I wouldn’t recomend that solution for now especially because we can’t help you.

Could you send a screenshot of the 404 page you get?

My server is Oracle Cloud and I open only 80 and 443 ports and all connections to my server are through NPM(Nginx Proxy Manager). So I append the below code to my every docker container yml to access each docker container with domain names.

networks:
  default:
    external: true
    name: npm

If I set BASEROW_CADDY_ADDRESSES=:80, I can access my baserow without any problem.
But I can’t access the published application builder page(preview works).

Under the environment of mine, it seems that I can’t use the function of publishing application builder in Baserow perfectly.

I could connect the published application builder page with http(not https) after some setting in my NPM(each setting in NPM per each application builder page URL).

For my environment, rather front and backend images of baserow than all-in-one image would be better. Is there a good docker-compose yml file example of front and backend image?

Under the environment of mine, it seems that I can’t use the function of publishing application builder in Baserow perfectly.

I’m a bit afraid of that indeed.

I could connect the published application builder page with http

Better than nothing.

Is there a good docker-compose yml file example of front and backend image

Have you already checked this documentation?

I got to have learned a lot of new things from your responses. Considering various aspects, I have decided to use Baserow as the form of mine(docker container generated by all-in-one image behind NPM) is.

Thank you for your answers.

I could now connect the published application builder page with https by setting NPM.

Solution to my probem is the adding BASEROW_CADDY_ADDRESSE=http://and BASEROW_BUILDER_DOMAINS=my_domain_address in the docker ENV.
And I set the sub domain for application builder page and its SSL in my NPM(Nginx Proxy Manager).

I wrote the above for someone who may suffer from this problem in the future.