The fleet command
Every command and option of the fleet command, for starting Fleet, running a node, updating, and importing old sessions.
fleet is the command the terminal install puts on your PATH. On Windows it is fleet.cmd, and you type fleet. Run fleet help any time to see the same list on your own machine.
Commands
Section titled “Commands”| Command | What it does |
|---|---|
fleet |
Starts Fleet and prints its address. |
fleet node |
Starts a node: Fleet without the web app. |
fleet node install-service |
Keeps a node running as you, so it starts at login and again if it stops. |
fleet node uninstall-service |
Stops that node and removes the service. |
fleet update |
Runs the installer again and replaces the old version. |
fleet version |
Prints the installed version. --version and -v do the same. |
fleet uninstall |
Deletes the Fleet install folder. |
fleet help |
Prints the commands and options. --help and -h do the same. fleet node help prints the node help. |
fleet import-legacy-sessions |
Starts Fleet and imports sessions from an older Fleet database. |
version, update, uninstall and help take no other arguments. fleet update needs curl or wget on macOS and Linux.
fleet uninstall only works on an installed copy. It removes the install folder, ~/.weave/fleet, and leaves your data alone. You may still want to remove ~/.weave/fleet/bin from your PATH.
Options for starting Fleet
Section titled “Options for starting Fleet”These work with fleet and with fleet node. Both --port 7000 and --port=7000 are fine.
| Option | What it does | Default |
|---|---|---|
--port <port> |
The port to listen on. Must be a number. | 6262 |
--host <host> |
The address to listen on. | 127.0.0.1 |
--data-dir <path> |
The folder Fleet keeps its data in. See Where Fleet keeps data. | ~/.weave |
--profile <name> |
A separate data folder, profiles/<name> inside the data folder. Letters, numbers, dots, underscores and hyphens only. |
none |
--require-token |
Asks for the access token even from this computer. Use it when Fleet sits behind a proxy such as tailscale serve. |
off |
Fleet listens on your own machine only unless you set --host. --host 0.0.0.0 lets other computers connect. See Security before you do that.
A profile lets two Fleets run side by side, because only one Fleet can use a data folder at a time.
Environment variables
Section titled “Environment variables”An option on the command line wins over the matching variable.
| Variable | What it sets |
|---|---|
WEAVE_FLEET_PORT |
The port. |
WEAVE_FLEET_HOST |
The address to listen on. |
WEAVE_FLEET_DATA_DIR |
The data folder. |
Fleet__DatabasePath |
The path of the main database, fleet.db. |
Fleet__AnalyticsDatabasePath |
The path of the usage database, fleet-analytics.db. |
Fleet__DataProtection__KeyPath |
The folder that holds Fleet’s encryption keys. |
WEAVE_FLEET_INSTALL_SCRIPT_URL |
Where fleet update fetches the installer from. |
Run a node
Section titled “Run a node”fleet node --port 2113 --host 0.0.0.0A node is Fleet without the web app. Every request needs the access token, even from the same computer. You add it from another Fleet in Settings → Machines → Add a machine. Machines walks through that.
fleet node install-service takes the same four options as fleet node, plus --print.
| Option | What it does |
|---|---|
--print |
Shows the service file it would write and the commands it would run, and changes nothing. Only works with install-service. |
| System | What install-service creates |
|---|---|
| Linux | A systemd user service, fleet-node.service. Needs systemctl. |
| macOS | A LaunchAgent, io.tryweave.fleet-node. |
| Windows | A scheduled task named Fleet node. |
Run it again to change the options. The service is always called fleet-node, so it never touches a service you made yourself. It also needs an installed copy of Fleet. uninstall-service takes no options, and it leaves the node’s data where it was.
Import old sessions
Section titled “Import old sessions”fleet import-legacy-sessions --source /path/to/old/fleet.dbThis starts Fleet with the import turned on, so Fleet keeps running afterwards. --source is the only option, and it is optional. It is also the only option this command takes, so set the port and folder with the variables above.
Where next
Section titled “Where next”- Where Fleet keeps data: what the data folder holds and what you can delete.
- Machines: run a node on another computer and hand work to it.
- Install: install, start and update Fleet.