Skip to main content
Thoughts from David Cornelius


A few months ago, I blogged about getting a Raspberry Pi set up with a GitHub Runner to keep a website up-to-date. It's been working well--until today. I made some updates, pushed them to GitHub, then later checked the website--it had not updated.

Then it dawned on me: the power had gone out for a couple of hours last week and even though the computer was back on, I had not logged in and started the GitHub runner--and had forgotten to make that automatic.

Setting up Linux to login and auto-start a program isn't terribly difficult but the commands are a little different depending on which distribution and version of Linux you're running. I have Ubuntu Server 22.04 running and found what I needed on to automatically login on a the terminal:

  1. Create a directory for the terminal you want to use if it doesn't already exist:
    mkdir -p /etc/systemd/system/getty@tty1.service.d
  2. Create an autologin.conf file and specify the --autologin parameter with the user desired:
    ExecStart=-/sbin/agetty --noclear -n --autologin david %I $TERM

Once I rebooted the machine to make sure that worked, I needed to automatically start the GitHub runner. This was a simple add-on to the .profile file in my user's home directory:

  • /mnt/webdisk/actions-runner/

This final piece of automation for my web-builder machine is now in place. :-)


Add new comment

The content of this field is kept private and will not be shown publicly.