{"id":28070083,"url":"https://github.com/netceteragroup/rpi-ttn-gateway","last_synced_at":"2025-10-17T19:23:56.251Z","repository":{"id":45970549,"uuid":"86813935","full_name":"netceteragroup/rpi-ttn-gateway","owner":"netceteragroup","description":"Docker image for Raspberry PI TTN gateway based on Hypriot","archived":false,"fork":false,"pushed_at":"2021-11-23T13:20:06.000Z","size":30,"stargazers_count":19,"open_issues_count":3,"forks_count":9,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-04-16T18:18:54.924Z","etag":null,"topics":["docker","hypriot","lorawan","lorawan-gateway","raspberry-pi","thethingsnetwork"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/netceteragroup/rpi-ttn-gateway","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netceteragroup.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}},"created_at":"2017-03-31T11:54:32.000Z","updated_at":"2022-07-03T13:55:52.000Z","dependencies_parsed_at":"2022-09-23T08:53:24.286Z","dependency_job_id":null,"html_url":"https://github.com/netceteragroup/rpi-ttn-gateway","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/netceteragroup%2Frpi-ttn-gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netceteragroup%2Frpi-ttn-gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netceteragroup%2Frpi-ttn-gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netceteragroup%2Frpi-ttn-gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netceteragroup","download_url":"https://codeload.github.com/netceteragroup/rpi-ttn-gateway/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253808795,"owners_count":21967600,"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","hypriot","lorawan","lorawan-gateway","raspberry-pi","thethingsnetwork"],"created_at":"2025-05-12T19:36:54.611Z","updated_at":"2025-10-17T19:23:51.195Z","avatar_url":"https://github.com/netceteragroup.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raspberry PI TTN gateway\n[![Build Status](https://travis-ci.org/netceteragroup/rpi-ttn-gateway.svg?branch=master)](https://travis-ci.org/netceteragroup/rpi-ttn-gateway) [![Docker Pulls](https://img.shields.io/docker/pulls/netceteragroup/rpi-ttn-gateway.svg)](https://hub.docker.com/r/netceteragroup/rpi-ttn-gateway/) [![Docker Stars](https://img.shields.io/docker/stars/netceteragroup/rpi-ttn-gateway.svg)](https://hub.docker.com/r/netceteragroup/rpi-ttn-gateway/) [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/netceteragroup/rpi-ttn-gateway/blob/master/LICENSE)\n\nRaspberry PI TTN gateway image based on Hypriot. This dockerfile is heavily influenced by the install script from [The Things Network iC880a-based gateway](https://github.com/ttn-zh/ic880a-gateway).\n\n## Hardware Preperation\nThis image is made for and tested on a Raspberry Pi 3 together with a [IMST-iC880 SPI LoRaWAN concentrator](http://webshop.imst.de/ic880a-spi-lorawan-concentrator-868mhz.html).\n\n## OS preparation\nHere are the steps to get the host environment ready for this image:\n\n1. Download the latest HypriotOS from here: https://blog.hypriot.com/downloads/\n1. Install it on a SD card. Etcher is a easy-to-use tool for this: https://etcher.io/\n\t* Optional: place an empty `ssh` file in the root of the SD card to enable SSH access to the Pi\n1. Put the SD card into your Raspberry Pi and power it up\n1. Login with user `pirate` and password `hypriot` *Note*: default keyboard layout is [QWERTY](https://en.wikipedia.org/wiki/QWERTY). If you are using a [QWERTZ](https://en.wikipedia.org/wiki/QWERTZ) keyboard make sure you use the correct 'y' in the password\n\t* For SSH access: once the Pi has fully booted (the blinking LEDs have calmed down) it shows up with the default hostname `black-pearl` in your network.\n1. Run `sudo apt-get update \u0026\u0026 sudo apt-get install raspi-config kbd`. During setup you can choose a different keyboard layout if you need\n1. Run `sudo raspi-config` to\n\t* Set correct timezone: `4 Localisation Options \u003e I2 Change Timezones`\n\t* Enable SPI interface: `5 Interfacing Options \u003e P4 SPI \u003e Yes`\n1. Restart the Pi\n1. Find the Pi MAC address and generate gateway EUI (required in next step) by running `cat /sys/class/net/eth0/address | awk -F\\: '{print $1$2$3\"fffe\"$4$5$6}'`. This turns the [48-bit MAC address into EUI-64](https://en.wikipedia.org/wiki/MAC_address#Address_details), splits it in half and injects `fffe` (e.g. `b827eb8684a2` → `b827ebfffe8684a2`).\n1. Run\n\t```bash\n\tdocker run -it --privileged --net=host --restart=always \\\n\t-e PI_RESET_PIN=\u003coptional-see-explanation-below\u003e \\\n\t-e TTN_GATEWAY_SERVER_URL=\u003coptional-see-explanation-below\u003e \\\n\t-e GATEWAY_EUI=\u003cEUI-identified-in-previous-step\u003e \\\n\t-e GATEWAY_LAT=YOUR_LATITUDE \\\n\t-e GATEWAY_LON=YOUR_LONGITUDE \\\n\t-e GATEWAY_ALT=YOUR_ALTITUDE \\\n\t-e GATEWAY_EMAIL=YOUR_EMAIL \\\n\t-e GATEWAY_NAME=YOUR_GATEWAY_NAME \\\n\tnetceteragroup/rpi-ttn-gateway\n\t```\n\t* `PI_RESET_PIN` may or may not be required depending on how the concentrator is connected to the Pi. The default\n\treset pin configured by [the start script](https://github.com/ttn-zh/ic880a-gateway/blob/spi/start.sh#L4) is 25.\n\tInstallations with simple backplanes such as [the one from Gnz](https://www.tindie.com/products/gnz/imst-ic880a-lorawan-backplane-kit/)\n\t can go with the default value. More elaborate backplanes might rewire the reset pin. The [one from CH2i](https://github.com/ch2i/iC880A-Raspberry-PI)\n\t for example uses 17. Hence, you would say `docker run ... -e PI_RESET_PIN=17 ...`.\n\t * `TTN_GATEWAY_SERVER_URL` URL of the TTN API endpoint server to use, the default is `eu1.cloud.thethings.network`. Server address for other regions are listed here:\n  https://www.thethingsindustries.com/docs/getting-started/ttn/addresses/\n\n## Running as a deamon\nItem 9 above documents the Docker run command. If you would rather want to run the TTN container in daemon mode rather than interactive mode you would replace `-dt` with `-it`. This will put the Docker container process into the background and not block the CLI but you won't see the log output that normally spills to the console.\n\n`docker logs \u003ccontainer-id\u003e` could make that visible again if necessary. Or `docker attach \u003ccontainer-id\u003e`. Or `docker exec -i \u003ccontainer-id\u003e /bin/bash` and then poke around the container.\n\n## Building the image yourself\nTo build a (potentially customized) image yourself do as follows:\n```bash\n$ git clone https://github.com/netceteragroup/rpi-ttn-gateway\n$ cd rpi-ttn-gateway\n$ docker build -t \u003cyour-handle-here\u003e/rpi-ttn-gateway .\n```\n`\u003cyour-handle-here\u003e` can be anything that is uniquely you (e.g. name) but you might also use `rpi-ttn-gateway` w/o any \"prefix\".\n\n## Security considerations\nJust a few obvious measures you can/should think about before you release your new gateway into the wild.\n- It does help if the gateway is connected to the internet through a private network that's hard to penerate.\n- Change the default password: connect to the Pi and run `passwd` to use a custom password.\n- Change the default hostname: edit `/boot/device-init.yaml` and modify the `hostname` attribute ([source](https://blog.hypriot.com/faq/#how-can-i-change-the-hostname)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetceteragroup%2Frpi-ttn-gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetceteragroup%2Frpi-ttn-gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetceteragroup%2Frpi-ttn-gateway/lists"}