Skip to content

Runner settings

fiber agent starts the runner with these, as the command line says, or run fiber-runner.js itself.

Setting Meaning
FIBER_API_URL The server: an https or wss origin; http or ws only for this machine.
FIBER_AGENT_TOKEN A secret: the agent’s token.
FIBER_AGENT_WORKSPACE_DIR Where steps work, ./data/workspaces by default. One runner’s alone.
FIBER_AGENT_ALLOW_HOST_SHELL true to run steps without an image: as the runner’s own user. Such a step can read what that user can, the token included, and a fiber login session in ~/.fiber: run the runner as a user of its own. With Docker on that is the socket too, so the step is as good as root.
FIBER_AGENT_ENV_PASSTHROUGH Names, separated by commas, that steps on the host inherit.

Off unless FIBER_AGENT_USE_DOCKER is true. The runner then needs the daemon’s socket, which is as good as root on the host, and does not start without it.

Setting Meaning
FIBER_AGENT_DOCKER_SOCKET /var/run/docker.sock. A socket on this machine only.
FIBER_AGENT_DOCKER_NETWORK bridge. What steps can reach: none is nothing, host is everything here.
FIBER_AGENT_DOCKER_USER A user for steps, such as 1000:1000; otherwise the image’s, which is often root.
FIBER_AGENT_DOCKER_MEMORY, _CPUS Such as 2g and 1.5. No limit unless set.
FIBER_AGENT_DOCKER_PIDS_LIMIT 512. 0 is no limit.
FIBER_AGENT_DOCKER_HELPER busybox:1.37: an image with rm, for files that steps wrote as other users. Empty for none: they are then left on disk.
FIBER_AGENT_ALLOW_UNTRUSTED true to run pull requests of forks here. They get no secrets and only images anyone can pull, and reach whatever the network does: a metadata service or an internal registry, for example.

An image’s entrypoint is replaced by the step’s shell. Registry logins are not used: pull a private image on the host first. The disk that images, containers and workspaces use is not limited.

The runner removes its containers at start and every ten minutes. Keep .fiber-runner-id in the workspace directory, and do not copy it: it says which are its own, and that Docker was used here. With Docker turned off again, what earlier steps left in the directory is kept until it is on.

Another daemon at the socket, or one that was installed again, is refused: it cannot say whether the first one’s containers are gone. Use another workspace directory for it, or, once you have removed those containers, delete .fiber-runner-id. Containers of a directory that is no longer used are not removed until a runner uses it again.

A file that a step declares in artifacts: is kept when the step succeeds, up to 64 MiB, and given to the steps that need it, directly or not. Directories are not: make an archive. On Linux a file that a step in a container made as another user, and that others may not read, fails the step: chmod it, or set FIBER_AGENT_DOCKER_USER. A file is put in a workspace without its execute permission.

FIBER_RUN_ID is the run’s, and FIBER_STEP_ID the step’s id in the pipeline, with its matrix values. That is text its author chose: not a safe file name, and not one of a kind.

A second process of the runner, started with --guard, then ends its steps and removes their containers. Stopping the runner in order needs neither. If both are killed at once, such as by name or with the container they are in, steps on the host go on, and containers stay until a runner uses the directory again.