Skip to main content
Community Scripts logo
Skip to Content
Tools & Add-onsAdd-ons

SparkyFitness Garmin Microservice

Add the Garmin bridge service to a container that already runs SparkyFitness.

sparkyfitness-garmin.sh installs the Garmin microservice from the CodeWithCJ/SparkyFitness release next to an existing SparkyFitness installation.

Run itInside the SparkyFitness container. Without the directory /opt/sparkyfitness the script exits with code 238
Supported OSDebian or Ubuntu (require_debian_like: Alpine and systems without apt-get exit with code 238)
Port8000
Sourcetools/addon/sparkyfitness-garmin.sh

Run

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/sparkyfitness-garmin.sh)"

Prompts

PromptAnswer
Install SparkyFitness-Garmin? (y/N):y installs. Anything else exits

When /opt/sparkyfitness-garmin exists and is not empty:

PromptAnswer
Uninstall SparkyFitness-Garmin? (y/N):y removes it
Update SparkyFitness-Garmin? (y/N):y updates. Anything else exits with No action selected

What it creates

ItemValue
Python toolinguv through setup_uv
Application/opt/sparkyfitness-garmin (the SparkyFitness release source), with a virtual environment in /opt/sparkyfitness-garmin/SparkyFitnessGarmin/.venv
Configuration/etc/sparkyfitness-garmin/.env, copied from docker/.env.example of the release, with GARMIN_MICROSERVICE_URL=http://<ip>:8000
Servicesparkyfitness-garmin (/etc/systemd/system/sparkyfitness-garmin.service), runs uvicorn main:app --host 0.0.0.0 --port 8000, requires sparkyfitness-server.service
Addresshttp://<ip>:8000

The script changes nothing in the SparkyFitness installation itself. As its closing message says, you may need to set GARMIN_MICROSERVICE_URL in your SparkyFitness .env to http://<ip>:8000 yourself.

Update

Run the script again and answer y to Update SparkyFitness-Garmin?, or call update mode directly:

type=update bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/sparkyfitness-garmin.sh)"

If a newer SparkyFitness release exists, the service is stopped, the installation directory is replaced, the virtual environment is rebuilt from requirements.txt and the service is started. The configuration in /etc/sparkyfitness-garmin is outside that directory and is kept.

The script does not create /usr/local/bin/update_sparkyfitness-garmin, so the container's update command does not offer it.

Remove

The uninstall prompt stops and disables the service and deletes the service file, /etc/sparkyfitness-garmin/.env and /opt/sparkyfitness-garmin.