Skip to content

🎥 Make videos programmatically with React

tweak config pages

Jonny Burger23c8b988f4f0
diff --git a/packages/docs/docs/cli/studio.md b/packages/docs/docs/cli/studio.md
index 1f5e263db0..5da38a2081 100644
--- a/packages/docs/docs/cli/studio.md
+++ b/packages/docs/docs/cli/studio.md
@@ -43,7 +43,7 @@ Specify a location for a dotenv file - Default `.env`. [Read about how environme
### `--port`
-[Set a custom HTTP server port](/docs/config#setstudioport). If not defined, Remotion will try to find a free port.
+[Set a custom HTTP server port to start the server on](/docs/config#setstudioport). If not defined, Remotion will try to find a free port.
### `--public-dir`<AvailableFrom v="3.2.13" />
diff --git a/packages/docs/docs/config.md b/packages/docs/docs/config.md
index f51d9f9e05..6feeae71dc 100644
--- a/packages/docs/docs/config.md
+++ b/packages/docs/docs/config.md
@@ -73,34 +73,9 @@ Config.setCachingEnabled(false);
The [command line flag](/docs/cli/render#--bundle-cache) `--bundle-cache` will take precedence over this option.
-## ~~setPort()~~
-
-:::note
-The setPort method is deprecated. Please use [`setStudioPort()`](/docs/config#setStudioPort)
-and [`setRendererPort()`](/docs/config#setRendererPort) instead.
-:::note
-
-Define on which port Remotion should start it's HTTP servers.
-HTTP servers
-By default, Remotion will try to find a free port.
-If you specify a port, but it's not available, Remotion will throw an error.
-
-:::note
-When starting the [Remotion Studio](/docs/terminology#remotion-studio), a server will be started to host it.
-During rendering, a HTTP server is also started in the background to serve the Webpack [bundle](/docs/terminology#bundle).
-:::
-
-```ts twoslash title="remotion.config.ts"
-import { Config } from "@remotion/cli/config";
-// ---cut---
-Config.setPort(3003);
-```
+## setStudioPort()<AvailableFrom v="4.0.61" />
-The [command line flag](/docs/cli/render#--port) `--port` will take precedence over this option.
-
-## setStudioPort()<AvailableFrom v="4.0.57" />
-
-To set the port for Studio.
+Set the HTTP port for the Studio.
```ts twoslash title="remotion.config.ts"
import { Config } from "@remotion/cli/config";
@@ -110,9 +85,9 @@ Config.setStudioPort(3003);
The [command line flag](/docs/cli/studio#--port) `--port` will take precedence over this option.
-## setRendererPort()<AvailableFrom v="4.0.57" />
+## setRendererPort()<AvailableFrom v="4.0.61" />
-To set the port for Renderer.
+Set the port to be used to host the Webpack bundle.
```ts twoslash title="remotion.config.ts"
import { Config } from "@remotion/cli/config";
@@ -818,6 +793,32 @@ Config.setFfprobeExecutable("/path/to/custom/ffprobe");
The [command line flag](/docs/cli/render#--ffprobe-executable) `--ffprobe-executable` will take precedence over this option.
+## ~~setPort()~~
+
+_deprecated in v4.0.61 - use [`setStudioPort()`](/docs/config#setstudioport)_
+and [`setRendererPort()`](/docs/config#setrendererport) instead.
+
+Define on which port Remotion should start it's HTTP servers.
+By default, Remotion will try to find a free port.
+If you specify a port, but it's not available, Remotion will throw an error.
+
+:::warning
+Setting this option will break rendering in the Remotion Studio, because this option controls two settings at the same time:
+
+- When starting the [Remotion Studio](/docs/terminology#remotion-studio), a server will be started to host it ([`setStudioPort()`](/docs/config#setstudioport)).
+- During rendering, a HTTP server is also started in the background to serve the Webpack [bundle](/docs/terminology#bundle) ([`setRendererPort()`](/docs/config#setrendererport)).
+
+Use the options individually.
+:::
+
+```ts twoslash title="remotion.config.ts"
+import { Config } from "@remotion/cli/config";
+// ---cut---
+Config.setPort(3003);
+```
+
+The [command line flag](/docs/cli/render#--port) `--port` will take precedence over this option. If set on `npx remotion studio`, it will set the Studio port, otherwise the renderer port.
+
## See also
- [Encoding guide](/docs/encoding)