# Run your own server

> Set up Creator Toolset on a server of your own with Docker and HTTPS on your domain, then connect the Mac app for AI. About an afternoon.

This page sets up Creator Toolset on a server you run: the app in Docker, HTTPS on a domain of your own, one account for you, optional storage in a bucket, and the Mac app on your Mac for AI. You finish with the Mac app signed in to your server. The full guide in the repository is written to be followed step by step, by you or by an AI agent working for you, and each step ends with a check.

## Before you start

- A Linux server on x86_64 (amd64). Check with `uname -m`, which must print `x86_64`. Start with 4 vCPU and 8 GB of RAM: exports, enhancement and transcoding use the CPU and memory.
- A domain you control, with a name such as `tools.example.com`.
- Ports 80 and 443 open to the internet. Port 80 is needed for the certificate.
- Docker Engine with Docker Compose v2.24 or newer.
- A Mac with the Creator Toolset Mac app, for AI.

## 1. Point a name at the server

Create a DNS **A record** for `tools.example.com` that points at the server's public IPv4 address. Then check it:

```sh
dig +short tools.example.com
```

Check: the address printed is the server's. Caddy cannot get a certificate until it matches, and a change can take a few minutes to show.

## 2. Install Docker and get the code

On Debian or Ubuntu, install Docker Engine and the Compose plugin from Docker's own instructions. Then:

```sh
sudo mkdir -p /opt && sudo chown "$USER" /opt
git clone https://github.com/andripeetso/creatortoolset.git /opt/creator-toolset
cd /opt/creator-toolset/apps/captions
```

Check: `docker compose version` prints version 2.24 or newer. Every later step runs from `apps/captions`.

## 3. Start the server

One command writes the settings file and starts the server:

```sh
scripts/setup-server.sh tools.example.com
```

The script copies `.env.example` to `.env` with mode 600, sets `DOMAIN`, writes a random `APP_SECRET` without printing it, and runs `docker compose up -d --build`. Run it again after a change: it keeps `.env`. The first build takes a long time, because it downloads Chromium and FFmpeg.

Check: `docker compose ps` shows `app` and `caddy` as `running`.

> **Note:** `APP_SECRET` is the sign-in secret and your first password. Changing it signs everyone out. Keep it in a password manager, and do not paste it into a chat or a ticket.

The server's own keys for speech and audio (`DEEPGRAM_API_KEY`, `ELEVENLABS_API_KEY`, `NVIDIA_API_KEY`, `PERPLEXITY_API_KEY`) are optional and go in `.env`. Leave a value empty to switch its feature off. AI is not one of them: each person connects their own (step 8).

## 4. Choose where the videos live

Pick one.

**A. The server's disk (the default).** Projects, Review videos and exports go to the Docker volume `creator-toolset_caption-data`. Make sure the disk has room for your footage.

**B. A private bucket on S3-compatible storage.** Works with AWS S3, Cloudflare R2, Backblaze B2, Wasabi and MinIO. The browser uploads straight to the bucket, so the server does not carry the video. In the provider's console:

1. Create a bucket that is private, with no public access.
2. Create a key that can read and write only that bucket.
3. Set the bucket's CORS rules to allow `PUT`, `GET` and `HEAD` from `https://tools.example.com`, and to expose the `ETag` header. Uploads are multipart and need it.
4. In `.env`, set `OBJECT_STORAGE_ENDPOINT`, `OBJECT_STORAGE_BUCKET`, `OBJECT_STORAGE_ACCESS_KEY` and `OBJECT_STORAGE_SECRET_KEY`, plus `OBJECT_STORAGE_REGION` if the provider names one. Set `OBJECT_STORAGE_FORCE_PATH_STYLE=true` only if the provider needs path-style URLs. Set all four required values, or none.

Then run `docker compose up -d` and the doctor (step 6). The doctor tests the bucket with a small file and removes it.

## 5. Check the health address

```sh
docker compose up -d --build
curl -fsS https://tools.example.com/api/health
```

Check: the second command prints `{"ok":true,...}`. If it does not, read `docker compose logs caddy` for certificate problems and `docker compose logs --tail=50 app` for startup problems.

## 6. Run the doctor

```sh
docker compose exec app node scripts/doctor.mjs
```

The doctor checks that the server answers, that sign-in is on, that the data folder is writable, that FFmpeg runs, that storage works (if you set a bucket), and that each AI key you set is accepted. It prints `ok`, `warn`, `skip` or `FAIL` for each. Fix every `FAIL` and read every `warn`. A `skip` means the feature is off, or the check runs in the Mac app instead (AI).

Run it again after each change to `.env`, followed by `docker compose up -d`.

## 7. Sign in and set your password

1. Open `https://tools.example.com` in a browser.
2. Sign in as `admin` (or the name in `ADMIN_USERNAME`), with the value of `APP_SECRET` as the password. The account is made on the first start.
3. Open **Settings → Account** and set a new password. From then on that password signs you in.

