Airflow network access through raspberry pi 4

Viewed 92

I have been struggling a bit to get access to airflow from outsite my network. I have airflow running on a raspberry pi 4, and all seems to be working just fine, I can access it via http://localhost:8080.

I have also set forwarding rules in my home router pointing to the raspberry pi: Port forwarding specifications

The port forwarding is working since I can see it open using an external tool, and I have also set up a SSH port forwarding to access my raspberry pi from outside my local network. So accessing http://my-public-ip:123 should be taking me to my aiflow web ui, but instead I just got "This site can't be reached".

Can anybody spot what I have done wrong or if I skipped any step of the process? Thanks in advance.

1 Answers

Are you running Airflow with Docker or you have it installed? If using Docker, setting the webserver's service port to 127.0.0.1:8080:8080 it's the first step.
Secondly, you might need to look into the config webserver options. You will need to set the AIRFLOW__WEBSERVER__BASE_URL: 'http[s]://your_address/airflow' environment variable and install a reverse proxy (I suggest you nginx); you can find more details here. After you've done this, don't forget to also set the environment variable AIRFLOW__WEBSERVER__ENABLE_PROXY_FIX: 'true

Related