Installation¶
Requirements¶
- A machine that stays on: a home server, a NAS, a Raspberry Pi 4 or 5, a virtual machine. The image exists for amd64 and arm64.
- Docker with Compose, or Podman with
podman compose. - About 125 MB to download, 350 MB on disk, plus your documents. The image includes Tesseract (about 100 MB), the program that reads photos and scanned PDFs.
- Arca listens on port 8000, on plain HTTP: reach it on your local network, or put an HTTPS reverse proxy in front (see below).
Install with Docker¶
Pick the latest version among the repository's
tags, for example v0.6.0:
mkdir arca && cd arca
curl -fsSLO https://gitlab.com/r0d0lphe/arca/-/raw/v0.6.0/compose.yaml
curl -fsSL -o .env https://gitlab.com/r0d0lphe/arca/-/raw/v0.6.0/.env.example
Edit .env before the first start:
ARCA_SECRET_KEY: generate it withpython3 -c "import secrets; print(secrets.token_urlsafe(50))". It contains no$, which Compose would expand, truncating the key.ARCA_ALLOWED_HOSTS: the names or addresses you type to reach Arca (arca.lan,192.168.1.20).ARCA_TIME_ZONE: your time zone (Europe/Paris); it decides what today is.
Every setting is described in Configuration. Then start Arca and create your account:
docker compose up -d
docker compose exec arca python manage.py createsuperuser
Open http://<address>:8000, sign in, then follow
First steps. Data (database and documents) lives in the
arca-data volume, backups in arca-backups. At each start the container
applies database migrations and runs a quick integrity check.
Turn backups on right away in Backups and keep the recovery key: see Automatic backups. Data and documents are not encrypted on the disk: read Security and privacy.
Podman works the same way: use podman instead of docker.
Install from source¶
With Docker, from a clone, build the image yourself:
git clone https://gitlab.com/r0d0lphe/arca.git arca && cd arca
cp .env.example .env
export COMPOSE_FILE=compose.yaml:compose.build.yaml
docker compose up -d --build
Keep COMPOSE_FILE set for every docker compose command in that directory
(in your shell profile, or as a line of .env). It replaces the automatic
compose.override.yaml: if you use one, add it to the list.
Without Docker:
uv sync
export ARCA_SECRET_KEY=… ARCA_ALLOWED_HOSTS=… ARCA_DATA_DIR=/path/to/data
uv run manage.py migrate
uv run manage.py createsuperuser
uv run --group docs mkdocs build # this documentation
uv run manage.py collectstatic --noinput
uv run gunicorn config.wsgi --bind 0.0.0.0:8000
Reading photos (identity documents, any document) and scanned PDFs needs the
Tesseract program, which the Docker image includes. From source it is
optional: install it with apt install tesseract-ocr (Debian, Ubuntu) or
pacman -S tesseract tesseract-data-eng (Arch). Without it, Quick add works as
before, with no photo screen, and PDFs with text are still read; the Integrity
page says so. Arca brings its own English and French models for Tesseract, so
the reading is the same on every system.
Arca reads no .env file outside Docker: export the variables in the service
that starts it.
Behind an HTTPS reverse proxy¶
To publish Arca through a reverse proxy (Pangolin, Traefik, Caddy, nginx…), keep Arca on plain HTTP inside your network and set:
ARCA_HTTPS=1
ARCA_CSRF_TRUSTED_ORIGINS=https://arca.example.org
ARCA_ALLOWED_HOSTS=arca.example.org
ARCA_TRUSTED_PROXIES=172.18.0.1
The proxy must send the X-Forwarded-Proto and X-Forwarded-For headers (most
do). If you forget ARCA_TRUSTED_PROXIES, the Integrity page warns you: it
names the address a proxy sent X-Forwarded-For from. ARCA_TRUSTED_PROXIES is the address the proxy connects from, so that
failed logins are counted per client: see Login
security. It also decides where plain API tokens
are accepted from (ARCA_API_PLAIN_TOKEN_NETWORKS, private addresses by
default): see AI assistants and API. Docker's internal
networks (172.16.0.0/12) are not included: Docker relays the IPv6 clients of a
port published on every interface with the bridge address, so accepting the
bridge would accept them. A script on the Docker host itself may then be
refused: first publish the ports on one address (127.0.0.1 or the server's
local address), then add only the bridge gateway, as a single address
(172.20.0.1/32), never the whole 172.16.0.0/12. Docker may also take its
networks from 192.168.0.0/16, and Podman uses 10.88.0.0/16: on such hosts,
publish the ports on one address in any case. Before making Arca reachable from
the Internet, go through the checklist of Security and privacy.
When the reverse proxy runs on the same host, publish Arca's port (and the
gateway's) on one address only, not on every interface. In compose.yaml,
replace "8000:8000" with "127.0.0.1:8000:8000", and "8001:8001" with
"127.0.0.1:8001:8001" (or the server's local address, 192.168.1.20:8001:8001,
if devices of your network call the port directly). The reason: published on
every interface, the ports are reachable over IPv6 too, and with Docker's
default IPv4-only network, Docker relays those connections itself; Arca and the
gateway then see every IPv6 client with the address of the Docker bridge
(172.18.0.1), the very address you set as trusted proxy. Such a client could
send a forged X-Forwarded-For and pass for an address of your local network.
AI gateway (optional)¶
To use Arca from an AI assistant, start the gateway arca-mcp (read
AI assistants and API first). It is a separate service,
off unless you ask for it, listening on port 8001. Add to .env:
# Same generator as ARCA_SECRET_KEY, 32 characters at least:
# python3 -c "import secrets; print(secrets.token_urlsafe(32))"
ARCA_GATEWAY_SECRET=…
# The gateway reaches Arca as http://arca:8000: add arca.
ARCA_ALLOWED_HOSTS=arca.lan,192.168.1.20,arca
# Plain tokens accepted from your local network only (empty: none).
ARCA_MCP_PLAIN_TOKEN_NETWORKS=192.168.0.0/16
then start it with the ai profile:
docker compose --profile ai up -d
Arca and the gateway both read ARCA_GATEWAY_SECRET from .env: without it,
or with a shorter one, the gateway refuses to start. The gateway gets only its
own variables, never Arca's secret key. Pass --profile ai to every
docker compose command that should include it (pull, up), or add
COMPOSE_PROFILES=ai to .env. Built from a clone, compose.build.yaml
builds the gateway too. Then turn the API on in Arca, on the API access
page.
The gateway stays on http://arca:8000 even when ARCA_HTTPS is on: it tells
Arca that its clients came over HTTPS (X-Forwarded-Proto: https). Your own
scripts do not: if ARCA_HTTPS is on, they call Arca's HTTPS address
(https://arca.example.org/api/v1/…), not port 8000.
On your local network, clients reach http://<address>:8001/mcp with a plain
token. For Claude on the web or the phone, the gateway must be reachable from
the Internet over HTTPS:
- in your reverse proxy, send a name of its own (
mcp.example.org) to port 8001 of the gateway, and expose onlyarca-mcp, never Arca; - in
.env, set the address clients use and the proxy's address:
ARCA_MCP_PUBLIC_URL=https://mcp.example.org
ARCA_MCP_TRUSTED_PROXIES=172.18.0.1
Without ARCA_MCP_TRUSTED_PROXIES, every client appears with the proxy's
address; if that address is inside ARCA_MCP_PLAIN_TOKEN_NETWORKS, plain
tokens would be accepted from the Internet. Keep the plain-token networks to
your local network. All the gateway's settings are listed in
Gateway settings.
Without Docker, from the sources, run the gateway beside Arca with the same secret (exported in both services, never on a command line):
cd gateway
uv sync
# ARCA_GATEWAY_SECRET and the ARCA_MCP_* variables set in the service
ARCA_MCP_ARCA_URL=http://127.0.0.1:8000 uv run python -m arca_mcp
ARCA_ALLOWED_HOSTS must then include the host of ARCA_MCP_ARCA_URL
(127.0.0.1).
Drop folder (optional)¶
To turn the files of a folder (a scanner's network folder, photos synced from
a phone) into drafts to validate, set ARCA_INBOX_DIR=/inbox, mount the folder
in the arca and inbox services of compose.yaml, and start the inbox
profile: docker compose --profile inbox up -d. Details and recipes:
Drop folder.
Update¶
With Docker:
docker compose pull
docker compose up -d
With a pinned ARCA_VERSION, change it in .env first. Since version 0.6.0,
compose.yaml has a notify service for notifications:
an installation made before needs the new compose.yaml once, as below. The optional services
(the AI gateway arca-mcp, the drop folder's inbox) are described in
compose.yaml: to use one for the first time, download the compose.yaml of
your version again (as in Install with Docker) and copy
your own changes into it (published ports, mounted folders). With the AI gateway,
add --profile ai to both commands (unless COMPOSE_PROFILES=ai is in
.env), and --profile inbox with the drop folder. Built from a clone:
git pull, then docker compose up -d --build (with COMPOSE_FILE as above).
Migrations are applied when the container starts and only go forward: to go back to an older version, restore a backup made before the update (see Restore).
From source:
git pull
uv sync
uv run manage.py migrate
uv run --group docs mkdocs build
uv run manage.py collectstatic --noinput
then restart the service that runs gunicorn.
Run uv run manage.py extract_texts once: it reads the text of PDF documents
saved before, so the search finds them.