🎥 Make videos programmatically with React
Deploy Studio docs
Jonny Burgerb0184269e7ac
diff --git a/packages/docs/docs/deploy-remotion-studio.md b/packages/docs/docs/deploy-remotion-studio.mdindex f01b161351..054e503654 100644--- a/packages/docs/docs/deploy-remotion-studio.md+++ b/packages/docs/docs/deploy-remotion-studio.md@@ -3,7 +3,7 @@ image: /generated/articles-docs-deploy-remotion-studio.pngid: deploy-studiotitle: Deploy the Remotion Studiosidebar_label: Deploy Remotion Studio-crumb: "Building video apps"+crumb: "Remotion Studio"---<YouTubediff --git a/packages/docs/docs/studio/deploy-server.mdx b/packages/docs/docs/studio/deploy-server.mdxnew file mode 100644index 0000000000..d722a749c9--- /dev/null+++ b/packages/docs/docs/studio/deploy-server.mdx@@ -0,0 +1,103 @@+---+title: Deploy the Remotion Studio on a VPS+sidebar_label: Deploy to a VPS+crumb: "Remotion Studio"+---++<YouTube+ minutes={3}+ href="https://www.youtube.com/watch?v=430B9xSs06U"+ thumb="https://i.ytimg.com/vi/430B9xSs06U/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLCFJ4FoC-8enbWW4aU8uo9NLhEl6w"+ title="Deploy the Remotion Studio"+/>++_available from v4.0.46_++You can deploy the Remotion Studio to a long-running server in the cloud and make the render UI accessible to your team.+To do so, you need to:++- Install Node.js and Chrome+- Run `npx remotion studio` on the server+- Ensure port 3000 is available to the internet++The following examples have been tested with the [Hello World](/templates/hello-world) template initialized using `npm init video`.++## Dockerizing the Remotion Studio++```docker title="Dockerfile"+FROM node:20-bookworm++RUN apt-get update+RUN apt-get install -y chromium++# Copy everything from your project to the Docker image. Adjust if needed.+COPY package.json package*.json yarn.lock* pnpm-lock.yaml* bun.lockb* tsconfig.json* remotion.config.* .prettierrc* ./+COPY src ./src++# If you have a public folder:+COPY public ./public++# Install the right package manager and dependencies. Adjust if needed.+RUN npm i++CMD ["npx", "remotion studio"]+```++## Fly.io++To deploy the Remotion Studio to [Fly.io](https://fly.io):++- First add the above `Dockerfile` to the repo.+- Ensure you are on a paid plan (free plan has too little memory)+- Use the following command:++```bash+fly launch \+ # Get 2 CPU cores and 4GB of memory+ --vm-size=performance-2x \+ # Disable 2x replication+ --ha=false \+ # Use Remotion's port+ --internal-port=3000 \+ # Use Docker, not Node+ --dockerfile Dockerfile+```++For the following questions, answer no:++```txt+? Would you like to set up a Postgresql database now? No+? Would you like to set up an Upstash Redis database now? No+? Create .dockerignore from 1 .gitignore files? No+```++Answer Yes when asking if you want to deploy:++```+? Do you want to deploy now? Yes+```++You should get a URL where the Studio was deployed!++## Render.com++To deploy the Remotion Studio to [Render.com](https://render.com):++- First add the above `Dockerfile` to the repo.+- Create a new "Web Service" and link your repository.+- Choose at least the "Standard" plan (2GB Memory).+- Deploy!++## DigitalOcean App Platform++Is not working at the moment. The Render Button is disabled, because the DigitalOcean HTTP Proxy [does not support server-sent events](https://www.digitalocean.com/community/questions/does-app-platform-support-sse-server-sent-events-application).++A normal DigitalOcean droplet does work, though.++## Example for deployment++A test project to deploy the Remotion Studio is available [here](https://github.com/remotion-dev/shorts-customizer).++## See also++- [Dockerizing an Remotion app](/docs/docker)diff --git a/packages/docs/docs/studio/deploy-static.mdx b/packages/docs/docs/studio/deploy-static.mdxnew file mode 100644index 0000000000..5e780a759b--- /dev/null+++ b/packages/docs/docs/studio/deploy-static.mdx@@ -0,0 +1,163 @@+---+title: Deploy Remotion Studio as static site+sidebar_label: Deploy as static site+crumb: "Remotion Studio"+---++_available from v4.0.97_++import Tabs from "@theme/Tabs";+import TabItem from "@theme/TabItem";++You can deploy the Remotion Studio as a static site, for example to Vercel or Netlify.+While the Render button will be disabled, it may be used as a [Serve URL](/docs/terminology/serve-url) to pass to rendering APIs.+Make sure you are on at least v4.0.97 to use this feature - use `npx remotion upgrade` to upgrade.++## Export the Remotion Studio as a static site++To export the Remotion Studio as a static site, run the [`remotion bundle`](/docs/cli/bundle) command:++```bash+npx remotion bundle+```++The output will be in the `build` folder.+We recommend to add `build` to your `.gitignore` file. The command will offer to do it for you when you run it.++## Deploy to Vercel++To deploy to Vercel, [click here to connect your repository](https://vercel.com/new).++In the "Build and Output" settings, set the following:++- **Build Command**: `bunx remotion bundle`+- **Output Directory**: `build`+- **Installation Command**: _Leave default_++:::note+Using bunx as a script runner is slightly faster than using `npx`.+:::++## Rendering from a URL++The deployed URL is a [Serve URL](/docs/terminology/serve-url) can also be used to render a video:++<Tabs+defaultValue="cli"+values={[+{ label: 'CLI', value: 'cli', },+{ label: 'Node.js/Bun', value: 'ssr', },+{ label: 'Lambda', value: 'lambda', },+{ label: 'Cloud Run', value: 'cloudrun', },+]+}>+<TabItem value="cli">++Minimal example:++```bash+npx remotion render https://remotion-helloworld.vercel.app+```++Specify "HelloWorld" [composition ID](/docs/terminology/composition#composition-id) and [input props](/docs/terminology/input-props):++```bash+npx remotion render https://remotion-helloworld.vercel.app HelloWorld --props '{"titleText":"Hello World"}'+```++ </TabItem>+<TabItem value="ssr">++```tsx twoslash title="render.mjs"+// @module: esnext+// @target: es2017+const outputLocation = "/path/to/frames";++import { renderMedia, selectComposition } from "@remotion/renderer";++// ---cut---+const inputProps = {+ titleText: "Hello World",+};++const serveUrl = "https://remotion-helloworld.vercel.app";++const composition = await selectComposition({+ serveUrl,+ id: "HelloWorld",+ inputProps,+});++await renderMedia({+ composition,+ serveUrl,+ codec: "h264",+ inputProps,+});+```++Refer to [`renderMedia()`](/docs/renderer/render-media) to see all available options.++ </TabItem>++ <TabItem value="lambda">++```bash title="CLI"+npx remotion lambda render https://remotion-helloworld.vercel.app HelloWorld --props '{"titleText":"Hello World"}'+```++```tsx twoslash title="Node.js/Bun"+// @module: esnext+// @target: es2017+// ---cut---+import { renderMediaOnLambda } from "@remotion/lambda/client";++const { bucketName, renderId } = await renderMediaOnLambda({+ region: "us-east-1",+ functionName: "remotion-render-bds9aab",+ composition: "HelloWorld",+ serveUrl: "https://remotion-helloworld.vercel.app",+ codec: "h264",+ inputProps: {+ titleText: "Hello World",+ },+});+```++You need to complete the [Remotion Lambda Setup](/docs/lambda/setup) first.++ </TabItem>++ <TabItem value="cloudrun">++```bash title="CLI"+npx remotion cloudrun render https://remotion-helloworld.vercel.app HelloWorld --props '{"titleText":"Hello World"}'+```++```tsx twoslash title="Node.js/Bun"+// @module: esnext+// @target: es2017+// ---cut---+import { renderMediaOnCloudrun } from "@remotion/cloudrun";++const result = await renderMediaOnCloudrun({+ region: "us-east1",+ serviceName: "remotion-render-bds9aab",+ composition: "HelloWorld",+ serveUrl: "https://remotion-helloworld.vercel.app",+ codec: "h264",+ inputProps: {+ titleText: "Hello World",+ },+});++if (result.type === "success") {+ console.log(result.bucketName);+ console.log(result.renderId);+}+```++You need to complete the [Remotion Cloud Run Setup](/docs/cloudrun-alpha) first.++ </TabItem>+</Tabs>diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.jsindex 22cd667831..418fe75c34 100644--- a/packages/docs/sidebars.js+++ b/packages/docs/sidebars.js@@ -530,7 +530,13 @@ module.exports = {{type: "category",label: "Studio",- items: ["studio/studio", "studio/shortcuts", "studio/quick-switcher"],+ items: [+ "studio/studio",+ "studio/shortcuts",+ "studio/quick-switcher",+ "studio/deploy-static",+ "studio/deploy-server",+ ],},{type: "category",@@ -559,7 +565,6 @@ module.exports = {"ssr","ssr-node","docker",- "deploy-studio","miscellaneous/linux-single-process","gpu","miscellaneous/cloud-gpu",diff --git a/packages/docs/static/generated/articles-docs-deploy-remotion-studio.png b/packages/docs/static/generated/articles-docs-deploy-remotion-studio.pngdeleted file mode 100644index ccfbae92e3..0000000000Binary files a/packages/docs/static/generated/articles-docs-deploy-remotion-studio.png and /dev/null differdiff --git a/vercel.json b/vercel.jsonindex 8eeb319df9..db4185dda9 100644--- a/vercel.json+++ b/vercel.json@@ -286,6 +286,11 @@"source": "/standalone","destination": "/docs/standalone","permanent": false+ },+ {+ "source": "/docs/deploy-studio",+ "destination": "/docs/studio/deploy-server",+ "permanent": false}]}