Configuration / riven.json
riven.json
An optional file that tells Riven a little more about how to build your app. Use it to install system packages like ffmpeg or imagemagick that your code calls at runtime.
What it does
Riven detects your framework and builds your app for you. If your code shells out to a tool like ffmpeg, pdftotext or tesseract, that tool has to be installed too, or the app builds fine and then fails the first time it calls it. riven.json is where you list those tools.
Put it in the same folder as your package.json or requirements.txt: the repo root, or your service's root directory if you deploy from a subfolder.
No riven.json, or no packages field, means nothing changes. Your app builds exactly as it does today.
Example
{
"version": 1,
"packages": ["ffmpeg", "imagemagick"]
}Commit it and push. On the next deploy, your build log shows:
Found riven.json — installing system packages: ffmpeg, imagemagick
Adding or removing a package always gives you a fresh build with exactly that list installed.
Fields
| Field | Value |
|---|---|
| version | Optional. If you set it, it must be 1. |
| packages | Optional. A list of up to 20 names from the supported packages, each listed once. |
Any other field is ignored, with a note in the build log so you know.
Supported packages
Packages are installed where your app runs, so they are there when your code calls them. Packages marked Build only are there while your dependencies install and your app builds, for native modules that compile during install.
Need a package that's not on the list? Tell us.
When something is wrong
Riven checks riven.json before the build starts. If something is wrong, the deploy stops right there and the build log says why, instead of building an app that fails later. Problems in the packages list are all reported together, so you can fix them in one go.
"ffmpg" is not a supported package. Did you mean "ffmpeg"? See the supported list: https://rivendeploy.com/docs/riven-json#packages riven.json is not valid JSON. "packages" in riven.json must be a list of package names, like ["ffmpeg", "imagemagick"]. "ffmpeg" is listed more than once in "packages". riven.json lists 23 packages. The limit is 20. "version" in riven.json must be 1.
When you deploy from a repo link, the same check runs on the setup screen, so you see these before you deploy.
Using your own Dockerfile
If your repo has its own Dockerfile, Riven builds it as it is, so packages in riven.json are not installed. The deploy carries on with this note in the build log:
Packages in riven.json are ignored because this repo uses its own Dockerfile. Install them in your Dockerfile instead.
Static sites
Static sites have no server running your code, so there is nothing to install packages for. The deploy carries on with this note in the build log:
riven.json packages are ignored for static sites. Static sites are served as plain files, so system packages aren't used. Remove the packages field or deploy as a web service if you need them.