Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Merge branch 'selfhost/caddy-own-network' into feat/server-installer

milind-sonid0dd19c4ea81
diff --cc apps/docs/content/docs/self-hosting/deploy-vps.mdx
index 1ddc7c84fc,05c85cdda5..6b05d2a366
--- a/apps/docs/content/docs/self-hosting/deploy-vps.mdx
+++ b/apps/docs/content/docs/self-hosting/deploy-vps.mdx
@@@ -365,8 -290,7 +365,8 @@@ same release without an npm install pro
Check that installation succeeded before starting. A service restart by itself
does not update the installed package. For foreground `npx` usage, specify the
desired release as `npx --yes [email protected] serve --tunnel`.
+- **Installed with the installer:** run the install command again.
- - **Path B:** `cd OpenMausBot/deploy && docker compose pull omb && docker compose up -d`.
+ - **Path B:** `cd OpenMausBot/deploy && git pull && docker compose pull omb && docker compose up -d`. The `git pull` brings the current `docker-compose.yml` and `Caddyfile`. Building from source instead (`docker compose up -d --build`) needs about 6 GB of memory: on a smaller server, add swap first or use the published image.
Routines and queued work survive a restart; a turn running at that moment does not, so update between runs.
@@@ -393,29 -317,33 +393,42 @@@ any configured home/data-directory over
directory. These are not included in the command above.
For path B, the whole `/data` volume includes the container's CLI homes. From
- `OpenMausBot/deploy`, stop the app before archiving; `deploy_data` is the default
- volume name, so use your actual volume name if you changed the Compose project:
+ `OpenMausBot/deploy`, stop the whole project before archiving, and start it
+ again after; `deploy_data` is the default volume name, so use your actual
+ volume name if you changed the Compose project:
```sh
- docker compose stop omb
+ docker compose stop
backup_dir=$(mktemp -d "$PWD/openmausbot-backup.XXXXXX")
docker run --rm -v deploy_data:/data:ro -v "$backup_dir":/b alpine sh -c 'umask 077; tar czf /b/openmausbot-data.tgz -C /data .'
+ docker compose start
+ ```
+
+ To restore that archive, with the project stopped, replace what is in the
+ volume with it (`openmausbot-backup.XXXXXX` is the folder the backup made):
+
+ ```sh
+ docker compose stop
+ docker run --rm -v deploy_data:/data -v "$PWD/openmausbot-backup.XXXXXX":/b:ro alpine sh -c 'find /data -mindepth 1 -delete && tar xzpf /b/openmausbot-data.tgz -C /data'
+ docker compose start
```
+With the installer, the data is a folder, not a volume. Archive it the same way:
+
+```sh
+cd /opt/openmausbot && sudo docker compose stop omb
+backup_dir=$(mktemp -d "$PWD/openmausbot-backup.XXXXXX")
+sudo tar czf "$backup_dir/openmausbot-data.tgz" -C /opt/openmausbot data
+sudo docker compose start omb
+```
+
- Each command creates a fresh private folder in the current directory, so it
+ Each backup creates a fresh private folder in the current directory, so it
cannot overwrite an older archive with more permissive access. Keep the
- archive inside that folder privately on another machine. Restore with the server stopped,
- using the same paths and original ownership. After backup or restore, start the
- service with `sudo systemctl start openmausbot`, or `docker compose start omb`.
+ archive inside that folder privately on another machine. Restore paths A and C
+ with the server stopped, using the same paths and original ownership. After
+ backup or restore, start the service with `sudo systemctl start openmausbot`.
+ Stop and start the Docker project as a whole, as above, rather than `omb` on
+ its own.
## The rules the setup relies on
diff --cc docs/deploy-vps.md
index f136205e49,1452d470e8..951de9ab53
--- a/docs/deploy-vps.md
+++ b/docs/deploy-vps.md
@@@ -345,8 -270,7 +345,8 @@@ same release without an npm install pro
Check that installation succeeded before starting. A service restart by itself
does not update the installed package. For foreground `npx` usage, specify the
desired release as `npx --yes [email protected] serve --tunnel`.
+- **Installed with the installer:** run the install command again.
- - **Path B:** `cd OpenMausBot/deploy && docker compose pull omb && docker compose up -d`.
+ - **Path B:** `cd OpenMausBot/deploy && git pull && docker compose pull omb && docker compose up -d`. The `git pull` brings the current `docker-compose.yml` and `Caddyfile`. Building from source instead (`docker compose up -d --build`) needs about 6 GB of memory: on a smaller server, add swap first or use the published image.
Routines and queued work survive a restart. A teammate turn running at that moment runs again once at the next start, told to check what it already did, and the bot that asked for it is told. A person's own turn and a running routine are not run again: the conversation says it was interrupted. Update between runs where you can.
@@@ -373,29 -297,33 +373,42 @@@ any configured home/data-directory over
directory. These are not included in the command above.
For path B, the whole `/data` volume includes the container's CLI homes. From
- `OpenMausBot/deploy`, stop the app before archiving; `deploy_data` is the default
- volume name, so use your actual volume name if you changed the Compose project:
+ `OpenMausBot/deploy`, stop the whole project before archiving, and start it
+ again after; `deploy_data` is the default volume name, so use your actual
+ volume name if you changed the Compose project:
```sh
- docker compose stop omb
+ docker compose stop
backup_dir=$(mktemp -d "$PWD/openmausbot-backup.XXXXXX")
docker run --rm -v deploy_data:/data:ro -v "$backup_dir":/b alpine sh -c 'umask 077; tar czf /b/openmausbot-data.tgz -C /data .'
+ docker compose start
+ ```
+
+ To restore that archive, with the project stopped, replace what is in the
+ volume with it (`openmausbot-backup.XXXXXX` is the folder the backup made):
+
+ ```sh
+ docker compose stop
+ docker run --rm -v deploy_data:/data -v "$PWD/openmausbot-backup.XXXXXX":/b:ro alpine sh -c 'find /data -mindepth 1 -delete && tar xzpf /b/openmausbot-data.tgz -C /data'
+ docker compose start
```
+With the installer, the data is a folder, not a volume. Archive it the same way:
+
+```sh
+cd /opt/openmausbot && sudo docker compose stop omb
+backup_dir=$(mktemp -d "$PWD/openmausbot-backup.XXXXXX")
+sudo tar czf "$backup_dir/openmausbot-data.tgz" -C /opt/openmausbot data
+sudo docker compose start omb
+```
+
- Each command creates a fresh private folder in the current directory, so it
+ Each backup creates a fresh private folder in the current directory, so it
cannot overwrite an older archive with more permissive access. Keep the
- archive inside that folder privately on another machine. Restore with the server stopped,
- using the same paths and original ownership. After backup or restore, start the
- service with `sudo systemctl start openmausbot`, or `docker compose start omb`.
+ archive inside that folder privately on another machine. Restore paths A and C
+ with the server stopped, using the same paths and original ownership. After
+ backup or restore, start the service with `sudo systemctl start openmausbot`.
+ Stop and start the Docker project as a whole, as above, rather than `omb` on
+ its own.
## The rules the setup relies on