Configuration
Fleetshare uses a config.json
file to manage its settings, including your API key and device connections (proxies or subnets).
Creating the Configuration File
-
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 likenano
: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"] }, "print_debug": false }
-
Important:
- Replace
"YOUR_API_KEY_FROM_APP.EARN.FM"
with your actual API key obtained from app.earn.fm. - Configure
devices
:- If you have static IPs routed to your server as subnets, list them in the
"subnets"
array (e.g.,["203.0.113.0/24", "198.51.100.0/24"]
). Leave empty[]
if unused. - If you are using SOCKS5 proxies, list them in the
"socksProxies"
array using the format"user:password@ip:port"
or"ip:port"
if no authentication is needed. Leave empty[]
if unused. - You can use either subnets or socksProxies, or both.
- If you have static IPs routed to your server as subnets, list them in the
- Set
"print_debug"
totrue
only if you need detailed logs for troubleshooting; otherwise, keep itfalse
.
- Replace
-
Save the file and exit the editor (in
nano
, pressCTRL+X
, thenY
, thenEnter
).
config.json
file using an online validator to ensure it’s correctly formatted before running the Docker container. You can use a tool like JSONLint.
This config.json
file will be mounted into the Docker container when you run it, as described in the Installation guide.
IP Address Details
Statically Bound IP Addresses (Subnets)
If you list subnets or individual IPs in the "subnets"
array, ensure these IPs are correctly routed to the server running the Docker container. Fleetshare will bind to these IPs directly.
subnets
option.
Testing IP Configuration
You can test if an IP is correctly routed to your server by using curl
with the --interface
flag from the host machine:
curl https://icanhazip.com --interface YOUR_IP_ADDRESS
If the request is successful and returns the specified IP, it’s likely configured correctly.
SOCKS5 Proxies
If you provide proxies in the "socksProxies"
array:
- Use the format
"user:password@ip:port"
or"ip:port"
. - Only static SOCKS5 proxies are supported. Fleetshare verifies this, and using non-static proxies may lead to issues.
- IP-authenticated proxies are not supported.