Check: the page opens on your account, and the health address still answers.

## 8. Connect AI

Creator Toolset does not send AI work to an account that is not yours. You have two routes.

**Your own subscription, on your Mac (recommended).** Install Claude Code or Codex on your Mac and sign in with your own plan. Then, in the Mac app:

1. Add the server with **Servers → Add server…** and the address `https://tools.example.com`. Sign in to it in the window.
2. Turn on **Take work from this server**. This adds the Mac to your account once.
3. In the server's **Settings → Providers**, press **Add provider** and follow the install and sign-in steps for Claude Code or Codex, if the Mac does not have it yet.
4. Open the provider's row and press **Test**.

**An API key of your own.** Add an Anthropic key in **Settings → API keys**. Anthropic bills it directly.

Each paid call runs on the person's own key from **Settings → API keys**. If there is none, it can use a key from `.env`, but only for the admin, and never for AI. A tool that needs a key you have not added says which one.

Check: **Settings → Providers** shows your Mac as online with a tool installed, and **Test** passes.

> **Note:** Do not share one Mac or one subscription with another person. Each person connects their own.

## 9. Back up

Two things need a backup: the data volume, and your bucket if you use one. Stop the app while the volume is copied, so the files are consistent:

```sh
cd /opt/creator-toolset/apps/captions
mkdir -p /opt/backups
docker compose stop app
docker run --rm \
  -v creator-toolset_caption-data:/data:ro \
  -v /opt/backups:/backup \
  alpine tar czf "/backup/data-$(date +%F).tgz" -C /data .
docker compose start app
```

Copy the archive off the server. A backup on the same disk is lost with the disk. Keep a copy of `.env` somewhere secure, because it holds `APP_SECRET`.

Check: `tar tzf /opt/backups/data-*.tgz | head` lists files. For a bucket, use the provider's own versioning or backup feature.

## 10. Update

Read what is coming first: `git fetch && git log --oneline HEAD..origin/main` lists the new commits. Back up first (step 9). Then:

```sh
cd /opt/creator-toolset
git pull
cd apps/captions
docker compose build
until docker compose exec -T app node -e "fetch('http://127.0.0.1:'+(process.env.PORT||3000)+'/api/health').then(r=>r.json()).then(h=>process.exit((h.answering||0)+(h.working||0)?1:0),()=>process.exit(0))"; do sleep 15; done
docker compose up -d
docker compose exec app node scripts/doctor.mjs
```

The `until` line waits while the server is answering or working, so the restart ends no work in progress.

To update from the app instead, run the updater from cron as a user that may run Docker. Set `CT_UPDATE_HOUR` to make it update every night at that hour, in the machine's clock:

```sh
*/5 * * * * CT_UPDATE_HOUR=4 /opt/creator-toolset/apps/captions/scripts/server-update.sh >> /var/log/creator-toolset-update.log 2>&1
```

An admin then sees how many changes are waiting in **Settings → Storage → Update**, with **Update now**. The server takes no new job while it waits, and the restart comes when the running work is done.

An update restarts the app. Uploads resume afterwards. An AI answer that streams to an open page, a render, a voice enhancement or a caption job is ended, and its page says so. Start it again.

## 11. When something is wrong

- **The certificate does not appear, or the browser warns.** DNS must point at the server, and ports 80 and 443 must be open. Read `docker compose logs caddy`.
- **`APP_SECRET is required in production`.** `.env` has no value for it, or the file is not in `apps/captions`. Compose reads `.env` from the folder that holds `docker-compose.yml`.
- **Uploads fail or stall.** With a bucket, check the CORS rules from step 4 and the storage line of the doctor. Without one, check the disk's free space.
- **Exports fail.** Read `docker compose logs app` around the failure. Exports need memory and `/dev/shm` (the compose file sets 1 GB).
- **The Mac cannot reach the site.** Check the address under **Servers**. **Servers → Run your own server…** runs the HTTPS and health checks and says which one fails.
- **Anything else.** Run the doctor, then send its output with `docker compose logs --tail=200 app` to whoever maintains the server. Remove secrets from it first.

More symptoms are in [Troubleshooting](/docs/troubleshooting).

## Good to know

- The kit makes one account, yours. There is no sign-up, no invites and no team page. Teams are for a server run in hosted mode, which is set in `.env` with `CT_MODE=hosted`. See [Teams](/docs/teams).
- To let your own computers join one account through Cloudflare Tunnel, run the Connect broker from the repository's `apps/relay` folder with a Cloudflare zone of your own. Its step-by-step guide is `docs/operations/self-host-relay.md` in the repository.
- The Docker image runs on x86_64 Linux only. The duplicate check in the Media Library works without the native fingerprint tools, which the image does not build.
- The database is files in the data volume. There is no database server to run.
- Keep the server patched, and keep SSH on keys only.
