Prepare and configure the gateway
- Use a Linux cloud host running Docker Engine with
/dev/fuseand a backing filesystem such as ext4. From the packageddocker/directory, runsudo ./setup-host-mount.sh. On distributions other than Debian and Ubuntu, install the FUSE packages required by the script first. - Use the prepared host paths
/srv/koonj/backingand/srv/koonj/shareor override them in the script and Compose environment. For packaged Docker, setKOONJ_DATA_MOUNTandKOONJ_FUSE_BACKING_DIRto the same host backing directory. SetKOONJ_FUSE_MOUNT_POINTto the prepared share and keepKOONJ_FUSE_ALLOW_OTHER=truefor Samba and local users. - Give the API write access to the backing directory. In the packaged Docker stack, register
/mnt/koonjas the mounted Koonj source. - In Keycloak, copy the confidential
koonj-agentclient secret from Clients → koonj-agent → Credentials intoKOONJ_AGENT_CLIENT_SECRETin.env. The service account needsKOONJ_OPERATORand thekoonj-servertoken audience. For a project-specific mount, setKOONJ_AGENT_PROJECT_IDand include that project in the server’sKOONJ_PROJECTS_AGENT_IDSallowlist. The gateway otherwise uses Default project.
Connect over SMB
SetKOONJ_SMB_PASSWORD for the share account koonj and KOONJ_SMB_BIND to the host’s private network address. The default SMB port is 445.
Sign in with the Samba share credentials. The gateway uses its own Keycloak service account for recall.
Verify with a disposable file
- Create a test file in the backing directory and record its SHA-256 checksum.
- Archive it to an S3 target with Purge and
STANDARD. Wait for the job to complete and confirm the backing path is a symbolic link. - Open the test file through the gateway mount or SMB share. The backing path should become a regular file and its SHA-256 checksum should match the original.
- If a device recalls files while browsing, disable thumbnail previews or indexing for the share. These features can read file contents in the background.
docker compose logs koonj-fuse for the estimate and try again when the object is ready. The archive connection needs s3:RestoreObject in addition to read access.