Vega SillyTavern cutover: final sync and native service start #3

Closed
opened 2026-07-01 12:30:33 +01:00 by nimmo · 0 comments
Owner

Goal

Perform the actual cutover from the legacy Docker stack to the native NixOS SillyTavern service on vega.

This issue is intended to be self-contained and executable without referring to a local project note.

Acceptance Checklist

  • Stop the legacy Docker stack in /srv/stacks/sillytavern so the final sync runs against quiescent data.
  • Create a rollback archive snapshot under /srv/stacks-archive/sillytavern-pre-native.
  • Run the final rsync --delete syncs for data, extensions, and plugins into /var/lib/SillyTavern.
  • Copy /srv/stacks/sillytavern/config/config.yaml into /var/lib/SillyTavern/config-source.yaml with sillytavern:sillytavern ownership and mode 0640.
  • Unmask sillytavern.service.
  • Start sillytavern.service.
  • Confirm the native service still comes up under the intended newt.service ordering and requirement relationship.

Procedure

Stop the legacy stack so the archive and final native sync are quiescent:

cd /srv/stacks/sillytavern
docker compose down

Create the rollback snapshot without changing ownership, then perform final syncs into native state. --delete should make the pre-staged directories exactly match the stopped source.

sudo rsync -aHAX --delete --info=progress2 \
  /srv/stacks/sillytavern/ \
  /srv/stacks-archive/sillytavern-pre-native/
sudo rsync -aHAX --delete --chown=sillytavern:sillytavern --info=progress2 \
  /srv/stacks/sillytavern/data/ \
  /var/lib/SillyTavern/data/
sudo rsync -aHAX --delete --chown=sillytavern:sillytavern --info=progress2 \
  /srv/stacks/sillytavern/extensions/ \
  /var/lib/SillyTavern/extensions/
sudo rsync -aHAX --delete --chown=sillytavern:sillytavern --info=progress2 \
  /srv/stacks/sillytavern/plugins/ \
  /var/lib/SillyTavern/plugins/

Copy the legacy config to the mutable source configured by nixosConfig.sillytavern.configFile:

sudo install -o sillytavern -g sillytavern -m 0640 \
  /srv/stacks/sillytavern/config/config.yaml \
  /var/lib/SillyTavern/config-source.yaml

During activation, the upstream NixOS module manages /var/lib/SillyTavern/config.yaml as a symlink to this file. Do not replace that managed symlink directly.

Remove the temporary migration mask and start SillyTavern:

sudo systemctl unmask sillytavern.service
sudo systemctl start sillytavern.service

The explicit start is only part of this one-time masked migration. On subsequent boots, both services should start automatically, and sillytavern.service should be ordered after and require newt.service.

Notes

  • Do not replace the managed /var/lib/SillyTavern/config.yaml symlink directly.
  • This phase should still leave rollback to the legacy Docker stack straightforward if validation fails in the next phase.
  • Do not retire the legacy stack directory yet.
## Goal Perform the actual cutover from the legacy Docker stack to the native NixOS SillyTavern service on `vega`. This issue is intended to be self-contained and executable without referring to a local project note. ## Acceptance Checklist - Stop the legacy Docker stack in `/srv/stacks/sillytavern` so the final sync runs against quiescent data. - Create a rollback archive snapshot under `/srv/stacks-archive/sillytavern-pre-native`. - Run the final `rsync --delete` syncs for `data`, `extensions`, and `plugins` into `/var/lib/SillyTavern`. - Copy `/srv/stacks/sillytavern/config/config.yaml` into `/var/lib/SillyTavern/config-source.yaml` with `sillytavern:sillytavern` ownership and mode `0640`. - Unmask `sillytavern.service`. - Start `sillytavern.service`. - Confirm the native service still comes up under the intended `newt.service` ordering and requirement relationship. ## Procedure Stop the legacy stack so the archive and final native sync are quiescent: ```bash cd /srv/stacks/sillytavern docker compose down ``` Create the rollback snapshot without changing ownership, then perform final syncs into native state. `--delete` should make the pre-staged directories exactly match the stopped source. ```bash sudo rsync -aHAX --delete --info=progress2 \ /srv/stacks/sillytavern/ \ /srv/stacks-archive/sillytavern-pre-native/ sudo rsync -aHAX --delete --chown=sillytavern:sillytavern --info=progress2 \ /srv/stacks/sillytavern/data/ \ /var/lib/SillyTavern/data/ sudo rsync -aHAX --delete --chown=sillytavern:sillytavern --info=progress2 \ /srv/stacks/sillytavern/extensions/ \ /var/lib/SillyTavern/extensions/ sudo rsync -aHAX --delete --chown=sillytavern:sillytavern --info=progress2 \ /srv/stacks/sillytavern/plugins/ \ /var/lib/SillyTavern/plugins/ ``` Copy the legacy config to the mutable source configured by `nixosConfig.sillytavern.configFile`: ```bash sudo install -o sillytavern -g sillytavern -m 0640 \ /srv/stacks/sillytavern/config/config.yaml \ /var/lib/SillyTavern/config-source.yaml ``` During activation, the upstream NixOS module manages `/var/lib/SillyTavern/config.yaml` as a symlink to this file. Do not replace that managed symlink directly. Remove the temporary migration mask and start SillyTavern: ```bash sudo systemctl unmask sillytavern.service sudo systemctl start sillytavern.service ``` The explicit start is only part of this one-time masked migration. On subsequent boots, both services should start automatically, and `sillytavern.service` should be ordered after and require `newt.service`. ## Notes - Do not replace the managed `/var/lib/SillyTavern/config.yaml` symlink directly. - This phase should still leave rollback to the legacy Docker stack straightforward if validation fails in the next phase. - Do not retire the legacy stack directory yet.
nimmo added this to the (deleted) project 2026-07-01 15:51:54 +01:00
nimmo closed this issue 2026-07-11 10:03:46 +01:00
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/nixos-config#3
No description provided.