API service
The CADVault server is the central metadata service for every Viewer and add-in for SOLIDWORKS in a deployment. It runs as one Docker container that holds two processes: the API service and a file watcher that notices changes made to your CAD files outside CADVault. You fill in one compose file, start it once, and both run.
Using a Synology NAS? Read Synology NAS first: it covers the steps that differ there.
1. Check the host
Section titled “1. Check the host”- Docker with Compose: any Linux host, a NAS with a container app (Synology Container Manager, QNAP Container Station, Portainer), or Docker Desktop for a solo installation.
- An x86-64 processor. The image is published for
linux/amd64only. On a Linux shell,uname -mmust printx86_64. - Port 5080 free on the host. Workstations reach the server on this port. If something else already uses it, pick another free port in step 3.
- Outbound internet access, to activate the license and to re-check it about once a day. Without contact, a paid license keeps working for 7 days and a trial for 48 hours. Between the workstations and the server, only the local network is used.
2. Create the folders
Section titled “2. Create the folders”Create a project folder for CADVault, for example /srv/cadvault or /volume1/docker/cadvault,
with one empty folder inside it:
cadvault/├── compose.yaml (step 3)└── cadvault-data/ (databases, identity, license state and logs)Create cadvault-data yourself, before the first start. Some container apps, Synology’s among
them, refuse to start a container whose folder does not exist yet.
Keep cadvault-data on persistent storage and include it in your backups. Your CAD files stay
where they are: the container only reads them, through a read-only mount.
3. Fill in the compose file
Section titled “3. Fill in the compose file”Save this as compose.yaml in the project folder and fill in the four marked values.
services: cadvault: container_name: cadvault image: kamphuiscoding/cadvault:0 # Fetch the newest image on every build, so an update is one Build in a container app. pull_policy: always ports: - "5080:8080" volumes: - ./cadvault-data:/data # (1) Your CAD share, read-only. Left of the colon: the folder on this host. - /volume1/Engineering:/watch/engineering:ro environment: - ASPNETCORE_ENVIRONMENT=Production # (2) The administrator password for the server. Choose a long one. - CADVAULT_ADMIN_PASSWORD=change-me # (3) How workstations spell the share, mapped to the folder inside the container. - 'WATCH_ROOT_MAP=\\nas\Engineering=/watch/engineering' - WATCH_SCAN_INTERVAL_SECONDS=300 # (4) Optional: run as one of your host's accounts (see below). # - PUID=1030 # - PGID=100 restart: unless-stoppedThe port. 5080:8080 means host port 5080, container port 8080. Change only the left number
if 5080 is taken on your host; 8080 is where the server listens inside the container. Workstations
connect to http://<host>:5080, or the port you chose.
The CAD share (1) and its mapping (3). Mount the folder that holds your CAD files under
/watch/<name>, always with :ro. Then tell the watcher how your workstations spell that folder:
WATCH_ROOT_MAP maps the path a workstation uses to the folder inside the container. That path is
the one you will use for the Managed Root in the Viewer: the UNC path of the share for a team, or a
full local path such as D:\Engineering for a solo installation, never a mapped drive letter. Keep the single
quotes around the line so the backslashes stay as they are. Several shares are separated by ;.
The network. Leave the container on Docker’s default bridge network. Do not add
network_mode: host, and on a NAS leave options like “Use the same network as Docker Host” off.
The API and the watcher talk to each other on a port that must stay inside the container.
The password (2). This is the break-glass admin password, at least 6 characters. On a new
installation it is the only way into Settings → Admin in the Viewer, where you create the first
administrator. It keeps working after that, as a way back in when no administrator is available.
A changed password takes effect when the container is recreated (docker compose up -d); a plain
restart keeps the old settings. Because of pull_policy: always, recreating it also installs the
newest release.
The compose file holds this password, so make sure only administrators can read the project
folder. If you prefer, put it in a .env file next to the
compose file (CADVAULT_ADMIN_PASSWORD=...) and write
CADVAULT_ADMIN_PASSWORD=${CADVAULT_ADMIN_PASSWORD} in the compose file instead.
Which account the server runs as (4). By default the server runs as user and group 1654, an
account that exists only inside the container. That works, but folder rights on the host can then
only reach it through a rule for everyone. With PUID and PGID the server runs as an account of
your own host instead, so you grant rights to exactly that account:
PUIDis the user id andPGIDthe group id of that account. On a Linux shell,id <name>prints both (uid=1030(cadvault) gid=100(users)).- The account needs read and write access to
cadvault-data, and read access to the CAD share. - On the first start with these values, the server makes the account the owner of
cadvault-data. Leave both lines out to keep 1654. 0is refused: the server never runs as root.
4. Start and check
Section titled “4. Start and check”In the project folder:
docker compose up -dThe first start takes a little longer while the databases are created. Then check, from a workstation:
Invoke-RestMethod http://<host>:5080/api/v1/healthThe answer shows healthy, the version and Production. Your container app shows the container
as healthy once both the API and the watcher answer their health checks.
If the container keeps restarting, its log names the cause: an invalid PUID/PGID, a data
folder the server cannot write, or a missing admin password.
5. Connect the first workstation
Section titled “5. Connect the first workstation”The server is running but empty: no users, no license and no vault yet. You set all three up from the Viewer.
- Install CADVault on a workstation: see Workstation installer.
On a solo installation with Docker Desktop on the same PC, the Viewer finds the server at
http://localhost:5080by itself. Elsewhere you enterhttp://<host>:5080, or the port you chose. - Follow Set up your first vault: create your administrator account, activate a license or request the trial, and create the vault.
Updating
Section titled “Updating”Every 0.x release lands on the image tag kamphuiscoding/cadvault:0. In the project folder:
docker compose pull && docker compose up -dYour data stays in cadvault-data. During the restart the server is unavailable for about half a
minute, so pick a quiet moment. The Viewer tells an administrator when the server runs behind the
latest release, under Settings → Admin → Server updates.
Backups before an update
Section titled “Backups before an update”Before the server updates the database of a vault, or the user database, it writes a copy of it
to cadvault-data/backups (the user database to cadvault-data/backups/_identity). The file name
holds the vault name and the moment of the backup in UTC, for example
Engineering-20260915195203_AddDocumentSourceMetadataPending-20261017T093127Z.db. The newest three
per database are kept. A release that does not change the databases makes no backup.
If a backup or an update fails, the server does not open that vault and leaves it as it was. The container then shows as unhealthy, and Settings → Admin → Server updates names the vault and the reason.
Going back to the previous version
Section titled “Going back to the previous version”If a new release causes trouble, you can go back to the version you had, with your data as it was just before the update. Anything changed in CADVault after the update is lost, so go back soon after you notice the problem.
- Close CADVault on every workstation. A Viewer that stays open keeps showing what it read before, and saving from there would write it back over the restored data.
- Stop the server:
docker compose downin the project folder. - Put the backups back. Use only the backups this update made: the time at the end of the
file name, in UTC, matches the moment you updated. An older backup belongs to an earlier update,
and putting it back would throw away everything changed since then. For each vault with a backup
of that moment in
cadvault-data/backups, copy it overcadvault-data/<vault>.db. A vault without one was not changed by the update: leave its file as it is. Do the same for the user database, with a backup of that moment incadvault-data/backups/_identityovercadvault-data/_identity/identity.db. Next to every database you replace, delete the.db-waland.db-shmfiles with the same name if they are there: left behind, they can damage the restored database. Leavecadvault-data/_licenseas it is. - Start the previous version. In
compose.yaml, change the image line to the version you had, for exampleimage: kamphuiscoding/cadvault:<previous version>, and rundocker compose up -d. - Open CADVault again and check under Settings → Admin → Server updates that the server runs the previous version.
Never skip step 3 for a database the update changed: an older server does not know what the update
changed, so it refuses to open that vault and names it under Settings → Admin → Server updates.
When you are ready to update again, put the image line back on kamphuiscoding/cadvault:0.
Automatic updates (optional)
Section titled “Automatic updates (optional)”The standard compose file never updates by itself: a new release can migrate the databases on
start, and you choose when that happens. If you prefer hands-off updates and a restart at night is
acceptable, add Watchtower. Save this next to compose.yaml as compose.watchtower.yaml:
services: cadvault: labels: - "com.centurylinklabs.watchtower.scope=cadvault"
watchtower: container_name: cadvault-watchtower image: containrrr/watchtower:latest volumes: - /var/run/docker.sock:/var/run/docker.sock labels: - "com.centurylinklabs.watchtower.scope=cadvault" command: --scope cadvault --schedule "0 0 3 * * *" --cleanup restart: unless-stoppedStart both files together:
docker compose -f compose.yaml -f compose.watchtower.yaml up -dEvery night at 03:00 Watchtower checks kamphuiscoding/cadvault:0. Only when a new image is there
does it recreate the CADVault container, and it then removes the old image. Your data stays in
cadvault-data. The scope label keeps Watchtower away from every other container on the host.
Synology NAS
Section titled “Synology NAS”Tested on DSM 7.3 with Container Manager. Follow steps 1 to 5 above, with these differences.
Before you start
-
Check the port. Port 5000 belongs to DSM itself, which is why CADVault uses 5080. Open Control Panel > Info Center > Service and check that no service lists 5080 under Local Port.
-
Create a DSM user for CADVault in Control Panel > User & Group > Create:
- Name:
cadvault. Give it a long random password; nobody ever logs in with it. - Group: only
users. - Shared folder permissions: No access everywhere for now. You give it exactly the rights it needs in step 4.
- Application permissions: Deny for every application.
- Name:
-
Look up the user’s two numbers. The compose file needs the user id and group id of
cadvault, and DSM does not show them anywhere in its screens. You read them once, through a short SSH session from a Windows PC. This takes about five minutes, and you only type one command on the NAS.-
In DSM, open Control Panel > Terminal & SNMP, tick Enable SSH service, leave the port on 22 and choose Apply.
-
On a Windows PC on the same network, open the Start menu, type
PowerShelland open Windows PowerShell. SSH is built into Windows 10 and 11; you install nothing. -
Type the line below, with the name of your own DSM administrator account and the address of your NAS (the one you use to open DSM in the browser, without
http://and without the port), and press Enter:Terminal window ssh your-admin-name@192.168.1.20 -
The first time, Windows asks Are you sure you want to continue connecting? Type
yesand press Enter. This only happens once per NAS. -
Type the password of that DSM administrator account and press Enter. Nothing appears while you type, not even dots. That is normal. If the password was wrong, it simply asks again.
-
You now see a prompt that ends in
$. Type this and press Enter:Terminal window id cadvaultThe answer looks like
uid=1030(cadvault) gid=100(users) groups=100(users). Write down the number afteruid=(here1030) and the number aftergid=(here100). These are yourPUIDandPGID. -
Type
exitand press Enter, then close PowerShell. -
Back in Control Panel > Terminal & SNMP, untick Enable SSH service and choose Apply.
If the
sshline answers Connection refused or timed out, SSH is not enabled yet or the address is wrong: check sub-step 1 and the address. If it answers Permission denied, the account is not a DSM administrator; only administrators may log in over SSH. Ifid cadvaultanswers no such user, check the spelling of the user from step 2. -
-
Give that user its rights, and no one else:
- On the CAD share: Control Panel > Shared Folder > (your share) > Edit > Permissions, read
only for
cadvault. - Create the project folder
docker/cadvaultand, inside it,cadvault-datain File Station. Oncadvault-data: read and write forcadvault. - On
docker/cadvault: open Properties > Permission, make the inherited rules explicit and remove Everyone. Thedockershare can give Everyone read access, and this folder holds the compose file with the admin password. Administrators keep access, which is all Container Manager needs.
- On the CAD share: Control Panel > Shared Folder > (your share) > Edit > Permissions, read
only for
Creating the project
- In Container Manager, open Project > Create. Name it
cadvault, choose the path/volume1/docker/cadvault, and as source Create docker-compose.yml. - Paste the compose file from step 3 with all four values filled in, including
PUIDandPGID. Mount the share by its full path, for example"/volume1/Engineering:/watch/engineering:ro"; use double quotes if the folder name has a space. - Finish the wizard. Container Manager downloads the image and starts the container.
Changing or updating later
- After any change to the compose file: Stop, then Build. “Save changes only” followed by Start keeps the old container with its old settings.
- Saving the compose file under Project > (your project) > YAML Configurations builds the project right away.
- To update to a new release: Stop, then Build. Because of
pull_policy: alwaysin the compose file, Build downloads the newestkamphuiscoding/cadvault:0and recreates the container; the data stays. - Installed before this line was in the compose file? Add
pull_policy: alwaysunder theimage:line in YAML Configurations and save. Without it, Build keeps the image it already has. Until you add it, update by deleting the CADVault image on the Image tab first, then choose Build. - To go back to the previous version (see
Going back to the previous version for what it does):
-
Close CADVault on every workstation. In Container Manager, open Project, select the project and choose Stop.
-
In File Station, open
docker/cadvault/cadvault-data/backups. Use only the backups whose time at the end of the name (UTC) matches the moment you updated; older files belong to an earlier update. A vault without such a backup stays as it is. For each vault with one:- In
cadvault-data, delete<vault>.db, and<vault>.db-waland<vault>.db-shmif they are there. - Right-click the backup, choose Copy to, and pick
cadvault-data. - In
cadvault-data, right-click the copy, choose Rename and name it<vault>.db.
If
backups/_identityholds a backup of the same moment, do the same for the user database incadvault-data/_identity: deleteidentity.db,identity.db-walandidentity.db-shm, copy the backup there and rename it toidentity.db. - In
-
Open Project > (your project) > YAML Configurations, change the image line to the version you had, for example
image: kamphuiscoding/cadvault:<previous version>, and choose Save. Saving builds and starts the project, which is why the backups go back first. -
Open CADVault on the workstations again.
-
- If Container Manager afterwards shows the container under a temporary name like
1a2b3c4d_cadvaultand its buttons fail with “Container undefined does not exist”, restart Container Manager: Package Center > Container Manager > Stop, then Run.