-- Leo's gemini proxy
-- Connecting to nuacht.flounder.online:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini; charset=utf-8
After a disk failing I've decided to rebuild my server from scratch and document it here. It serves:
- Base System: RPi 3 & SSD dock
- Connectivity: Samba and SSH
- Gemini: agate
- HTTP: lighttpd
- Scripts
- Configs
1. I used rpi-imager and selected the image that facilitates USB booting. It's available in a sub menu. Boot this without other peripherals and it flashes the Pi so that it can boot without the SD card in future.
2. Use rpi-imager again to install the "Lite" version of Raspian. Once selected, click the cog/gear icon and choose to enable SSH since it's a server system. We don't need a keyboard, mouse and monitor for this. Set your hostname and other preferences here. Then select your target device; your connected SSD drive and click "Write" to begin writing the operating system to the SSD. Afterwards, you can remove it from your computer, connect it to the Pi and boot the Pi with the ethernet cable connecting it to your router.
From here, you have a base system that you can SSH into and install software on.
SSH is best in most cases and already configured, but once in a while being able to mount a share is a huge help.
Install samba and set up shares. See //nuacht.flounder.online/gemlog/2022-07-12-samba.gmi for details
Download the agate binary and run the command against your domain directory. See here for notes, including crontab note to survive reboots: https://nuacht.flounder.online/gemlog/2023-04-27-gemini-server.gmi
sudo apt install lighttpd
> This package is becoming harder to find in repositories because it's so old and unmaintained. There might be better alternatives out there these days.
nano /etc/lighttpd/lighttpd.conf
Update this file to point to where your content is actually stored. Mine is ~/<path-to-site>/
It runs after booting automatically but if you need to restart it (maybe to pick up config changes), just issue:
service lighttpd restart
Some expected files are symlinked. Should those need to be recreated, do:
for f in *.abc; do ln -sf $(pwd)/$f ~/path/to/destination/; done
User crontabs are stored in /var/spool/cron/crontabs. Check your backups here to retrieve old values.
Full tmux entry here https://nuacht.flounder.online/gemlog/2022-07-13-tmux.gmi
~/.bashrc
lynx(?)
libxml2-utils
certificates for Freeshell.de so files can be transferred without interaction
/etc/lighttpd/lighttpd.conf
~/.certificates (belonging to agate)
~/.nanorc should contain:
set softwrap set positionlog
Disable annoying message with:
sudo raspi-config nonint do_wifi_country XX
-- Response ended
-- Page fetched on Tue May 21 22:21:29 2024