1. Declare the bucket
floo.app.toml
STORAGE_BUCKET and STORAGE_URL. Commit the declaration with the rest of your app config.
Dev and prod get separate buckets, STORAGE_BUCKET differs per environment, so they never share object state. See Managed services: dev and prod isolation.
2. Ship the first deploy
3. How your app authenticates
floo runs your container under a dedicated per-app identity that already holds read and write access on your bucket, and only your bucket. So your app reaches storage directly with the native Google Cloud Storage SDK: the SDK picks up that identity automatically through Application Default Credentials (ADC). You do not manage a key file, a JSON credential, or a project id. The only value your code needs is the bucket name:4. Read and write objects
Use the native SDK for your language withSTORAGE_BUCKET. No credentials are passed in code. ADC supplies them at runtime.
5. Rails Active Storage
Point Active Storage at thegoogle service. There is no credentials: and no project:, both come from ADC at runtime:
config/storage.yml
config/environments/production.rb
rails_storage_proxy, above): Rails streams blobs through your app with the SDK, and uploads go through your controllers (has_one_attached + a normal form post). Both are server-side and need no URL signing, the next section explains why that matters.
What floo Storage grants and what it does not
floo grants your app read/write on its bucket, but deliberately not URL-signing, the permission a compromised container could abuse to mint links to any object. That boundary shapes what works:- ✅ Server-side read/write with the SDK (sections 4 and 5).
- ✅ Rails proxy-mode serving (
rails_storage_proxy) and controller uploads (has_one_attached). - ❌ App-generated signed URLs, browser direct uploads, and Active Storage redirect-mode serving (
rails_blob_urlredirecting to a signed URL). All need signing the app isn’t granted; proxy mode + server-side uploads cover the same use cases. - ❌ S3-compatible SDKs (
aws-sdk-s3, Active Storage:amazon). floo mints no S3/HMAC keys, use the native SDK / Active Storage:google.
STORAGE_URL is a floo operator endpoint: the dashboard and CLI call it with an admin key to mint short-lived signed URLs. It is not your app’s runtime path to storage, your app authenticates with the SDK as above, never by calling STORAGE_URL.
6. Debugging checklist
If reads or writes fail:- a missing
STORAGE_BUCKET, confirmstorageis in this service’smanaged = [...]attachment - a
403/ permission error, the SDK isn’t using ADC; don’t pass an explicit key file, let the runtime supply credentials - code trying to sign a URL or use an S3 client, unsupported (see above), switch to proxy-mode serving and the native SDK
Managed services
See how storage and other managed services are provisioned.
Build a Rails app
End-to-end Rails on floo, including Active Storage.