Need help on self-host

I need help on setting up my baserow on Ubuntu server. (I don’t know much about coding, I only getting help from CHATGPT )

I recently success when I setup Baserow on my Windows using Docker.

But now I want to move to my Virtual Machine Ubuntu and got stuck.

I installed Baserow on my Ubuntu server success and restore the backup from Windows docker to Ubuntu version.
Now I created a docker-compose.yml file like this:

version: ‘3.4’

services:
baserow:
image: baserow/baserow:latest
container_name: baserow
environment:
- BASEROW_PUBLIC_URL=https://my_domain_name
- PUBLIC_BACKEND_URL=https://my_domain_name
volumes:
- baserow_data:/baserow/data
ports:
- “443:443”
- “80:80”
restart: unless-stopped

volumes:
baserow_data:

and start with docker-compose up -d

Now I have my window machine, my domain name data. xyz. com will direct to my window PC with DDNS service ( I use dynu ).

from my window pc, I install nginx for windows, I want to direct my domain data. xyz. com
to Ubuntu server ( same network with windows PC, I install Ubuntu with bridge-network)

let’s say Ubuntu server installed Baserow is 192.168.68.59

I setup the nginx.conf like this:

server {
listen 80;
server_name my_domain_name;

location / {
    proxy_pass http://192.168.68.59:80;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

}

server {
listen 443;
server_name my_domain_name;
ssl_certificate C:/Users/ADMIN/Documents/RUN/certs/fullchain.pem;
ssl_certificate_key C:/Users/ADMIN/Documents/RUN/certs/privkey.pem;
location / {
proxy_pass https://192.168.68.59:443;
proxy_ssl_verify off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}

But when I visit my website, it’s always show like this:

502 Bad Gateway


nginx/1.26.2

This is a part of nginx error log, I changed real ip address and domain name to my_ip_address and my_domain_name:

Please help, I’m noob and take days to config that. Still got stuck

Hi @kieuminhnhat,

If I understand correctly you are trying to install Baserow in a virtual machine on your Windows computer and you want to use nginx on Windows to access Baserow from that computer?

Why do you do that if - as you said - if Baserow run with docker worked for you?

Honestly, given you are attempting this with ChatGPT and want to do rather nonstandard setup, I recommend you to rethink what you really need and how you want to deploy Baserow.

Let me explain.

I have two domain, same directing to my PC server ( windows )

Now I want domain A use with baserow ( docker )

and domain B point to a virtual ubuntu ( I use it for host a website )

Now I want both domain can access with port 80 and 443

so I think I will need a reverse proxy.

I do my research and I think I can use nginx.

Each domain when direct to my PC will then redirect ( to each server with correct port )

Domain A → my pc → Baserow with port 443

domain B → my pc → Ubuntu server port 443 and 80 ( open for both port )

But the problem is docker on PC will use port 443, and if I use nginx they will use port 443 too. So they can not use together as I tried.

Now I thinking i run two Ubuntu virtual server.

Server A for baserow and server B for ubuntu server website.

As your experience, can you suggest me some expert idea?

Thank you!!

Perhaps in that case you might just want to bind Baserow on a different port? You can still just run it with docker.

When bind docker with another port, the link will change to website_domain:port

but my project using the link for all clients using link without mention port on the URL.
Many clients using that link without port on the link, I don’t want send update to all customers.

I think only use port 443 can do that.

You mentioned that you have nginx. So you should be point your domain without any port to Baserow even if it is running on a different port.