Installation

Installation

This guide will walk you through setting up the Fleetshare client using Docker. This setup includes Watchtower to keep your client automatically updated.

Setup Steps

Step 1: Create the Configuration File

Before running the Docker container, you need to create a config.json file. See the Configuration page for details on how to create this file.

Step 2: Run Fleetshare and Watchtower

The following single command will stop and remove any previous instances of Fleetshare and Watchtower, pull the latest images, and then start both containers correctly configured.

Make sure you run this command from the same directory where you saved your config.json file. Copy the entire line below and paste it into your terminal:

sudo docker stop fleetshare-client watchtower; sudo docker rm fleetshare-client watchtower; sudo docker rmi earnfm/fleetshare:latest containrrr/watchtower; sudo docker pull earnfm/fleetshare:latest; sudo docker pull containrrr/watchtower; sudo docker run -d --name fleetshare-client --restart=always --network host -v "$(pwd)/config.json:/app/config.json" earnfm/fleetshare:latest && sudo docker run -d --name watchtower --restart=always -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --cleanup --include-stopped --include-restarting --revive-stopped --interval 60 fleetshare-client

What this command does:

  • Stops and removes any old fleetshare-client and watchtower containers and their images to ensure a clean start.
  • Pulls the latest versions of the earnf/fleetshare and watchtower images.
  • Starts the fleetshare-client container using your config.json, ensuring it restarts automatically and uses the host’s network.
  • Starts the watchtower container to automatically monitor and update only the fleetshare-client container every 60 seconds.

This setup ensures your Fleetshare client is running with your configuration, automatically restarts on failure, and stays updated to the latest version via Watchtower with minimal manual intervention.