GitPedia

Weewx docker

Docker container for WeeWx weather station server

From felddy·Updated May 18, 2026·View on GitHub·

This docker container can be used to quickly get a [WeeWX](http://weewx.com) instance up and running. The project is written primarily in Python, distributed under the MIT License license, first published in 2019. Key topics include: container, docker, docker-container, hacktoberfest, weather.

Latest release: v5.1.0+r1
December 30, 2024View Changelog →

weewx-docker 🌩🐳

GitHub Build Status
OpenSSF Scorecard
CII Best Practices
CodeQL
WeeWX Version

Docker Pulls
Docker Image Size (latest by date)
Platforms

This docker container can be used to quickly get a
WeeWX instance up and running.

Running

The easiest way to start the container is to create a
docker-compose.yml similar to the following. If you use a
serial port to connect to your weather station, make sure the
container has permissions to access the port.

Modify any paths or devices as needed:

yaml
--- name: "weewx" services: weewx: image: felddy/weewx:5 volumes: - type: bind source: ./data target: /data devices: - "/dev/ttyUSB0:/dev/ttyUSB0"
  1. Create a directory on the host to store the configuration and database files:

    console
    mkdir data chown 1000:1000 data
  2. If this is the first time running weewx, use the following command to start
    the container and generate a configuration file:

    console
    docker compose run --rm weewx
  3. The configuration file will be created in the data directory. You should
    edit this file to match the setup of your weather station.

  4. When you are satisfied with configuration the container can be started in the
    background with:

    console
    docker compose up --detach

Upgrading

  1. Stop the running container:

    console
    docker compose down
  2. Pull the new images from the Docker hub:

    console
    docker compose pull
  3. Update your configuration file (a backup will be created):

    console
    docker compose run --rm weewx station upgrade
  4. Read through the new configuration and verify.
    It is helpful to diff the new config with the backup. Check the
    WeeWX Upgrade Guide
    for instructions for specific versions.

  5. Start the container up with the new image version:

    console
    docker compose up --detach

Migrating

If you are migrating a WeeWX installation, you need to configure the logger to
write to the console. Add the following to your weewx.conf file to see the log
output in the container logs:

ini
[Logging] [[root]] level = INFO handlers = console,

Installing WeeWX Extensions

If arguments are passed to the container, they are forwarded on to the
weectl command. This
can be used to install extensions:

console
docker compose run --rm weewx \ extension install --yes \ https://github.com/matthewwall/weewx-windy/archive/master.zip
console
docker compose run --rm weewx \ extension install --yes \ https://github.com/matthewwall/weewx-mqtt/archive/master.zip

Installing Python Packages

To install and persist Python packages, use the pip command. The libraries
will be installed into the data volume, ensuring they persist between
container restarts.

console
docker compose run --rm --entrypoint pip weewx \ install git+https://github.com/felddy/weewx-home-assistant@v1.0.0

Image tags

The images of this container are tagged with semantic
versions
that align with the version and build of
WeeWX
that they support.

[!TIP]
It is recommended that users use the major version tag: :5 Using the major
tag will ensure that you receive the most recent version of the software that
is compatible with your saved data, and prevents inadvertent upgrades to a new
major version.

Image:tagDescription
felddy/weewx:5The most recent image matching the major version number. Most users will use this tag.
felddy/weewx:5.1The most recent image matching the major and minor version numbers.
felddy/weewx:5.1.0An exact image version.

See the tags tab on Docker
Hub for a list of all the supported tags.

Volumes

Mount pointPurpose
/dataWeeWX root directory

Building from source

Build the image locally using this git repository as the build context:

console
docker build \ --tag felddy/weewx:5.1.0 \ https://github.com/felddy/weewx-docker.git#develop

Cross-platform builds

To create images that are compatible with other platforms you can use the
buildx feature of
Docker:

  1. Copy the project to your machine using the Clone button above
    or the command line:

    console
    git clone https://github.com/felddy/weewx-docker.git cd weewx-docker
  2. Build the image using buildx:

    console
    docker buildx build \ --platform linux/amd64 \ --output type=docker \ --tag felddy/weewx:5.1.0 .

Contributing

We welcome contributions! Please see CONTRIBUTING.md for
details.

License

This project is released as open source under the MIT license.

All contributions to this project will be released under the same MIT license.
By submitting a pull request, you are agreeing to comply with this waiver of
copyright interest.

Contributors

Showing top 12 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from felddy/weewx-docker via the GitHub API.Last fetched: 6/14/2026