# Advanced configuration

Configure an access subpath, a custom brand name, and a logo.

部署说明 · 模块: deploy · 管理人员 · 部署形态：私有部署 · 已确认产品版本：资料未说明 · 来源：现有文档

Private deployment uses the root path and AskTable branding by default. To serve it under a subpath (such as `https://example.com/asktable`) or use your company's name and logo, change the main service container's environment variables and mounts. These settings are for private deployments with **a commercial license**. See [Commercial licensing](https://docs.asktable.com/en/admin/license) for licensing details.

## Prerequisites

| Item               | Requirement                                                                                                                             |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| License            | An activated enterprise license; see [Commercial licensing](https://docs.asktable.com/en/admin/license)                                 |
| Basic deployment   | Running and accessible for login after following [Private deployment (Docker)](https://docs.asktable.com/en/deploy/docker)              |
| Subpath deployment | The outermost gateway can rewrite paths, or use the Caddy reverse proxy below                                                           |
| White-label assets | Prepare PNG logo and favicon files in readable paths on the host                                                                        |
| Applying changes   | Environment variables and mounts are read when the container starts; run `docker compose up -d` after editing to recreate the container |

## Steps

### Step 1: Add BASE\_PATH to the main service

Add a line under the `asktable` service's `environment`, using the desired path prefix:

```yaml
services:
  asktable:
    environment:
      BASE_PATH: /asktable
```

### Step 2: Add a reverse proxy

The reverse proxy strips the path prefix before forwarding requests to the container. For Caddy, add this service to Compose:

```yaml
services:
  caddy:
    image: caddy:2-alpine
    container_name: caddy
    restart: unless-stopped
    ports:
      - "8080:80"
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile:ro
    depends_on:
      - asktable
```

Create `Caddyfile` in the same directory:

```text Caddyfile
:80 {
    redir /asktable /asktable/ permanent

    handle /asktable/* {
        uri strip_prefix /asktable
        reverse_proxy asktable:80
    }
}
```

After the changes, access the app at `http://server-address:8080/asktable/`. In production, the outermost gateway typically listens on 80/443, while this Caddy layer stays internal.

The path prefix must match in both places: `BASE_PATH` and `strip_prefix` in the Caddyfile. A mismatch causes a blank page or 404 responses for static assets.

### Step 3: Change the brand name

Set brand information under the `asktable` service's `environment`:

```yaml
services:
  asktable:
    environment:
      APP_NAME: MyBrand          # Brand name in the interface
      APP_TITLE: My application   # Browser tab title
      APP_DESCRIPTION: Application description   # Page meta description
```

### Step 4: Replace the logo and favicon

The container reads these files by fixed filenames at runtime. Override them with volume mounts:

```yaml
services:
  asktable:
    volumes:
      - ./asktable_data:/asktable
      - ./mylogo.png:/usr/share/nginx/html/logo.png:ro
      - ./myfavicon.png:/usr/share/nginx/html/favicon.png:ro
```

`logo.png` appears in the sidebar, login page, QR code center, and shared page header; `favicon.png` is used for the browser tab icon and apple-touch-icon.

### Step 5: Recreate the container

```bash
docker compose up -d
```

Brand information and the access prefix are written into the frontend configuration when the container starts. Restarting only a process inside the container does not regenerate them.

## Key constraints

| Item                     | Value or default                                                                                                                | Where to change it                                             |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| `BASE_PATH`              | Empty by default, meaning the root path                                                                                         | `asktable.environment`; recreate the container after editing   |
| Prefix consistency       | `BASE_PATH` and the reverse proxy's `strip_prefix` must match                                                                   | Change both together                                           |
| `APP_NAME`               | Default: `AskTable`                                                                                                             | `asktable.environment`                                         |
| `APP_NAME` side effects  | When it is anything other than `AskTable`, the AskTable documentation and “Contact us” entries in the interface are also hidden | No extra configuration required; this is expected behavior     |
| `APP_TITLE`              | Uses the product title by default                                                                                               | `asktable.environment`; an empty value leaves it unchanged     |
| `APP_DESCRIPTION`        | Uses the product description by default                                                                                         | Same as above                                                  |
| `logo.png`               | In-app logo                                                                                                                     | Mount at `/usr/share/nginx/html/logo.png`                      |
| `favicon.png`            | Browser tab icon                                                                                                                | Mount at `/usr/share/nginx/html/favicon.png`                   |
| Frontend error reporting | Not initialized when `WEB_SENTRY_DSN` is empty                                                                                  | `asktable.environment`, together with `WEB_SENTRY_ENVIRONMENT` |
| Applying changes         | Environment variables and mounts are read when the container starts                                                             | Recreate the container with `docker compose up -d`             |

## Troubleshooting

| Symptom                                                | How to identify it                                                                               | Action                                                                                                                                     |
| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| Blank page under the subpath                           | Static asset 404 errors appear in the browser console, and request paths lack the subpath prefix | Check that `BASE_PATH` and `strip_prefix` match, then recreate the container                                                               |
| Subpath returns 404                                    | Accessing `/asktable/` returns 404, while the container is `running`                             | The Caddyfile's `reverse_proxy` target must be `asktable:80`; check the service name and port                                              |
| Brand name is still AskTable                           | The page shows the old name                                                                      | `APP_NAME` has not taken effect, usually because the container was not recreated; run `docker compose up -d` and check again               |
| Broken image where the logo should be                  | `logo.png` returns 403 or 404 in the browser                                                     | Docker creates a directory with the same name if the mounted host file does not exist; make sure `./mylogo.png` is a file, not a directory |
| Logo changed but the interface still shows the old one | The old image still appears in an incognito window                                               | The container mount path must be exactly `/usr/share/nginx/html/logo.png`; also clear the browser cache                                    |
| Documentation entry disappeared                        | `APP_NAME` was changed to something other than `AskTable`                                        | Expected behavior: AskTable's own branded entries are hidden when white labeling is enabled                                                |
| Environment changes have no effect                     | The container creation time in `docker compose ps` predates the change                           | You used `restart` instead of recreating it; run `docker compose up -d`                                                                    |

## Next steps

- [Commercial licensing](https://docs.asktable.com/en/admin/license) — License tiers and activation
- [Private deployment (Docker)](https://docs.asktable.com/en/deploy/docker) — Deployment parameters and troubleshooting
- [Deploy the message gateway](https://docs.asktable.com/en/deploy/feishu-gateway) — Change the Feishu app name yourself after white labeling
- [Deployment overview](https://docs.asktable.com/en/deploy/overview) — Optional components and rollout order
