Install NixOS on Liteserver: Difference between revisions

From NixOS Wiki
imported>Hugo-Heagren
Begin guide for installation on liteserver.
 
imported>Hugo-Heagren
mNo edit summary
Line 47: Line 47:
For more about this process, see [https://www.baeldung.com/linux/dns-resolv-conf-file the baeldung article] on DNS configuration, and the man page <code>resolv.conf(5)</code>
For more about this process, see [https://www.baeldung.com/linux/dns-resolv-conf-file the baeldung article] on DNS configuration, and the man page <code>resolv.conf(5)</code>


To test the connection try something like <code>ping www.example.com</code>. If this returns something meaningful, you the network is succesfully connected.
To test the connection try something like <code>ping www.example.com</code>. If this returns something meaningful, network is succesfully connected.


[[Category:Guide]]
[[Category:Guide]]

Revision as of 20:33, 11 January 2024

Note: This guide is a work in progress.

This guide describes how to install NixOS on liteserver, paying special attention to networking using liteserver's provided IPV6 subnets.

Installing the ISO on the vps

Register for a VPS with liteserver. You can't select NixOS at this point, but whatever you do select will be overwritten later (by the NixOS ISO) so it doesn't matter what you choose.

Once you have a VPS with liteserver, follow their manual installation guide. The most appropriate ISO is generally the minimal one.

NixOS installation process

Liteserver provides shell access to your VPS with an in-browser terminal emulator. The icon is a stylised 'VNC' under the 'server information' tab on the page for your VPS. Click the icon to open the terminal emulator. Now follow the NixOS manual, with specific guidance below. Given the above process of installing on the VPS, you should begin at Manual Installation. As the manual suggests, you should run:

sudo -i

Networking in the Installer

You must connect to the internet before proceeding. Even if you intend (as you should) to eventually configure network access declaratively in /etc/nixos/configuration.nix, during the installation process you will need to configure it non-declaratively by issuing commands in the terminal.

Your liteserver VPS will come with an IPV6 subnet (as described here). Find the IP address of your subnet in the information area for your VPS: under the 'Server Information' tab, go the 'Settings' subtab (lower down), then on the left go to 'Manage IPV6 Subnets'. There should be one subnet listed, with an IPV6 address. Now to add access to the subnet run:

ifconfig ens3 inet6 add <YOUR IPV6 ADDRESS>

Your IPV6 address can be abbreviated here (e.g. with :: in place of many 0s). See the IBM documentation for more information.

You may also need to run the following to ensure the network is active:

ifconfig ens3 up

Finally, you must configure DNS nameservers. The recommended nameservers for liteserver are listed at the bottom of this knowledgebase article, under the heading 'Recommended IPv6 DNS Resolvers'. Edit the file /etc/resolv.conf (e.g. with nano /etc/resolv.conf) and for every DNS resolver address add a new line of the following form:

nameserver <NAMESERVER ADDRESS>

For example, at the time of writing the recommended DNS nameservers are 2a01:6340:1:20:4::10 and 2a04:52c0:130:2a5c::10. So the lines to add look like this:

nameserver 2a01:6340:1:20:4::10
nameserver 2a04:52c0:130:2a5c::10

For more about this process, see the baeldung article on DNS configuration, and the man page resolv.conf(5)

To test the connection try something like ping www.example.com. If this returns something meaningful, network is succesfully connected.