How to locally access Apache Airflow webserver on a remote server

Viewed 1806

I have an Ubuntu server where i currently have a number of scripts automated with cron. I would like to move to Apache Airflow. I have some experience with Airflow using it locally. My question is if i can setup airflow on the Ubuntu server but access the web server on my local windows 10 desktop. If so - how do you do that? Would I use port forwarding?

Thx!

2 Answers

Matthew, I dont know if you still in doubt, but, I guess its a matter of port forwarding

On your ubuntu server execute airflow normally, like:

airflow webserver -p 8080

Airflow will tell you what is the address that its running (usually http://0.0.0.0/8080)

After that, on you windows 10's prompt execute the folling command:

ssh -N -f -L localhost:<local port>:localhost:<remoteport> <user>@<remote server address> -p <server port>

Hope it helped you :D

Load airflow webserver with hostname 0.0.0.0. For example:

airflow webserver --port 8080 --hostname 0.0.0.0

Then point your browser to your remote server IP with port specified:

http://123.123.123.123:8080

Remember to check your firewall and or security group allows port 8080.

Related