Skip to Content
Commands Reference

pelican rclone setup

Generate an rclone configuration for a Pelican namespace

Synopsis

Generate an rclone configuration that can be used to sync files to and from a Pelican namespace.

The generated section is automatically appended to the rclone configuration file (typically ~/.config/rclone/rclone.conf), creating the file if it does not already exist. The configuration is also printed to stdout for reference. Use —output to write to a different file instead.

The configuration includes a bearer_token_command that automatically fetches fresh tokens when needed. When rclone receives an HTTP 401 Unauthorized response (indicating token expiry), it re-runs the bearer_token_command to get a fresh token and retries the request.

The Pelican Director inspects bearer tokens in client requests and returns HTTP 401 if a token has expired. This triggers rclone’s automatic token refresh, ensuring seamless operation with long-running sync jobs.

Examples:

Generate config for reading from a namespace

pelican rclone setup —read pelican://federation.example.org/namespace/path

Generate config for reading and writing to a namespace

pelican rclone setup —write pelican://federation.example.org/namespace/path

Generate config with a custom remote name

pelican rclone setup —name my-pelican —write pelican://federation.example.org/namespace/path

If rclone is not installed, the command will suggest running ‘pelican rclone install’ to install it.

pelican rclone setup <pelican-url> [flags]

Options

-h, --help help for setup -n, --name string Name for the rclone remote (default: derived from namespace) --no-password-file Do not create a separate passwordless credential file for rclone -o, --output string Output file for the configuration (default: stdout) -r, --read Configure for read-only access -w, --write Configure for write access (implies read)

Options inherited from parent commands

--config string config file (default is $HOME/.config/pelican/pelican.yaml) -d, --debug Enable debug log messages -f, --federation string Pelican federation to utilize --json output results in JSON format -L, --log string Specified log output file --version Print the version and exit

SEE ALSO