diff --git a/docs/configuration/env-variables.mdx b/docs/configuration/env-variables.mdx index ae40b1a8..8b123b1d 100644 --- a/docs/configuration/env-variables.mdx +++ b/docs/configuration/env-variables.mdx @@ -48,6 +48,18 @@ Shumai supports storing files locally or on S3-compatible endpoints. | `S3_USE_SSL` | Set to `true` to use HTTPS for S3 endpoints. | `false` (default) | | `PRESIGNED_URL_EXPIRES_IN` | Number of hours for which generated presigned download/upload links are valid. | `5` (default) | +### Local Storage Port Configuration + +When `STORAGE_BACKEND` is set to `local` (default): + +- `SHUMAI_SERVER_PORT` configures the port on which the Shumai web server starts and listens. +- `AWS_ENDPOINT_URL_S3` configures the public/external endpoint used by client browsers to upload and download files. It must include the scheme and port. + +For example, if you deploy Shumai on a remote server at `http://123.456.7.8` and configure port mapping `12345:3000` (exposing port 3000 internally as port 12345 externally) in Docker Compose: + +- Set `SHUMAI_SERVER_PORT` to `3000`. +- Set `AWS_ENDPOINT_URL_S3` to `http://123.456.7.8:12345`. + --- ## Workflow Config diff --git a/docs/getting-started/quickstart.mdx b/docs/getting-started/quickstart.mdx index cbfac153..986f7200 100644 --- a/docs/getting-started/quickstart.mdx +++ b/docs/getting-started/quickstart.mdx @@ -61,16 +61,23 @@ To handle media processing and security isolation, the host machine must have th ``` 3. **Configure Environment Variables**: Create a new directory, navigate into it, and create a `.env` file: + ```bash mkdir shumai && cd shumai ``` + Create a `.env` file with the following variables: + ```env DATABASE_URL=postgresql://shumai:shumai_password@localhost:5432/shumai_db?schema=public BETTER_AUTH_SECRET=your-random-32-character-secret-key STORAGE_BACKEND=local AWS_ENDPOINT_URL_S3=http://localhost:3000 ``` + + > [!TIP] + > `AWS_ENDPOINT_URL_S3` must include the scheme and port (e.g. `http://localhost:3000`) where Shumai is publicly accessible. This URL is used directly by client browsers for file uploads. + 4. **Start Shumai**: > [!IMPORTANT]