World Backup to Git is a free, open-source server tool for Foundry VTT, still a work in progress.
A world folder holds months of prep: scenes, journals, actors, uploaded maps. A bad update, a broken module or one wrong click can ruin it, and Foundry keeps no history you can go back to.
World Backup to Git is a small service that runs next to your Foundry server and saves every world to its own private GitHub repository on a schedule. Each backup is a commit, so the full history of every world is kept, and any earlier state can be restored.
For self-hosted Foundry only. The service is installed on the same machine as Foundry, so you need SSH (Linux) or RDP (Windows) access to that server to set it up. That rules out hosted services like The Forge, where you can't install anything on the server.
What it does
- Backs up every world on a schedule, daily at 04:00 by default, or right away with Back up now.
- Gives each world its own private GitHub repository, created for you the first time it is backed up.
- Only makes a commit when something changed, so the history stays readable.
- Sends you an e-mail when a backup fails (GitHub refuses the token, a push is rejected, the folder can't be read), and another one when that world backs up fine again.
- Can keep itself up to date from its own releases.
The administration page
A password-protected page on the server lists every world with whether it is backed up, when it was last backed up and how big its folder is. Each world has its own settings: on or off, the repository name, its own schedule and what to do while the world is running in Foundry. The page also holds the global schedule, the GitHub token, the e-mail settings and the admin password.
Restoring a world
Stop the world, clone its repository into the worlds folder in place of the broken one, and start it again. To go back further than the latest backup, check out an older commit first. The service keeps backing the restored world up as before.
Where it runs
- Linux, for example a Raspberry Pi, as a systemd service.
- Windows, as a scheduled task.
Both use one install script. It needs Node.js 18 or newer and downloads Node.js 22 if none is installed, plus git and a GitHub token that is allowed to create and push to private repositories.
Status
Work in progress and not public yet. The source and the first public release will be published here when it is ready.
Features
- Create the GitHub Token: The service pushes to, and creates, repositories with a GitHub token stored on the Foundry machine, so make it as narrow as possible.
- Install on Linux: Runs as a systemd service on Linux, e.g.
- Install on Windows: Run foundry-world-backup-X.Y.Z-setup.exe from the latest release.
- Admin Page: Open https://<host>:8484/ (plain http:// on that port is redirected) and log in with the admin password.
- Trusting the Certificate: Browsers save no passwords on a page whose certificate they do not trust (Chrome and Edge turn their password manager off after a certificate warning).
- How a Backup Works: With github.releases on, the commit also holds .github/workflows/release-world.yml, put into git's index only (marked skip-worktree so git add -A keeps it); the world folder never gets the file.
- Restoring a World: The repository holds the world folder as it was at each backup.
- Installable World Backups: Every backup can also become a release that Foundry installs with Install World.
- Notifications and Daily Check: The recipients and the SMTP server (host, port, STARTTLS / TLS / none, user, password, sender) are entered by the installer or on the admin page's Notifications page, and stored in admin.json.
- Automatic Updates: Off unless asked for: --auto-update / the wizard's checkbox / --enable-auto-update (see Install on Linux and Install on Windows).
- Configuration Reference: config.json (path from CONFIG_FILE, default ./config.json; see config.example.json) holds the schedule and the per-world settings and is written by the Admin Page:
- Admin Page on a Public Address: The page is served on ADMIN_HOST (all addresses) with a self-signed certificate for this machine's names and addresses.
- Admin API: The admin page's JSON API lives under /admin/api/...
Documentation
The full World Backup to Git guide: overview, Troubleshooting.