Skip to content

Configure remote storage

Remotes are external storage endpoints (S3 buckets, HTTP servers) where you push staged assets for distribution. This page covers the client-side workflow for configuring remotes and pushing assets.

Register a remote with a type, prefix URL, description, and optional push command:

Terminal window
refgenie remote add \
--type s3 \
--prefix my-bucket/refgenie \
--description "S3 archive storage" \
--push-command "aws s3 cp {local_path} s3://{prefix}/{relative_path}"

The --type is one of http, https, or s3. The --prefix is the base URL or path prefix where assets will be accessible after pushing. The --description is a human-readable label for the remote. The --push-command is an optional shell command template that refgenie executes when you run refgenie push.

The push command template supports the following placeholders:

PlaceholderDescription
{local_path}Absolute path to the local staged asset file
{relative_path}Path of the asset relative to the stage folder
{prefix}The prefix configured on the remote
{genome_stage_folder}The full path to the genome stage folder (useful for folder sync strategies)

Per-asset push example (uploads each asset individually):

Terminal window
--push-command "aws s3 cp {local_path} s3://{prefix}/{relative_path}"

Folder sync push example (syncs the entire stage folder):

Terminal window
--push-command "aws s3 sync {genome_stage_folder} s3://{prefix}/ --follow-symlinks"

View all configured remotes:

Terminal window
refgenie remote list

This displays each remote’s ID, type, prefix, description, push command, and counts of pushed and unpushed assets.

Remove a remote by its type:

Terminal window
refgenie remote remove --type s3

Note: remote remove only accepts the --type flag.

See which assets have been pushed to each remote:

Terminal window
refgenie remote status

Filter by a specific remote:

Terminal window
refgenie remote status --remote my-remote-name

This shows per-remote counts of pushed and unpushed assets.

The typical workflow for distributing assets to remote storage is:

  1. Build the asset: refgenie build hg38/fasta
  2. Stage the asset: refgenie stage stage hg38/fasta
  3. Push assets: refgenie push

Push all unpushed assets to all configured remotes:

Terminal window
refgenie push

Push only assets for a specific genome:

Terminal window
refgenie push --genome hg38

Push to a specific remote only:

Terminal window
refgenie push --remote my-s3-remote

Preview what would be pushed without executing:

Terminal window
refgenie push --dry-run

You can also combine building, staging, and push intent in one step using the build command:

Terminal window
refgenie build hg38/fasta --stage --push-to my-s3-remote
refgenie push

When you push, refgenie executes the push command template configured on the remote and marks the asset as pushed.

Refgenie supports two push strategies:

StrategyDescription
per_asset (default)Uploads each asset individually using {local_path} and {relative_path}
folder_syncSyncs the entire {genome_stage_folder} to the remote

Specify the strategy with --strategy:

Terminal window
refgenie push --strategy folder_sync
TypeUse case
httpAssets served via HTTP (static hosting, CDN)
httpsAssets served via HTTPS (S3 with HTTPS, CDN)
s3Direct S3 integration

When a remote is configured on a refgenie server, the server redirects download requests to the remote URL instead of serving files directly. This allows the server to act as a metadata catalog while cloud storage handles the actual data transfer.