This repository provides a basic Ansible playbook to setup a working LoRa Server environment.
It will:
- Setup firewall rules and only whitelist the configured IP addresses in iptables (22 for SSH and 80 for HTTP which needs to be accessible by Let's Encrypt will be open for all IPs)
- Setup Mosquitto
- Setup Redis
- Setup PostgreSQL (including the creation of a loraserver database)
- Setup LoRa Gateway Bridge
- Setup LoRa Server
- Request a HTTPS certificate from Let's Encrypt
This playbook has been tested on a DigitalOcean.com Ubuntu 16.04.x image. Don't have a DigitalOcean account yet? Use this link and get $10 in credits for free :-)
On the machine from where you will execute this Ansible playbook, make sure
you have a recent Ansible version installed. You can install Ansible with
pip (pip install ansible
) or using Homebrew (OS X) (brew install ansible
).
- Create a new Ubuntu 16.04.x image
- Configure a DNS record for your image and wait until this record resolves
- Copy the
inventory.example
file toinventory
and replaceexample.com
with the hostname created in step 2 - Copy the
group_vars/all.yml.example
togroup_vars/all.yml
and change the settings where needed.
See also the following links for more documentation:
Run the following command to deploy your LoRa Server instance:
ansible-playbook -i inventory full_deploy.yml