From 76333b93ca01d72b735822e562e1a8fb1062b84d Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 6 Jan 2026 09:29:52 +0000 Subject: [PATCH 1/3] docs: update CLI deploy self-hosting flags Remove deprecated flags (--self-hosted, --skip-deploy, --load-image, --registry, --namespace) and add current options (--local-build, --load, --native-build-server, --detach). Update examples to show correct usage for self-hosted deployments. Fixes #2835 --- docs/snippets/cli-commands-deploy.mdx | 60 ++++++++++++++------------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/docs/snippets/cli-commands-deploy.mdx b/docs/snippets/cli-commands-deploy.mdx index d3ed672f2b..1d2c088def 100644 --- a/docs/snippets/cli-commands-deploy.mdx +++ b/docs/snippets/cli-commands-deploy.mdx @@ -85,50 +85,54 @@ These options are available on most commands. ### Self-hosting -These options are typically used when [self-hosting](/open-source-self-hosting) or for local development. +These options are used when [self-hosting](/open-source-self-hosting) or for local development. - - Builds and loads the image using your local docker. Use the `--registry` option to specify the - registry to push the image to when using `--self-hosted`, or just use `--push` to push to the - default registry. + + Build the deployment image locally using your local Docker instead of using the remote build service. - - Load the built image into your local docker. + + Load the built image into your local Docker after building it. - - Loads the image into your local docker after building it. - - - - Specify the registry to push the image to when using `--self-hosted`. Will automatically enable - `--push`. + + Push the image to the registry after building locally. - - When using the `--self-hosted` flag, push the image to the registry. + + The networking mode for RUN instructions when building locally. Options: `default`, `none`, `host`. - - The namespace to use when pushing the image to the registry. For example, if pushing to Docker - Hub, the namespace is your Docker Hub username. + + Use the native build server for building the image. This uploads your project files and builds remotely. - - The networking mode for RUN instructions when using `--self-hosted`. + + Return immediately after the deployment is queued, without waiting for the build to complete. Implies `--native-build-server`. ## Examples -### Push to Docker Hub (self-hosted) +### Self-hosted deployment + +For self-hosted deployments, set your `TRIGGER_ACCESS_TOKEN` and use the `--api-url` option to point to your self-hosted instance: + +```bash +TRIGGER_ACCESS_TOKEN=your_token npx trigger.dev@latest deploy --api-url https://your-trigger-instance.com +``` + +### Local build with Docker + +Build the image locally and load it into your local Docker: + +```bash +npx trigger.dev@latest deploy --local-build --load +``` + +### Local build and push to registry -An example of deploying to Docker Hub when using a self-hosted setup: +Build the image locally and push it to your configured registry: ```bash -npx trigger.dev@latest deploy \ - --self-hosted \ - --load-image \ - --registry docker.io \ - --namespace mydockerhubusername +npx trigger.dev@latest deploy --local-build --push ``` From 68e5f9657f45abe07835459839cc299e2ed83b06 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 6 Jan 2026 09:34:59 +0000 Subject: [PATCH 2/3] docs: simplify self-hosting deploy docs - Remove hidden CLI flags from docs (--load, --push, --network) - Clarify that v4 self-hosted builds are local by default - Remove deprecated --self-hosted flag from examples - Reference GitHub Actions guide for CI setup - Simplify GitHub Actions self-hosting example Fixes #2835 --- docs/github-actions.mdx | 17 +++------ docs/snippets/cli-commands-deploy.mdx | 52 ++++----------------------- 2 files changed, 10 insertions(+), 59 deletions(-) diff --git a/docs/github-actions.mdx b/docs/github-actions.mdx index 897ac5cac6..217d8baa73 100644 --- a/docs/github-actions.mdx +++ b/docs/github-actions.mdx @@ -134,16 +134,11 @@ You should use the version you run locally during dev and manual deploy. The cur ## Self-hosting -When self-hosting, you will have to take a few additional steps: +When self-hosting, you need to: -- Specify the `TRIGGER_API_URL` environment variable. You can add it to the GitHub secrets the same way as the access token. This should point at your webapp domain, for example: `https://trigger.example.com` -- Setup docker as you will need to build and push the image to your registry. On [Trigger.dev Cloud](https://cloud.trigger.dev) this is all done remotely. +- Set up Docker Buildx in your CI environment for building images locally. - Add your registry credentials to the GitHub secrets. -- Use the `--self-hosted` and `--push` flags when deploying. - -If you're self-hosting v4, the `--self-hosted` and `--push` flags are **NOT** needed. - -Other than that, your GitHub action file will look very similar to the one above: +- Specify the `TRIGGER_API_URL` environment variable pointing to your webapp domain, for example: `https://trigger.example.com` @@ -170,13 +165,11 @@ jobs: - name: Install dependencies run: npm install - # docker setup - part 1 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 with: version: latest - # docker setup - part 2 - name: Login to DockerHub uses: docker/login-action@v3 with: @@ -186,11 +179,9 @@ jobs: - name: 🚀 Deploy Trigger.dev env: TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }} - # required when self-hosting TRIGGER_API_URL: ${{ secrets.TRIGGER_API_URL }} - # deploy with additional flags run: | - npx trigger.dev@latest deploy --self-hosted --push + npx trigger.dev@latest deploy ``` diff --git a/docs/snippets/cli-commands-deploy.mdx b/docs/snippets/cli-commands-deploy.mdx index 1d2c088def..596c1e54b2 100644 --- a/docs/snippets/cli-commands-deploy.mdx +++ b/docs/snippets/cli-commands-deploy.mdx @@ -85,54 +85,14 @@ These options are available on most commands. ### Self-hosting -These options are used when [self-hosting](/open-source-self-hosting) or for local development. - - - Build the deployment image locally using your local Docker instead of using the remote build service. - - - - Load the built image into your local Docker after building it. - - - - Push the image to the registry after building locally. - - - - The networking mode for RUN instructions when building locally. Options: `default`, `none`, `host`. - - - - Use the native build server for building the image. This uploads your project files and builds remotely. - - - - Return immediately after the deployment is queued, without waiting for the build to complete. Implies `--native-build-server`. - - -## Examples - -### Self-hosted deployment - -For self-hosted deployments, set your `TRIGGER_ACCESS_TOKEN` and use the `--api-url` option to point to your self-hosted instance: +When [self-hosting](/open-source-self-hosting), builds are performed locally by default. Set the `TRIGGER_ACCESS_TOKEN` environment variable and point to your self-hosted instance using `TRIGGER_API_URL` or `--api-url`: ```bash -TRIGGER_ACCESS_TOKEN=your_token npx trigger.dev@latest deploy --api-url https://your-trigger-instance.com +TRIGGER_ACCESS_TOKEN=your_token TRIGGER_API_URL=https://your-trigger-instance.com npx trigger.dev@latest deploy ``` -### Local build with Docker - -Build the image locally and load it into your local Docker: - -```bash -npx trigger.dev@latest deploy --local-build --load -``` +For CI/CD setup with self-hosting, see the [GitHub Actions guide](/github-actions#self-hosting). -### Local build and push to registry - -Build the image locally and push it to your configured registry: - -```bash -npx trigger.dev@latest deploy --local-build --push -``` + + Force building the deployment image locally using your local Docker. This is automatic when self-hosting. + From 0fe9dc0e0ea98e0bd30a7be6e386a84645654bd0 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 6 Jan 2026 09:43:14 +0000 Subject: [PATCH 3/3] docs: fix self-hosting section in deploy docs - Move --local-build param to correct location with other options - Fix self-hosting link to /self-hosting/overview - Show simple deploy command first (after CLI login) - Move CI env vars mention to secondary position --- docs/snippets/cli-commands-deploy.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/snippets/cli-commands-deploy.mdx b/docs/snippets/cli-commands-deploy.mdx index 596c1e54b2..cc5e6120a8 100644 --- a/docs/snippets/cli-commands-deploy.mdx +++ b/docs/snippets/cli-commands-deploy.mdx @@ -77,6 +77,10 @@ npx trigger.dev@latest deploy [path] Turn off syncing environment variables with the Trigger.dev instance. + + Force building the deployment image locally using your local Docker. This is automatic when self-hosting. + + ### Common options These options are available on most commands. @@ -85,14 +89,10 @@ These options are available on most commands. ### Self-hosting -When [self-hosting](/open-source-self-hosting), builds are performed locally by default. Set the `TRIGGER_ACCESS_TOKEN` environment variable and point to your self-hosted instance using `TRIGGER_API_URL` or `--api-url`: +When [self-hosting](/self-hosting/overview), builds are performed locally by default. Once you've logged in to your self-hosted instance using the CLI, you can deploy with: ```bash -TRIGGER_ACCESS_TOKEN=your_token TRIGGER_API_URL=https://your-trigger-instance.com npx trigger.dev@latest deploy +npx trigger.dev@latest deploy ``` -For CI/CD setup with self-hosting, see the [GitHub Actions guide](/github-actions#self-hosting). - - - Force building the deployment image locally using your local Docker. This is automatic when self-hosting. - +For CI/CD environments, set `TRIGGER_ACCESS_TOKEN` and `TRIGGER_API_URL` environment variables. See the [GitHub Actions guide](/github-actions#self-hosting) for more details.