The Things Network Stack V2
The Things Network is a global open crowdsourced Internet of Things data network.
When you get started with The Things Network, you'll probably have some questions. Here are some things you can do to find the answer to them:
Although we're all about building an open, public network, we understand that some people rather have everything privately on their own servers. On our website, you'll find some articles describing how you can set up a private routing environment and how you can deploy this environment using Docker.
First, you'll have to prepare your development environment. Follow the steps below to set up your development machine.
make. On Linux install
build-essential. On macOS,
makecomes with XCode or the developer tools. On Windows you can get
brew bundle. The Windows installer will setup and start RabbitMQ as a service. Use the
RabbitMQ Command Prompt (sbin dir)to run commands, i.e. to enable plugins.
topic. Using the management plugin, declare the exchange in the web interface
http://server-name:15672or using the management cli, run
rabbitmqadmin declare exchange name=ttn.handler type=topic auto_delete=false durable=true. If your handler's user has sufficient permissions on RabbitMQ, it will attempt to create the exchange if not present.
Next, you can clone this repository and set up the TTN part:
git clone --branch develop https://github.com/YOURUSERNAME/ttn.git $GOPATH/src/github.com/TheThingsNetwork/ttn
make buildto build both
make devto install the go binaries into
make linkto link them to
$GOPATH/bin/(In order to run the commands, you should have
export PATH="$GOPATH/bin:$PATH"in your profile).
ttnctlwith the settings in
.env/ttnctl.yml.dev-exampleby copying that file to
You can check your
ttnctlconfiguration by running
ttnctl config. It should look like this:
INFO Using config:
config file: /home/your-user/.ttnctl.yml data dir: /home/your-user/.ttnctl auth-server: https://account.thethingsnetwork.org
discovery-address: localhost:1900 router-id: dev handler-id: dev mqtt-address: localhost:1883
NOTE: From now on you should run all commands from the