Set up a Remote Repository¶
A remote repository lives in an S3-compatible object storage bucket, which is how a repository is shared between people and machines. This guide covers choosing a provider, creating the repository, and connecting a workspace to it. For a shorter linear walkthrough, see Getting Started; for a repository on your local disk instead, see Set up a Local Filesystem Repository.
FlexVault talks to the bucket directly using the S3 API, so any provider that exposes an S3-compatible endpoint works.
Direct S3 mode is an interim setup
Connecting to a bucket with S3 credentials is called direct S3 mode. It is fully supported today, but FlexVault does not yet have its own authentication layer, so anyone with the bucket credentials has full access to the repository. A dedicated authentication layer is planned. Once it lands, direct S3 mode will remain supported but will no longer be the recommended way to run a shared repository.
Placeholders in examples
Values in capitals, such as KEY_ID, SECRET_KEY, and REGION, are placeholders to replace with your own. Examples come in Linux/macOS and Windows PowerShell variants; picking one switches every example on this page.
Choose a storage provider¶
The provider you pick affects cost and performance more than functionality. These four are good choices:
| Provider | Egress cost | Throughput | Latency | Notes |
|---|---|---|---|---|
| AWS S3 | Expensive | Good | Good | Ubiquitous and reliable. Endpoint derives from the region. |
| Google Cloud Storage | Expensive | Good | Good | Ubiquitous and reliable. Use its S3-compatible XML API with HMAC keys. |
| Cloudflare R2 | Free | Very good | Higher | No egress fees and strong throughput; higher request latency. |
| Tigris | Low | Very good | Low | Strong throughput and low latency. |
AWS S3 and Google Cloud Storage are the most widely used and are very reliable, but they charge for egress, which adds up when a team pulls large amounts of data. Cloudflare R2 removes egress fees and offers strong throughput, at the cost of higher latency. Tigris offers both strong throughput and low latency.
Whichever you choose, create a bucket and generate an access key ID and secret access key with read and write access to it before continuing.
How the endpoint is resolved¶
- AWS S3: pass
--s3-regionset to your bucket's region (for exampleus-east-1,eu-west-1, orap-southeast-2) and FlexVault builds the endpoint from yours3://URI automatically. Do not pass--s3-http-endpoint. - Other providers: pass
--s3-http-endpointwith the full URL pointing at where the repository should live. FlexVault uses this value exactly as given and does not append your bucket or repository path to it. Set--s3-region autofor Cloudflare R2 and Tigris; omit--s3-regionfor Google Cloud Storage.
Providers differ in where the bucket name goes. Tigris puts it in the hostname, while Cloudflare R2 and Google Cloud Storage put it in the path:
| Provider | Endpoint form |
|---|---|
| Cloudflare R2 | https://ACCOUNT_ID.r2.cloudflarestorage.com/BUCKET |
| Tigris | https://BUCKET.t3.storage.dev |
| Google Cloud Storage | https://storage.googleapis.com/BUCKET |
Anything you add after that base is an optional prefix, useful when you want to keep the repository under a specific path rather than at the root of the bucket. The examples below use a my-repo prefix so one bucket can hold more than one repository.
Credentials are supplied only through the --s3-* flags below. FlexVault does not read environment variables, AWS_* variables, or ~/.aws profiles.
Create the repository¶
Use fxv repo new to initialize the repository in your bucket. The --admin-username is required: it seeds the repository's first user, who is recorded as the initial administrator.
This writes the repository's metadata into the bucket. The bucket now holds a complete FlexVault repository that workspaces can connect to.
Create a workspace against it¶
A repository is where published history lives; you do your actual work in a workspace on your machine. Create one with fxv init, pointing it at the same s3:// URI and passing the same storage flags:
Credentials are stored locally
FlexVault saves the storage endpoint and credentials in the workspace configuration on your machine in plain text. Treat the workspace directory as sensitive, and do not commit it or share it.
Next steps¶
The repository and workspace are ready. From here, add a user and make your first publish, then invite others to sync against the same URI. Getting Started walks through the rest.