Moving the bundled Nextcloud
Earlier releases ran a Nextcloud inside the istota stack: the nextcloud, postgres, redis and init-shared services in docker/docker-compose.yml, provisioned at first install by provision-nc.sh. The compose file no longer runs them. The stack ships no Nextcloud; istota either stores its workspace locally or connects to a Nextcloud you run yourself.
An install whose config.toml still names http://nextcloud is refused at boot when no such host resolves. The log names the two ways forward:
- Keep the Nextcloud. Move it, unchanged, into a compose project of its own, and run istota in full Nextcloud integration against it. Talk rooms, OAuth logins and every file stay where they are.
- Switch to local storage. Copy the workspace into the state directory and drop Nextcloud. Simpler, for an install that does not use Talk or Nextcloud's file access.
Both start with the stack stopped: istota-stack down on the VM, or docker compose down in the old docker/ directory for an install still started from there. Do not pass --volumes to it; the volumes are the data.
Keep the Nextcloud in a project of its own
The old services used five named volumes, prefixed with the old compose project name (istota_ if .env set COMPOSE_PROJECT_NAME=istota, otherwise the directory name, often docker_): nextcloud_html, nextcloud_data, shared_files, postgres_data and redis_data. The new project reuses them as external volumes, so nothing is copied and both files_external mounts provision-nc.sh created (the bot's Shared Files over the shared volume, and the user's view of their bot folder) keep working.
-
Make a directory for it, for example
/srv/nextcloud, and write acompose.ymlwith the old service definitions. Take them from the release you are running (git show <tag>:docker/docker-compose.yml), drop theistota,web,webhooks,browserandwhatsapp-baileysservices, and declare the five volumes as external under their existing names:volumes:nextcloud_html:external: truename: istota_nextcloud_htmlnextcloud_data:external: truename: istota_nextcloud_datashared_files:external: truename: istota_shared_filespostgres_data:external: truename: istota_postgres_dataredis_data:external: truename: istota_redis_dataCopy the Nextcloud passwords (
ADMIN_PASSWORD,POSTGRES_PASSWORD,BOT_PASSWORDand the rest) from the old.envinto this project's.env. Nextcloud now needs a front end of its own: publish its port, or put it behind your reverse proxy, and setOVERWRITEHOST,OVERWRITEPROTOCOLandNEXTCLOUD_TRUSTED_DOMAINSto the name browsers will use for it. -
Start it (
docker compose up -din/srv/nextcloud) and check you can log in. -
On the istota VM, give
mount-nextcloud.serviceits remote. Write/srv/app/istota/rclone.conf(mode 0600, owned by uid 10001) with a WebDAV remote at the bot user's files root, using the app password istota already uses, and an alias over it rooted atShared Files, not at the bot's whole tree:[nextcloud-root]type = webdavurl = https://cloud.example.com/remote.php/dav/files/<bot user>/vendor = nextclouduser = <bot user>pass = <the app password, as `rclone obscure` prints it>[nextcloud]type = aliasremote = nextcloud-root:Shared FilesSet
STORAGE=nextcloudandRCLONE_REMOTE=nextcloudin/srv/app/istota/host.envand run/srv/app/istota/src/host/provision.sh, which installs the unit and mounts the folder at/srv/mount/nextcloud/content. Compose binds it into the containers at/mnt/shared, which is where the workspace was before. No stored path changes, and nothing needs rebasing. -
Edit
/srv/app/istota/config/config.toml(/data/config/config.tomlinside the containers):workspace_mount_path = "/mnt/shared"workspace_path = "/mnt/shared"[nextcloud]url = "https://cloud.example.com" # the moved Nextcloud, as istota reaches itdav_prefix = "Shared Files"auto_share_bot_dir = falsedav_prefixandauto_share_bot_dirare the values the old compose file set; keep them. The OAuth2 client's endpoints under[web](oauth2_provider,oauth2_token_endpoint,oauth2_userinfo_endpoint) namedhttp://nextcloudand the old front end; point them at the moved Nextcloud too. The client itself, its redirect URI and every Talk room token are stored in Nextcloud's database and survive the move, since only the URL changed. If the redirect URI named the old stack's address and that address changes, update it in Nextcloud's OAuth2 admin settings. -
Start the istota stack with
istota-stack up. The entrypoint checks that/mnt/sharedis the rclone mount before the daemon starts; if the mount is not up it refuses and compose retries.
Switch to local storage
-
Copy the workspace into the state directory,
/srv/app/istota/data. With the old project nameistota:docker run --rm -v istota_shared_files:/from:ro -v /srv/app/istota/data:/data alpine \sh -c 'mkdir -p /data/workspace && cp -a /from/. /data/workspace/ && rm -f /data/.ownership-10001'Removing
/data/.ownership-10001makes the next boot hand the copied files to the daemon's uid, which it does once. -
Edit
/srv/app/istota/config/config.toml(/data/config/config.tomlinside the containers): remove the[nextcloud]table and anyworkspace_mount_path(or its old name,nextcloud_mount_path), setworkspace_path = "/data/workspace", set[talk] enabled = false, and if users logged in through Nextcloud, switch[web] authto["email"]and give each user an email identity first (see email login). -
Check that
STORAGEin/srv/app/istota/host.envislocal, then start the stack withistota-stack up. The Nextcloud volumes are now unused; keep them until you are sure, then remove them by hand.
Talk rooms do not survive this path: there is no Talk without Nextcloud. Web chat rooms do.