Deployment and upgradesOfficial documentation7 min readDeployment and upgrades

Set Up FastGPT Sealos Devbox Environment Variables

This document details the required environment variables to configure FastGPT self-hosted instances to use Sealos Devbox as its agent sandbox provider.

Overview

This document details the required environment variables to configure FastGPT self-hosted instances to use Sealos Devbox as its agent sandbox provider. These settings apply to both the fastgpt-app and fastgpt-pro FastGPT services. Proper configuration of these variables is mandatory for sandboxed agent functionality, and the FastGPT main service must have network access to the specified Sealos Devbox server API endpoint.

Environment Variable Reference

All required environment variables must be added to the service configuration for both fastgpt-app and fastgpt-pro. The full reference list is below:

Variable NameDescriptionStandard Value/Example
AGENT_SANDBOX_PROVIDERDefines the active agent sandbox providersealosdevbox
AGENT_SANDBOX_SEALOS_BASEURLAPI URL of the provisioned Sealos Devbox server, accessible to the FastGPT main servicehttps://devbox-server.example.com
AGENT_SANDBOX_SEALOS_TOKENAuthentication access token issued for the Sealos Devbox servicereplace_with_sealos_devbox_token
AGENT_SANDBOX_SEALOS_IMAGEContainer image tag for sandbox instance deploymenthub.hzh.sealos.run/labring/devbox-sandbox:v0.2.0
AGENT_SANDBOX_CPU_COUNTMaximum CPU cores allocated per sandbox instance1
AGENT_SANDBOX_MEMORY_MIBMaximum memory allocated per sandbox instance, measured in mebibytes2048
AGENT_SANDBOX_STORAGE_SIZE_GIMaximum storage allocated per sandbox instance, measured in gibibytes1

Configuration Steps

  1. Locate the environment variable configuration files for the fastgpt-app and fastgpt-pro self-hosted services.
  2. Insert the full block of environment variables provided in the reference section into each service's configuration file.
  3. Replace placeholder values: update AGENT_SANDBOX_SEALOS_BASEURL to match your organization's provided Sealos Devbox server URL, and replace AGENT_SANDBOX_SEALOS_TOKEN with your issued access token.
  4. Save the updated configuration files for both services.
  5. Restart the fastgpt-app and fastgpt-pro services to apply the new environment variables.

Required Network Access

The FastGPT main service must have outbound network connectivity to the URL specified in AGENT_SANDBOX_SEALOS_BASEURL to successfully provision and manage sandbox instances. No additional inbound ports need to be exposed on the FastGPT services for this functionality.

Source: FastGPT official source

Applicability and version scope

Use this page for the documented Deployment and upgrades scenario. Confirm the FastGPT, dependency, API, and deployment versions in the official source before applying a change.

Safety guardrails

Use [REDACTED_CREDENTIAL] for credentials and private data. Confirm the documented environment and version before review.

Rollback guidance

Restore the prior technical-content authority snapshot. Restore saved configuration and data snapshots, then repeat the smallest verification scenario.