Raspberry Pi as Homeserver

This page describes the setup of a Raspberry Pi as Homeserver with the following functions:

Basic Installation

Download Debian Wheezy image (2012-08-08-wheezy-armel.zip) from Raspberry Pi homepage.

Unzip image and write it to SD card.

# dd bs=4M if=/home/seelmann/Development/RPi/2012-08-08-wheezy-armel.img of=/dev/mmcblk0

Mount partitions.

Use maximum memory for applications as the Pi is operated in headless mode and no video output is required.

# cp arm240_start.elf start.elf

Create link to start SSH server:

# cd etc/rc2.d
# ln -s ../init.d/ssh S03ssh

Set a static IP address:

# cat /etc/network/interfaces 
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

# cat /etc/resolv.conf

Boot the Pi.

Connect via SSh.

$ ssh pi@

Run basic Pi configuration:

$ sudo raspi-config

Delete unused software packages, in reverse order of /var/log/apt/history.log, including automatically installed packages:

# apt-get purge --auto-remove scratch
# apt-get purge --auto-remove debian-reference-en dillo idle3 python3-tk idle python-pygame python-tk
# apt-get purge --auto-remove lightdm gnome-themes-standard gnome-icon-theme raspberrypi-artwork
# apt-get purge --auto-remove gvfs-backends gvfs-fuse desktop-base lxpolkit netsurf-gtk zenity xdg-utilse
# apt-get purge --auto-remove mupdf gtk2-engines alsa-utils  lxde lxtask menu-xdg gksu
# apt-get purge --auto-remove midori xserver-xorg xinit xserver-xorg-video-fbdev
# apt-get purge --auto-remove libraspberrypi-dev libraspberrypi-doc
# apt-get purge --auto-remove dbus-x11 libx11-6 libx11-data libx11-xcb1 x11-common x11-utils
# apt-get purge --auto-remove lxde-icon-theme gconf-service gconf2-common


# apt-get update
# apt-get dist-upgrade
# apt-get install cups

Allow remote administration:

# cupsctl --share-printers --remote-admin --remote-printers

Add pi user to lpadmin group:

# usermod -a -G lpadmin pi

Use CUPS web UI:

Scan Server

# apt-get install sane-utils libsane

Test if scanner is supported:

# sane-find-scanner
# scanimage -L

Allow remote access

# cat /etc/sane.d/saned.conf

Activate saned:

# cat /etc/default/saned

# /etc/init.d/saned start

On the client add the IP of the scan server to /etc/sane.d/net.conf:

# cat /etc/sane.d/net.conf

Chat Server

# apt-get install prosody
# prosodyctl adduser foo@localhost