<< Go back to Posts
Warning : This document is still a draft

Configuring a home server





Introduction

Recently, I got for free two small e-PC with an SSD of 128GB.

This is perfect for a home server.

Here, I describe the “first” configuration round.

OS Install

Created Ubuntu-24-server booting USB key, using the native “disk creator” linux tool.

Used the default installation with additional drivers + NextCloud + OpenSSH

For the install, I connected a screen with HDMI, a keyboard + Ethernet.

SSH Keys

I can connect to the server using loging / password with ssh mywebserver@192.168.1.8 (IP can be obtained with ifconfig). Nevertheless, that’s not convenient, for instance when you do scp with several files.

The alternative to password login is to connect using SSH keys.

Create SSH key (if you do not have any yet)

ssh-keygen will do the job.

Copy Public Key

The ubuntu “server” distrib has no graphical interface (you work in a shell all the time, no mouse), so connecting a screen and a keyboard VS SSH, SSH is more convenient.

The easiest way to copy public key from local to remote (this server) is: ssh-copy-id mywebserver@192.168.1.8

Otherwise, on the remote server, the public key should be in one line on .ssh/authorized_keys.

Connect with public key

To connect:

ssh mywebserver@192.168.1.8 -i ./ssh/id_myauthorizedkey

I skip the password logging, but I still have a long prompt to connect.

Alias

After that, I made an alias to avoid typing the server IP all the time. On the local computer, vim .ssh/config:

Host webserver # the alias name
    Hostname 192.168.1.8
    User mywebserver
    IdentityFile ~/.ssh/id_mykey

Now, I can connect using ssh webserver without typing the password.


Kiwix


Energy consumption

How much would cost my server running day and night ?

powerstat runs for one minute and compute the average consumption for you.

0.7W, which is a very good.

  • For one year, 0.7 x 24 x 365.25 = 6.1 kWh
  • Currently, the kWh is 0.1775€/kWh
  • Therefore, the server would cost 1.1€ for one year

(However), I compared with a plug metter: 7W … so 10 times more. When the computer is off, the AC-DC converter consummes 0.7W

AC-DC spec

WA36A12.

  • Accept AC 100-240V with max 0.9A
  • Return 12V x 3A (so at max 26W)

It is likely that because we consumme very few of the energy available (0.7/26 = 2.7 %)


LVM resize

In the default ubuntu server install, it is suggested to use half of the disk space. I did not pay that much attention to it.

But as I have a 128GB disk, each GB count. Therefore, I wanted to resize the disk to take all the possible space.

TODO



>> You can subscribe to my mailing list here for a monthly update. <<