{"id":13688713,"url":"https://github.com/oofnikj/docker-openwrt","last_synced_at":"2025-05-01T20:30:30.558Z","repository":{"id":50768810,"uuid":"241304340","full_name":"oofnikj/docker-openwrt","owner":"oofnikj","description":"OpenWrt running in Docker","archived":false,"fork":false,"pushed_at":"2023-05-19T12:21:53.000Z","size":120,"stargazers_count":310,"open_issues_count":19,"forks_count":63,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-11-12T12:48:21.367Z","etag":null,"topics":["docker","openwrt","raspberry-pi","router"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oofnikj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-02-18T08:01:53.000Z","updated_at":"2024-10-31T11:54:16.000Z","dependencies_parsed_at":"2024-01-14T16:11:34.159Z","dependency_job_id":null,"html_url":"https://github.com/oofnikj/docker-openwrt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oofnikj%2Fdocker-openwrt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oofnikj%2Fdocker-openwrt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oofnikj%2Fdocker-openwrt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oofnikj%2Fdocker-openwrt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oofnikj","download_url":"https://codeload.github.com/oofnikj/docker-openwrt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251940363,"owners_count":21668522,"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":["docker","openwrt","raspberry-pi","router"],"created_at":"2024-08-02T15:01:20.807Z","updated_at":"2025-05-01T20:30:30.551Z","avatar_url":"https://github.com/oofnikj.png","language":"Shell","funding_links":[],"categories":["docker"],"sub_categories":[],"readme":"# OpenWrt in Docker\n\n[![pipeline status](https://gitlab.com/oofnik/docker-openwrt/badges/master/pipeline.svg)](https://gitlab.com/oofnik/docker-openwrt/-/commits/master)\n\nInspired by other projects that run `hostapd` in a Docker container. This goes one step further and boots a full network OS intended for embedded devices called [OpenWrt](https://openwrt.org/), so you can manage all aspects of your network from a user-friendly web UI.\n\nFor Raspberry Pi-specific instructions, see [Building on Raspberry Pi](docs/rpi.md).\n\n\n## Dependencies\n\n* docker\n* iw\n* iproute2\n* envsubst (part of `gettext` or `gettext-base` package)\n* dhcpcd\n\n## Build\nPre-built images are available on Docker Hub at `oofnik/openwrt`. Alternatively, build the image yourself using the `make build` target:\n```\n$ make build\n```\nIf you want additional OpenWrt packages to be present in the base image, add them to the Dockerfile. Otherwise you can install them with `opkg` after bringing up the container.\n\nA searchable package list is available on [openwrt.org](https://openwrt.org/packages/table/start).\n\n## Configure\n\nInitial configuration is performed using a config file, `openwrt.conf`. Values read from this file at runtime are used to generate OpenWrt format config files from templates in `etc/config/*.tpl`.\n\nYou can use the included `openwrt.conf.example` as a baseline, which explains the values.\n\nIt is also possible to make persistent changes in the UI and download a backup of your full router configuration by navigating to System \u003e Backup / Flash Firmware and clicking Backup.\n\n## Run\n\nPrepare your `openwrt.conf` file as explained above and execute the `make run` target:\n```\n$ make run\n```\n\nIf you arrive at `* Ready`, point your browser to http://openwrt.home (or whatever you set in `LAN_DOMAIN`) and you should be presented with the login page. The default login is `root` with the password set as `ROOT_PW`.\n\nTo shut down the router, press `Ctrl+C`. Any settings you configured or additional packages you installed will persist until you run `make clean`, which will delete the container.\n\n## Install / Uninstall\n```\n$ make install\n```\nInstall and uninstall targets for `systemd` have been included in the Makefile.\n\nInstalling will create and enable a service pointing to wherever you cloned this directory and execute `run.sh` on boot.\n\n## Cleanup\n```\n$ make clean\n```\nThis will delete the container and all associated Docker networks so you can start fresh if you screw something up.\n\n---\n\n## Notes\n\n### Hairpinning\n\nIn order for WLAN clients to see one another, OpenWrt bridges all interfaces in the LAN zone and sets hairpin mode (aka [reflective relay](https://lwn.net/Articles/347344/)) on the WLAN interface, meaning packets arriving on that interface can be 'reflected' back out through the same interface.\n\n`run.sh` tries to handle this if `WIFI_HAIRPIN` is set to true, and prints a warning if it fails.\nHairpin mode may not be needed in all cases, but if you experience an issue where Wi-Fi clients are unable to see each other despite AP isolation being disabled, this may fix it.\n\n### Network namespace\n\nFor `hostapd` running inside the container to have access to the physical wireless device, we need to set the device's network namespace to the PID of the running container. This causes the interface to 'disappear' from the primary network namespace for the duration of the container's parent process. `run.sh` checks if the host is using NetworkManager to manage the wifi interface, and tries to steal it away if so.\n\n### Addtional Docker services\n\nAdditional containers that are run alongside OpenWrt on the same physical host are directly accessible on the LAN. No port forwarding to the host is necessary. It's recommended to add static hostnames to be able to resolve local services on your LAN.\n\nSee [Monitoring with InfluxDB + Grafana](monitoring/README.md) for example.\n\n### Upgrading\n\nRead the [upgrade guide](docs/upgrade.md).\n\n---\n\n### Troubleshooting\n\nLogs are redirected to `stdout` so the Docker daemon can process them. They are accessible with:\n```\n$ docker logs ${CONTAINER} [-f]\n```\n\nAs an alternative to installing debug packages inside your router, it's possible to execute commands available to the host inside the network namespace. A symlink is created in `/var/run/netns/\u003ccontainer_name\u003e` for convenience:\n\n```\n$ sudo ip netns exec ${CONTAINER} tcpdump -vvi any \n```\n---\n## [OpenVPN Howto](docs/vpn.md)\n\n## [Bandwidth Monitoring Howto](docs/monitoring.md)\n\n## [Monitoring with InfluxDB + Grafana](monitoring/README.md)\n\n## [IPv6 Notes](docs/ipv6.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foofnikj%2Fdocker-openwrt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foofnikj%2Fdocker-openwrt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foofnikj%2Fdocker-openwrt/lists"}