Skip to main content

How to Setup Local Host Resolution Without DNS

Overview

In an Element Enterprise On-Premise environment, hostnames must resolve to the appropriate IP addresses. If you have a proper DNS server with records for these hostnames in place, then you will be good to go.

In the event that a DNS server is not available for proper hostname resolution, you may use /etc/hosts and host_aliases. This article will walk you through that.

If you choose to use this method, do note that federation outside of your local environment will not be possible. Further, using the mobile applications will not be possible as they must be able to access your environment, which typically requires DNS.

Further, this assumes that you are using the single node installer based on microk8s.

Steps

For single node installations with microk8s, if we were setting up was synapse and element and these ran on the local domain with the IP of 192.168.122.39, we would set the following entries in /etc/hosts:

192.168.122.39 element.element.local admin.element.local synapse.element.local integrator.element.local element.local

and the following in host_aliases in the parameters.yml file found in your configuration directory:

host_aliases:
  - ip: "192.168.122.39"
    hostnames:
      - "element.element.local"
      - "admin.element.local"
      - "synapse.element.local"
      - "integrator.element.local"
      - "element.local"