Feeding OpenSky Network

If you wish to feed OpenSky Network, follow the steps below.

The OpenSky Network is a non-profit association based in Switzerland. It aims at improving the security, reliability and efficiency of the air space usage by providing open access of real-world air traffic control data to the public.

The docker image ghcr.io/sdr-enthusiasts/docker-opensky-network contains the required feeder software and all required prerequisites and libraries. This needs to run in conjunction with ultrafeeder (or another Beast provider).

Obtaining an OpenSky Network Feeder Serial Number

First-time users should obtain a feeder serial number.

Firstly, make sure you have registered for an account on the OpenSky Network website, and have your username on-hand.

In order to obtain a feeder serial number, we will start a temporary container running opensky-feeder, which will connect to OpenSky Network and be issued a serial number. The temporary container will automatically be stopped and deleted after 60 seconds.

Inside your application directory (/opt/adsb), edit the .env file using your favourite text editor. Beginners may find the editor nano easy to use:

nano /opt/adsb/.env

This file holds all of the commonly used variables (such as our latitude, longitude and altitude). We're going to add our OpenSky username to this file. Add the following line to the file:

OPENSKY_USERNAME='YOUROPENSKYUSERNAME'
  • Replace YOUROPENSKYUSERNAME with the station key you retrieved earlier.

For example:

OPENSKY_USERNAME=johnnytightlips

To do this, run the command:

source ./.env
timeout 60s docker run \
    --rm \
    -it \
    -e LAT=${FEEDER_LAT} \
    -e LONG=${FEEDER_LONG} \
    -e ALT=${FEEDER_ALT_M} \
    -e BEASTHOST=ultrafeeder\
    -e OPENSKY_USERNAME=${OPENSKY_USERNAME} \
    ghcr.io/sdr-enthusiasts/docker-opensky-network:latest

Once the container has started, you should see output similar to the following:

As you can see from the output above, we've been allocated a serial number of -1408234269.

Update .env file with OpenSky-Network details

Inside your application directory (/opt/adsb), edit the .env file using your favourite text editor. Beginners may find the editor nano easy to use:

This file holds all of the commonly used variables (such as our latitude, longitude and altitude). We're going to add our OpenSky-Network username and serial to this file. Add the following lines to the file:

  • Replace YOUROPENSKYUSERNAME with your OpenSky Network username. Yo should have already done this in the previous step.

  • Replace YOUROPENSKYSERIAL with your OpenSky Network serial

For example:

Failure to specify the OPENSKY_SERIAL environment variable will cause a new feeder serial to be created every time the container is started. Please do the right thing and set OPENSKY_SERIAL!

Deploying feeder container

Open the docker-compose.yml file that was created when deploying ultrafeeder.

Append the following lines to the end of the file (inside the services: section):

To explain what's going on in this addition:

  • We're creating a container called opensky, from the image ghcr.io/sdr-enthusiasts/docker-opensky-network:latest.

  • We're passing several environment variables to the container:

    • BEASTHOST=ultrafeeder to inform the feeder to get its ADSB data from the container ultrafeeder

    • TZ will use the FEEDER_TZ variable from your .env file.

    • LAT will use the FEEDER_LAT variable from your .env file.

    • LONG will use the FEEDER_LONG variable from your .env file.

    • ALT will use the FEEDER_ALT_M variable from your .env file (as metres are required for this feeder).

    • OPENSKY_USERNAME will use the OPENSKY_USERNAME variable from your .env file.

    • OPENSKY_SERIAL will use the OPENSKY_SERIAL variable from your .env file.

  • We're using tmpfs for volumes that have regular I/O. Any files stored in a tmpfs mount are temporarily stored outside the container's writable layer. This helps to reduce:

    • The size of the container, by not writing changes to the underlying container; and

    • SD Card or SSD wear

Once the file has been updated, issue the command docker compose up -d in the application directory to apply the changes and bring up the adsbhub container. You should see the following output:

We can view the logs for the environment with the command docker logs opensky, or continually "tail" them with docker logs -f opensky. The logs will be fairly unexciting and look like this:

Once running, you can visit https://opensky-network.org/receiver-profile to view the data you are feeding to OpenSky-Network.

Advanced

If you want to look at more options and examples for the opensky container, you can find the repository here

Last updated

Was this helpful?