Local domains for apps
On the internet, if you register a domain like mynode.org.au then you also have the ability to use any “sub-domains” that you want, like app1.mynode.org.au.
Local network domains
The domain system is really intended to be used for computers connected to the internet, however there are a couple of options available in an offline situation.
localhostalways refers to the computer you are using.localrefers to computers on your local network
This second example, .local is what we’re going to use here. When we worked on Logging in to our raspberry pi, we learned that if we gave it a hostname like lores, then we could log into it at lores.local, which is powered by mDNS.
Given all this, we need a local domain for each app, and we can’t use subdomains, so at LoRes we’ve decided to use hyphens. Our apps will be at local domains like email-lores.local, or more generally APPNAME-HOSTNAME.local.
Installing Co-op Cloud mDNS Publisher
To cut a long story short, there’s just one thing we need to install on the Raspberry Pi in order to make it announce a local domain for each app, it’s a little app we built called ccmdns.
You download it by running the following commands on your Raspberry Pi.
wget https://github.com/local-resilience-tech/coop-cloud-mdns-publisher/releases/download/v0.3.0/ccmdns_0.3.0-1_arm64.deb
sudo apt install ccmdns_0.3.0-1_arm64.deb
Once it’s installed, it stays running, and for every Co-op cloud app you install, it will automatically start publishing a new domain on your local network of the form APPNAME-HOSTNAME.local.
Checklist
You should have completed:
- ccmdns is installed and running on our Raspberry Pi