{"id":13406886,"url":"https://github.com/WebThingsIO/gateway","last_synced_at":"2025-03-14T11:30:49.561Z","repository":{"id":37762833,"uuid":"84347372","full_name":"WebThingsIO/gateway","owner":"WebThingsIO","description":"WebThings Gateway","archived":false,"fork":false,"pushed_at":"2024-08-23T21:08:44.000Z","size":18352,"stargazers_count":2605,"open_issues_count":298,"forks_count":333,"subscribers_count":103,"default_branch":"master","last_synced_at":"2024-08-23T22:24:05.212Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"http://webthings.io/gateway","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WebThingsIO.png","metadata":{"files":{"readme":"README.docker.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-08T17:22:42.000Z","updated_at":"2024-08-23T21:08:48.000Z","dependencies_parsed_at":"2023-11-11T19:28:38.240Z","dependency_job_id":"a9a61625-58e3-4a07-9c0b-5b703ce42ca0","html_url":"https://github.com/WebThingsIO/gateway","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebThingsIO%2Fgateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebThingsIO%2Fgateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebThingsIO%2Fgateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebThingsIO%2Fgateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebThingsIO","download_url":"https://codeload.github.com/WebThingsIO/gateway/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243569135,"owners_count":20312366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest"],"created_at":"2024-07-30T19:02:42.086Z","updated_at":"2025-03-14T11:30:47.307Z","avatar_url":"https://github.com/WebThingsIO.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","hacktoberfest","JavaScript","JavaScript (485)","Apps"],"sub_categories":["IoT"],"readme":"# WebThings Gateway\n\nDocker image based on Debian Buster for running the\n[WebThings Gateway](https://github.com/WebThingsIO/gateway). The image\nis built for AMD64, ARMv7, and ARMv8 (AArch64).\n\n## Compatibility\n\nWhile the gateway doesn't necessarily require full local network access, some\nadd-ons may. Therefore, it is best to run with the `--network=\"host\"` flag.\nCurrently, this flag will not work when using\n[Docker for Mac](https://docs.docker.com/docker-for-mac/) or\n[Docker for Windows](https://docs.docker.com/docker-for-windows/) due to\n[this](https://github.com/docker/for-mac/issues/68) and\n[this](https://github.com/docker/for-win/issues/543).\n\n## Usage\n\n* On Linux:\n\n    ```shell\n    docker run \\\n        -d \\\n        -e TZ=America/Los_Angeles \\\n        -v /path/to/shared/data:/home/node/.webthings \\\n        --network=\"host\" \\\n        --log-opt max-size=1m \\\n        --log-opt max-file=10 \\\n        --name webthings-gateway \\\n        webthingsio/gateway:latest\n    ```\n\n* On Windows or macOS:\n\n    ```shell\n    docker run \\\n        -d \\\n        -p 8080:8080 \\\n        -p 4443:4443 \\\n        -e TZ=America/Los_Angeles \\\n        -v /path/to/shared/data:/home/node/.webthings \\\n        --log-opt max-size=1m \\\n        --log-opt max-file=10 \\\n        --name webthings-gateway \\\n        webthingsio/gateway:latest\n    ```\n\n### Parameters\n\n* `-d` - Run in daemon mode (in the background)\n* `-e TZ=America/Los_Angeles` - Set the time zone to `America/Los_Angeles`. The\n  list of names can be found\n  [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List).\n* `-v /path/to/shared/data:/home/node/.webthings` - Change\n  `/path/to/shared/data` to some local path. We are mounting a directory on the\n  host to the container in order to store the persistent \"user profile\" data,\n  e.g. add-ons, logs, configuration data, etc.\n* `--network=\"host\"` - Shares host networking with container (**highly\n  recommended**, needed by some addons, -p is ignored if this option is used).\n* `-p 8080:8080` / `-p 4443:4443` - Forward necessary ports to the container\n  (ignored if `--network=\"host\"` is present).\n* `--log-opt max-size=1m` - limit the log size to 1 MB\n* `--log-opt max-file=10` - limit the number of saved log files to 10\n* `--name webthings-gateway` - Name of the container.\n\n## Changing ports in `--network=\"host\"` mode\n\nCreate a file `local.json` and map it to\n`/path/to/shared/data/config/local.json` (where `/path/to/shared/data` is the\nvolume mounted to `/home/node/.webthings`). Contents of the file:\n\n```json\n{\n  \"ports\": {\n    \"https\": 8081,\n    \"http\": 8080\n  }\n}\n```\n\nEdit the ports as you like.\n\n## Using docker-compose\n\n```\ndocker-compose up -d\n```\n\n## Connecting\n\nAfter running the container, you can connect to it at:\nhttp://\u0026lt;host-ip-address\u0026gt;:8080\n\n## Building\n\nIf you'd like to build an image yourself, run the following:\n\n```shell\ngit clone https://github.com/WebThingsIO/gateway\ncd gateway\ndocker build -t gateway .\ndocker run \\\n    -d \\\n    -e TZ=America/Los_Angeles \\\n    -v /path/to/shared/data:/home/node/.webthings \\\n    --network=\"host\" \\\n    --log-opt max-size=1m \\\n    --log-opt max-file=10 \\\n    --name webthings-gateway \\\n    gateway\n```\n\nYou can add the following build args:\n* `--build-arg \"gateway_url=https://github.com/\u003cyour-fork\u003e/gateway\"`\n* `--build-arg \"gateway_branch=\u003cyour-branch\u003e\"`\n* `--build-arg \"gateway_addon_version=\u003cyour-version\u003e\"`\n\n## Notes\n\n* If you need to use Zigbee, Z-Wave, or some other add-on which requires\n  physically attached hardware, you will have to share your device into your\n  container, e.g. `--device /dev/ttyACM0:/dev/ttyACM0`. They will also need to\n  be owned by GID 20, which corresponds to the `dialout` group in the\n  container. This can be done using udev rules or something else.\n* If you need to use GPIO in the container (e.g. on a Raspberry Pi host), you\n  will need to either run in privileged mode with `--privileged` or share in\n  your sysfs filesystem with `-v /sys:/sys`. The sysfs nodes will also need to\n  be owned by GID 997, which corresponds to the `gpio` group in the container.\n* If you need to use Bluetooth in the container, you will need to disable BlueZ\n  on the host (if running), e.g. `systemctl disable bluetooth`, and you will\n  need to run the container in privileged mode, i.e. `--privileged`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWebThingsIO%2Fgateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FWebThingsIO%2Fgateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWebThingsIO%2Fgateway/lists"}