
This guide will walk you through setting up the Fleetshare client using Docker. Fleetshare is particularly effective if you have multiple proxies or static IP addresses routed to your server. This setup includes Watchtower to keep your client automatically updated.
Fleetshare uses a config.json file to manage its settings, including your API key and device connections (proxies or subnets).
Create a file named config.json in a directory of your choice (e.g., your home directory or a dedicated directory like /opt/fleetshare). You can use a text editor like nano:
nano config.json
Paste the following JSON structure into the file:
{
"apiKey": "YOUR_API_KEY_FROM_APP.EARN.FM",
"devices": {
"subnets": ["203.0.113.0/24"],
"socksProxies": ["user:[email protected]:1080"]
},
"debug": false
}
Important:
"YOUR_API_KEY_FROM_APP.EARN.FM" with your actual API key obtained from app.earn.fm.devices:
"subnets" array (e.g., ["203.0.113.0/24", "198.51.100.0/24"]). Leave empty [] if unused."socksProxies" array using the format "user:password@ip:port" or "ip:port" if no authentication is needed. Leave empty [] if unused."debug" to true only if you need detailed logs for troubleshooting; otherwise, keep it false.Save the file and exit the editor (in nano, press CTRL+X, then Y, then Enter).
The following single command will stop and remove any previous instances of Fleetshare and Watchtower, pull the latest images (using the correct earnf/fleetshare image name), 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:
fleetshare-client and watchtower containers and their images to ensure a clean start.earnf/fleetshare and watchtower images.fleetshare-client container using your config.json, ensuring it restarts automatically and uses the host's network.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.
Content type
Image
Digest
sha256:5c0dd4146…
Size
13 MB
Last updated
7 days ago
docker pull earnfm/fleetshare