Local Airflow instance using astro cli on Linux

Good morning,

I have been successfully using the Windows version of astro.exe to setup and start local developer instances of Airflow running containers within Docker Desktop.

With the latest version of Windows and WSL2 I can now run Docker Desktop inside of a Linux distro within Windows. This means I can also run the Linux version of the Astro CLI instead.

I was able to successfully install the CLI using curl and I can run the tool. However, when I run astro dev init within my empty project folder, I receive the error “Error: No context set, have you authenticated to a cluster?” We are in the process of setting up Astronomer Enterprise, but I don’t have access to it yet.

Is there a way to run the CLI within Linux to run a completely local version of Airflow? Also, one note - I grabbed version 0.16.1 of the CLI for Windows and I encounter the same issue. So it appears to be a change to the CLI and not necessarily something specific to Linux?


Hi @larry.komenda! Thanks for reaching out here. The issue you’re seeing with the Astronomer CLI is actually due to a bug in CLI v0.16.1. Our intention is NOT to block users from running $ astro dev init, $ astro version (and other commands) locally, so apologies for the inconvenience there. The Astro CLI is open-source and we want to encourage any developer looking to spin up Airflow on their machine to use it, regardless of whether or not they’re running on Astro.

Two options for you, specifically:

1. If you have access to Astronomer Enterprise now, stay on v0.16.1 and authenticate before running $ astro dev init:

$ astro auth login <BASEDOMAIN>

2. If you still don’t have access to Astronomer, downgrade to v0.15.0 of the CLI by running the following:

$ curl -sSL https://install.astronomer.io | sudo bash -s -- v0.15.

From there, you should be able to run $ astro dev init and $ astro version with no problem. We’ll have a fix for the 0.16.1 bug out shortly in a followup patch release. Like you said, this is a problem with the Astro CLI and not anything related to Linux specifically.

@larry.komenda Hope this helps - let me know if you have any other issues.

1 Like

Thanks, @paola. We are close to setting up our Astronomer Enteprise environment, so once we have it I’ll go back to 0.16.1. In the meantime I’ll use 0.15.0.

1 Like

Cool, sounds good @larry.komenda - lemme know if you have any trouble.

0.15.0 got me going. Thanks again for the update!

1 Like

Excellent! Thanks again for reporting this. Patch will be released on Thursday :nerd_face: