Skip to content
marcone edited this page Nov 14, 2022 · 9 revisions

Installing TeslaUSB

If you're using a Raspberry Pi to run TeslaUSB, flashing the prebuilt image and then using the "one step setup" process is the easiest and recommended way of setting up TeslaUSB.

If you're not using a Raspberry Pi, or want to use one of the official Raspberry Pi images instead, the installation process involves a few additional manual steps:

  • first, flash the image of your choice onto the device of your choice.
    • If using a Raspberry Pi, I recommend using the Raspberry Pi Imager to flash the "Raspberry Pi OS Lite" image: click "Choose OS", then "Raspberry Pi OS (other)", then "Raspberry Pi OS Lite (32-bit)". The 64-bit Lite OS might also work, but is untested. You can preconfigure network settings and user info in the "advanced settings" menu of the Raspberry Pi Imager before flashing. If you do not preconfigure network settings, you will need to connect the Raspberry Pi to a keyboard and monitor to log in and configure it later.
    • If using another device, using Armbian is recommended.
    • whichever device and flavor of linux you choose, it is recommended to use a non-desktop version of the OS to avoid the additional boot time and storage that a full desktop install requires. Look for "lite", "CLI", "server" or similar names.
  • boot the device and log in to it. If you did not already configure network settings on the device, you should do so now, since TeslaUSB setup needs access to the internet to install.

Once you're logged in to the device and the device has network access, run the following commands:

sudo -i
apt update
apt install curl
curl https://raw.githubusercontent.com/marcone/teslausb/main-dev/setup/generic/install.sh | bash

This will run the "pre setup" script that gets things ready for the main setup process. The device may reboot multiple times. If the device and linux distribution you use support configurable LEDs, the pre setup script will attempt to flash all the LEDs that the device has when it is ready for the next step. At this point, log in to the device again.

If pre-setup was succesful, it will have downloaded the default TeslaUSB config file to /boot/teslausb_setup_variables.conf. Open this file with your favorite editor, for example nano /boot/teslausb_setup_variables.conf and fill in the required settings. Save the file, then run /etc/rc.local. The device may again reboot multiple times during setup. If the device reboots, you can log in again and follow setup progress by running tail -f /boot/teslausb-headless-setup.log