This step is Deprecated. instead of using a Static IP, it is better to use avahi-daemon
Also, the instructions below don't work on ubuntu 19.04
The file to use on 19.04 is: /etc/netplan/50-cloud-init.yaml
I want my tvheadend server to use a static IP address. So, each raspberry pi running kodi/osmc can be set up using this IP address.
Step 1. Create a static IP address
Open a terminal window on a MacBook and ssh into the tvheadend server
Edit the following file
$ sudo nano /etc/netplan/01-netcfg.yaml
with these contents:
# This file sets a static IP address for the TVheadend server.
# YAML does not like tabs. Use spaces and use them consistently
#
# The device name (enpes0) is found by running either of the following commands:
# $ ip a
# $ ifconfig -a
#
# Changes to other files are required.
#
# To disable cloud-init's network configuration capabilities, write a file
# $ sudo nano /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
#
# network: {config: disabled}
#
# After any changes to these files, run the command:
# $ sudo netplan apply
#
# If there are issues, then run the command:
# $ sudo netplan --debug apply
#
# The nameservers below are the one's used by my gateway (Broadband tab, Status tab)
# Google's dns servers can be used
# addresses: [8.8.4.4, 8.8.8.8]
network:
version: 2
renderer: networkd
ethernets:
enp3s0:
dhcp4: no
dhcp6: no
addresses: [192.168.1.110/24]
gateway4: 192.168.1.254
nameservers:
addresses: [8.8.4.4, 8.8.8.8]
addresses: [68.94.156.9, 68.94.157.9]