Configure server

This page explains what to configure after installing the server OS.

Requirements - Arch Based

Install network package:

sudo pacman -Sy net-tools

Configure SSH

Install and Enable package (Arch Based):

sudo pacman -Sy openssh && sudo systemctl enable sshd.service --now

Static IP Address

Important to define a fixed IP on the server to access it in the future.

Programs Network monitoring

  • nload

  • vnstat

  • netdata

Configure Network

View your IP address:

ip ad
ifconfig

Save ipv4 and ipv6 to set fix IP, example:

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.103  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::8fe2:dccd:bba7:7d40  prefixlen 64  scopeid 0x20<link>
        inet6 2804:cb0:a405:a100:ebb6:c3ca:7bf8:7d00  prefixlen 64  scopeid 0x0<global>
        ether b8:27:eb:d7:15:50  txqueuelen 1000  (Ethernet)
        RX packets 467  bytes 67427 (65.8 KiB)
        RX errors 0  dropped 170  overruns 0  frame 0
        TX packets 188  bytes 24081 (23.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions

Arch Based

Access the configuration directory:

cd /etc/systemd/network

Edit the configuration file (you can make a backup at this step):

nano 20-ethernet.network

Define the address searched in the previous step, example config:

[Network]
Address=XXXXXXXXXXXXXXXXXX/64
Address=XXX.XXX.X.XX/24
Gateway=192.168.1.1
DNS=192.168.1.1
DNS=2606:4700:4700::1111

Debian Based

DNS file configuration:

sudo apt install dhcpcd
sudo systemctl enable dhcpcd --now
sudo nano /etc/resolv.conf

Access the IP configuration:

sudo nano /etc/dhcpcd.conf

Example:

hostname
clientid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option interface_mtu
require dhcp_server_identifier
slaac hwddr

interface eth0
    static ip_address=192.168.1.103/24
    static routers=192.168.1.1
    static domain_name_servers=1.1.1.1
  • NETWORK – your network connection type: eth0 (Ethernet) or wlan0 (wireless).

  • METRIC - Initialization interface, biggest most priority.

  • STATIC_IP – the static IP address you want to set for the Raspberry Pi.

  • ROUTER_IP – the gateway IP address for your router on the local network.

  • DNS_IP – the DNS IP address (typically the same as your router’s gateway address).

Last updated