[Planning] Baremetal self-hosting workshop in Bangalore

This is a proposal and open discussion thread for doing an in-person bare-metal self-hosting workshop in Bangalore

Objectives:

  1. Get people started on hardware self-hosting
  2. Create and maintain a self-hosting community that can support and grow together
  3. Gain valuable insights, discover blind-spots and validate self-hosting strategies

Prerequisites:

  1. Self-hosting hardware:
  • Old laptop/computer with an SSD (Preferably)
  • Raspberry Pi or any other single board computer that can run Linux, and connect to the internet
  • Spare mobile phone with Linux using Project Renegade / Postmarket OS / Ubuntu Touch (Maybe we should do this separately?)
    Note: We will cover briefly discuss about making your self-hosting setup reliable with redundant storage, etc. We will start simple for now
  1. Software:
  • Linux distro of choice installed (Suggested: Ubuntu/Debian)
  • Docker
    Note: There are countless ways to self-host, but we will stick to docker for the workshop so that everyone can progress together and it’s easy to troubleshoot
  1. Personal laptop
  • You will still need a laptop ideally to configure your server
  1. Credit card?
  • In case you choose to run your own cloud VPS for forwarding traffic to your machine. There are other options (Please read further)
  1. Experience:
  • Suggested: Self hosting 101 from mon.school
  • Minimum: Basic familiarity with Linux command line and Docker

Brief technical walk through:

  1. Validate everyone’s hardware is ready
  2. Get the hardware connected to internet with SSH access from their laptop
  3. Activity 1 - Setup Local reverse proxy with personal website/blog (Ghost?) - Helloworld
  4. Activity 2 - Make it accessible from internet
  5. Activity 3 - Setup and expose Matrix + Bridges
  6. Discussion and next steps around storage, network and power redundancy.
  7. Activity 4 - Opt-in community uptime leaderboard
  8. Discussion around maintainance and community support

Will post in-depth walkthrough with tools, commands and background in coming days

Outcomes:

  1. A community of people are now self-hosting (personal website/ blog and matrix)
  2. This could also serve as a trial for a larger self-hosting space that could be hosted at IndiaFOSS
  3. Self-hosting community remains active on Matrix

Logistics:

Suggested date: Jun 11th/12th/18th/19th (Weekends)
Timings: 9AM - 1PM or 1PM to 5PM (Could do a community vote)
Venue: TBD (Deepsource?)
Venue requirements:

  • Projector
  • Giant Ethernet Switch and lot of cables to support the people
  • Power strips to support all participants
  • Sufficient Internet bandwidth for all participants to install and setup (Or Bring your own tethering?)
  • Mirror server for apt updates?

We need volunteers:

  • Testing: People willing to test the walk-through to ensure it works and provide feedback
  • Support: We need few experts who can assist the participants during the workshop

Other ideas:

  • In case anyone wants to buy used hardware (MiniPC: Thinkcenters, Elitedesk, etc.) to start self-hosting, we could order in bulk that will reduce the cost for all. I know some vendors selling i5 6th gen + 8gb ram for 12-14k)

Context:

  • I took a poll on Telegram for this workshop and good number of people (18/19 in 12hrs) voted in favor

Updates/Edits:

  • Added logistical requirement for mirror server
  • Updated need volunteers and general formatting
2 Likes

Here’s an idea…

Could you start updating https://mon.school/courses/self-hosting-101
to include chapters/lessons of self-hosting ?

Once done, and reviewed/attempted by interested folks (eg. me on raspberry-pi)
subsequently explore conducting a workshop of the same. :thinking:

1 Like

Thanks! This prompted me to try out caddy in termux with my old phone. It works nicely! Attaching some details if it’s useful for anyone:

$ crontab -l
*/20 * * * * /data/data/com.termux/files/home/ip-update/change-ip

$  $ cat ip-update/change-ip 
#!/data/data/com.termux/files/usr/bin/bash
TMPFILE=/data/data/com.termux/files/home/ip-update/last-update

IPADDR=`curl --silent icanhazip.com`

if [ -z "$IPADDR" ]; then
  echo "not connected"
  exit
fi

echo "$IPADDR"

if [ ! -f "$TMPFILE" ]; then
  echo "First run!"
else
  if grep -q "$IPADDR" "$TMPFILE"; then
    echo "No change in IP"
    exit
  fi
  rm $TMPFILE
fi


echo "zone free.gen.in" > $TMPFILE
echo "update delete bucephalus.free.gen.in" >> $TMPFILE
echo "update add bucephalus.free.gen.in 1800 IN A $IPADDR" >> $TMPFILE
echo "send" >> $TMPFILE

echo "Doing nsupdate with:"
cat "$TMPFILE"

nsupdate -k keyfile -v $TMPFILE


$ cat $PREFIX/var/service/caddy/run
#!/data/data/com.termux/files/usr/bin/sh
exec sudo caddy run -config /data/data/com.termux/files/home/Caddyfile 2>&1

(This relies on having access to a bind server which we can do nsupdate on)

1 Like

Creating this in a course format is great idea! I was wondering how to cater to those who may not be able to attend or aren’t from Bangalore.

Documentation the approaches to achieve this (dwelling on the simplest vs most customizable options), will post here once done. If we see that it fits the course, will add! :slight_smile:

Thanks for suggesting!

Neat!

Does it survive phone sleep cycles? I know termux session remains active, but is it still running in the background though. Thanks

It’s only been one day, but there seems to be some trouble. Even with termux-wake-lock I’ve had to manually turn the screen on a couple of times. Maybe something to do with deep sleep or something. Perhaps I can change some setting to never let phone go to sleep. I’ll try and update.

1 Like