I have successfully self-hosted baserow on my local workstation. API was working fine using localhost. Soon as I changed my IP to be accessed externally and got a new Token and API using the IP address, I suddently couldn’t access the HTTP request using the API. Im only able to access the database using the external IP on an external device in the browser. My local IP somehow cannot work with an IP address. It only works with localhost or IP 172.0.0.1
This is the error I’m getting after API setiting: TypeError: Failed to fetch. Does the server allow CORS. I’m using appgyver for frontend.
I got the exact same error using Nocodb. Are there any other configurations I need to introduce to resolve my local IP with localhost?
What commands if any did you use to start your Baserow server?
Command is in the image above
Describe the problem
Describe, step by step, how to reproduce the error or problem you are encountering in as much detail as possible. Provide screenshots and videos.
Provide screenshots or include share links showing:
Your Baserow Database and all of it’s tables
Any relevant Baserow tables and all of their fields
Any relevant Baserow views
How many rows in total do you have in your Baserow tables?
Self Hosters Only Please attach full logs from all of Baserow’s services (docker logs baserow or docker-compose logs) or if they contain sensitive information provide censored snippets of relevant errors.
I’m not sure on the appgyver details but what URL/IP/Hostname have you configured appgyver to use when connecting to Baserow?
To access the API using any hostname/IP address other than localhost/127.0.0.1/BASEROW_PUBLIC_URL you need to add these extra hostnames/ip addresses to the BASEROW_EXTRA_ALLOWED_HOSTS env var as a comma separated list.
Secondly, when you say “Soon as I changed my IP to be accessed externally” what specifically and exactly do you mean step by step?
The http://192.168.0.118 is a local IP address, attempting to connect to that IP address from an external network won’t work. Can you provide more details on your networking setup/where you are running the Baserow server exactly/where are you trying to access your Baserow server from exactly.
Thanks for your reply. I will first attempt adding extra hostnames/ip addresses to the BASEROW_EXTRA_ALLOWED_HOSTS env var.
The local IP is intended to connect to the same LAN. I’m able to access Baserow using a workstation on the same LAN. Its the API that doesn’t work with a basic Cors error.
My network setup is a simple LAN with all devices on the same network 192.168.0.100 - 192.168.0.254. Baserow is running in docker as the server. I’m accessing Baserow sucessfully on the same network. What’s failing is the API. Yes its working when configured as localhost but failing when configured as local IP.
I suppose I may need to configure reverse proxy using Nginx. Portainer seems to be the easier way to achive this.