# Run the Docker image

> Start the published image with a workspace volume, the required key and the first administrator.

Source: https://alexgalhardo.github.io/vukem-video/docs/self-hosting/docker/

## You will learn

- which image to pull and which tags it has;
- the command that starts it and what each part does;
- how to check that it runs.

## The idea

Every stable release publishes one multi-architecture image (`linux/amd64` and `linux/arm64`) with the Vukem Video binary and a pinned LGPL FFmpeg inside. Pull it from either registry, the digest is the same:

- `ghcr.io/alexgalhardo/vukem-video`
- `alexgalhardo/vukem-video` on Docker Hub

The tags are `X.Y.Z`, `X.Y` and `latest`. Pin `X.Y.Z` for a server you keep.

A container binds every network interface, so the image always runs in [network mode](/docs/self-hosting/network-mode): login is mandatory and the server needs an `APP_KEY`. The image sets `HOST=0.0.0.0`, `PORT=7878`, `VUKEM_VIDEO_MODE=network`, `APP_URL=http://localhost:7878` and `VUKEM_VIDEO_HOME=/data`. It runs as the user `app` (uid 10001), writes only to the `/data` volume and sends no data anywhere. No web server runs in it: the Go binary serves HTTP.

## Quick start

```bash
docker run -d --name vukem-video \
  -p 127.0.0.1:7878:7878 \
  -v vukem-video:/data \
  -e APP_KEY="$(openssl rand -base64 32)" \
  -e VUKEM_VIDEO_ADMIN_EMAIL=admin@example.com \
  -e VUKEM_VIDEO_ADMIN_PASSWORD="choose-a-long-password" \
  ghcr.io/alexgalhardo/vukem-video:X.Y.Z
curl -fsS http://localhost:7878/up
```

- `-p 127.0.0.1:7878:7878` publishes the port on your own machine only. With the default `APP_URL=http://localhost:7878` this is the one case where plain HTTP is accepted.
- `-v vukem-video:/data` keeps the workspace (database, media, exports) across container runs.
- `APP_KEY` is required: 32 bytes or more, base64. It is not baked into the image, because a key in a public image is public. Store the value somewhere safe and give the container the same one on every start.
- The two `VUKEM_VIDEO_ADMIN_*` variables create the first administrator, once, when no user exists. A container never lets you run `user:create` before the first start, because the server owns the workspace. Afterwards the variables are ignored. The password may be `@file:/run/secrets/admin_password` to keep it out of the environment, and the log shows the email and never the password.
- `GET /up` answers 200 when the server is healthy; the image has a health check on it. `docker run --rm ghcr.io/alexgalhardo/vukem-video:X.Y.Z version` prints the version.

For any use other than `localhost` (another machine, a domain name), set `APP_URL` to the public `https` address and put TLS in front: see [Put Caddy in front](/docs/self-hosting/caddy).

## Common mistakes

- Publishing the port as `-p 7878:7878`, which listens on every interface. Use `127.0.0.1:` unless a proxy with TLS is in front.
- Starting without `APP_KEY`: the server exits with `APP_KEY missing`. The message names the variable.
- Reaching the published port from another machine by the address of the host: refused, since the host and origin must be `localhost:7878`.
- Starting a second container on the same volume. One process owns a workspace; the second fails with `E_WORKSPACE_LOCKED`.

## Next steps

- [Network mode and login](/docs/self-hosting/network-mode)
- [Backups and upgrades](/docs/self-hosting/backups-and-upgrades)
