# Migrating your Debian 13 status VPS

1. **Deploy ArchForge Website 11.3.7 first**. Verify `git ls-remote https://archforge.nl/archadmin/archforge-external-status.archforge HEAD` succeeds (PAT if repo is private).
2. Publish the External Status **1.0.7 FULL/UPDATE** to your existing ArchForge repository (do not upload `.env`, SQLite, or secrets).
3. With the repository checkout's original non-root owner, `cd ~/archforge-external-status && git pull --ff-only` while old transport is temporarily permitted on the website (if needed).
4. Run `bash ./migrate-archforge-remote.sh` from that checkout. It first verifies the new URL with `git ls-remote`, then changes **only** `remote.origin.url`.
5. If the ArchForge HTTPS monitor is configured, execute `sudo bash ./migrate-archforge-remote.sh --env-only` to update `/etc/archforge-status/status.env` with a timestamped backup; the service restarts. If you are logged in as root you may run the whole script once.
6. Deploy the new app from your checkout as usual: `./update.sh` as the regular ArchForge owner (or `sudo bash scripts/deploy.sh "$PWD"` in a root-owned checkout, after reviewing code).
7. Disable the temporary website `ARCHFORGE_LEGACY_GIT_URLS` flag. Future ArchForge pulls now use `.archforge`.

Do not run `install.sh` again, delete `.git`, rename the bare repositories or move the SQLite DB.
