Docs
APILog inDeploy a serverDeploy

S3 access

Use rclone, the AWS CLI or lb-presigned with your team's files through s3.fxvault.link.

Media Storage3 min readUpdated

On this page
  1. lb-presigned (S3)
  2. rclone (S3)
  3. AWS CLI (S3)

fxvault Media answers the S3 API at https://s3.fxvault.link, so tools that speak S3 work without changes.

  • Bucket: your team's name in links, for example nova-rp. nova-rp.fxv names the same bucket, for tools that would otherwise put the bucket in the host name.
  • Addresses: path style, https://s3.fxvault.link/<bucket>/<key>. Any region name is accepted; auto is fine.
  • Keys: an S3 key, made on the API keys tab under S3 keys. Its secret is shown once. It can read, add and delete every file of the team.
  • What it holds: every file of the team. A file put through S3 keeps its key; any other file answers under <folder>/<id>.<ext>.
  • What it accepts: images, video and audio, like every other upload. Deleting an object moves the file to the bin.
  • Size: the S3 address accepts request bodies up to 100 MB, so larger files go up as multipart uploads (the configs below set that up).
https://s3.fxvault.link/nova-rp/clips/clip.mp4EndpointThe same for every team.BucketYour name in links: every file ofthe team. Tools that put thebucket in the host name usenova-rp.fxv, the same bucket.KeyWhat the file answers to.Two kinds of keyPut through S3Keeps the key it was given.clips/clip.mp4Uploaded any other wayAnswers under its folder, id and extension.phone/7F9pGhN8qwErT1vx5aZk.pnghttps://s3.fxvault.link/EndpointThe same for every team.nova-rp/BucketYour name in links: every file of the team. Toolsthat put the bucket in the host name usenova-rp.fxv, the same bucket.clips/clip.mp4KeyWhat the file answers to.Two kinds of keyPut through S3Keeps the key it was given.clips/clip.mp4Uploaded any other wayAnswers under its folder, id and extension.phone/7F9pGhN8qwErT1vx5aZk.png
An S3 address, taken apart. The bucket is your name in links and holds every file of the team; a file you put through S3 keeps the key you gave it, and every other file answers under its folder and id. Illustration.

Creating an S3 key shows its values once:

The S3 key as the panel shows it, after Create S3 key under S3 keys. Copy the secret before you click Done: it is not shown again. Example view.

lb-presigned (S3)

If you already run LB Scripts' lb-presigned, point it at your bucket with an S3 key from API keys. The Custom method above needs no S3 key and is the simpler choice. Uploads from the phone lose their photo metadata, like any player upload.

1. server.cfg

The bucket is your team's address with ".fxv" on the end: a dotted name makes the AWS SDK inside lb-presigned use https://s3.fxvault.link/&lt;bucket>. LB_S3_DOMAIN is where the phone shows files from.

Config
set LB_S3_BUCKET "your-team.fxv"
set LB_S3_REGION "auto"
set LB_S3_ACCESS_KEY_ID "YOUR_S3_ACCESS_KEY_ID"
set LB_S3_SECRET_ACCESS_KEY "YOUR_S3_SECRET"
set LB_S3_DOMAIN "https://files.fxvault.link/your-team"

2. FXServer's environment

lb-presigned has no endpoint setting. The AWS SDK inside it reads this variable from the environment FXServer starts with: add it to your start script, or wherever your host or txAdmin sets environment variables, then restart FXServer.

AWS_ENDPOINT_URL_S3=https://s3.fxvault.link

3. lb-phone/config/config.lua

Needs LB Phone 2.5.5 or newer. Allow fxvault.link in Config.UploadWhitelistedDomains and Config.ExternalWhitelistedDomains as in the lb-phone card above.

Lua
Config.UploadMethod.Video = "LBPresigned"
Config.UploadMethod.Image = "LBPresigned"
Config.UploadMethod.Audio = "LBPresigned"

Checked against: github.com/lbphone/lb-presigned, docs.lbscripts.com/phone/installation/.

rclone (S3)

Copy folders in or out of your files with an S3 key from API keys. Your bucket is your-team: the whole team, phone uploads included. Use rclone copy, never rclone sync: sync would send everything not in your local folder to the bin.

Your folder: ./screenshotsshot-01.pngshot-02.pngBefore: nova-rp/screenshotsshot-00.pngshot-01.pngrcloneAfter each commandrclone copynova-rp/screenshots aftershot-00.pngshot-01.pngshot-02.pngaddedrclone syncnova-rp/screenshots aftershot-00.pngto the binshot-01.pngshot-02.pngaddedYour folder: ./screenshotsshot-01.pngshot-02.pngrcloneBefore: nova-rp/screenshotsshot-00.pngshot-01.pngAfter each commandrclone copynova-rp/screenshots aftershot-00.pngshot-01.pngshot-02.pngaddedrclone syncnova-rp/screenshots aftershot-00.pngto the binshot-01.pngshot-02.pngadded
The same folder sent both ways. rclone copy leaves the team's other files alone; rclone sync also moves to the bin every file in the team's folder that your local folder lacks, such as a screenshot a player uploaded. Illustration; example file names.

1. rclone.conf

The S3 address accepts request bodies up to 100 MB, so single uploads stop at 50 MB and larger files go in 32 MB parts.

[fxvault]
type = s3
provider = Other
access_key_id = YOUR_S3_ACCESS_KEY_ID
secret_access_key = YOUR_S3_SECRET
endpoint = https://s3.fxvault.link
region = auto
force_path_style = true
upload_cutoff = 50M
chunk_size = 32M

2. Terminal

Folders become folders in the panel. Only images, video and audio are accepted.

rclone copy ./screenshots fxvault:your-team/screenshots --progress
rclone ls fxvault:your-team/screenshots
rclone copy fxvault:your-team ./fxvault-backup --progress

Checked against: rclone.org/s3/#other, developers.cloudflare.com/workers/platform/limits/#request-limits.

AWS CLI (S3)

The AWS CLI works with an S3 key from API keys. Your bucket is your-team.

1. Terminal

Once, to save the key under its own profile. Path-style addresses: there is no per-bucket host.

aws configure set aws_access_key_id YOUR_S3_ACCESS_KEY_ID --profile fxvault
aws configure set aws_secret_access_key YOUR_S3_SECRET --profile fxvault
aws configure set region auto --profile fxvault
aws configure set s3.addressing_style path --profile fxvault

2. Terminal

aws s3 ls s3://your-team/ --profile fxvault --endpoint-url https://s3.fxvault.link
aws s3 cp ./clip.mp4 s3://your-team/clips/clip.mp4 --profile fxvault --endpoint-url https://s3.fxvault.link

Checked against: docs.aws.amazon.com/cli/latest/topic/s3-config.html, docs.aws.amazon.com/cli/latest/userguide/cli-configure-endpoints.html.

Need a server, or a hand with one?

Pick a plan to deploy a server, or open a ticket in the panel. Support runs 24/7/365.