Day to day
In short. After the setup, you run the app with one task deploy:... command for each
job: install a release, go back to the previous one, read the logs, change a setting, back
up and restore. This page also turns on Telegram notifications. Look up the job you need.
Before you run a command
-
Type each
task deploy:...command on your computer, in the repository folder, in the terminal. On Windows, use Git Bash. - Each command asks for the security key’s PIN and a touch, or for the key’s passphrase.
-
The server runs one command at a time. A second command while one runs stops with
sesamectl: another sesamectl run is in progress. Wait, then try again. -
The commands use the newest
release-*tag on your computer. If you work in a new copy of the repository, get the tags first:
Commands
Install a new release
- Sign and push a new release tag, as in Prepare the server, step 8, item 3.
-
On your computer, install it:
The server checks the tag’s signature and builds the app. If the app runs, the server then backs up the database, before it starts the new release. You can then go back to the data from before the update. The command ends with:
deploy/sesamectl in <tag> differs from /usr/local/sbin/sesamectl, follow
Updating the server scripts.
Go back to the previous release
On your computer:sesamectl: rolling back from <tag> to <previous tag>. The command swaps the current
release and the previous release. Run it a second time to return to the newer release.
To go back to an older release that is still on the server, name its tag:
is newer than the and a number of
known migrations. In that case, restore the backup that the update took
(Restore a backup). Changes made after the update are lost.
See which release runs
On your computer:SESAME_IMAGE_TAG=<tag> (the release that runs), SESAME_PREVIOUS_IMAGE_TAG=<tag>
(the release a rollback goes to) and the state of the two containers.
Read the logs
On your computer, read the app’s last 300 log lines:Change a setting
-
On the server, open the settings file:
- Change the line, then save and close the file. Each setting is explained in configuration.md.
-
On your computer, restart the app with the new values:
The command ends with a list of the two containers. If it stops with an error, see The deploy stops and the app does not start.
Turn trading off
Do this to stop all real orders at once, for example when something looks wrong.- In the app, press Cancel all.
-
On the server, open the settings file:
-
Change the
LIVE_TRADINGline to: -
On your computer, restart the app:
LIVE_TRADING=true and run
task deploy:start. If a key may be exposed, follow the
incident runbook as well.
Back up now
On your computer:sesame-20261001T040000Z.db. It also
encrypts the backup for the backup machine.
Restore a backup
A restore replaces the app’s data with a backup. The app stops while the restore runs. CAUTION: Cancel your open orders first if they matter. The app cannot act on them while it is stopped.-
On your computer, take a backup, so you can undo the restore:
-
List the backups on the server:
Each backup is a
sesame-<time>.dbfile, with a.macfile beside it. The time is UTC. -
Restore the backup you want:
-
The command asks
restore <file name> over the database on <your-domain>? sesame stops meanwhile [y/N]. Typeyand press Enter. -
Read the result. It shows
MAC verified; audit chain continues into the current database'sandknown-device cookies revoked. The command ends with a list of the two containers. - Log in again. A restore logs out every browser.
- Check the data.
sesame.pre-restore-<time>.db.
The app refuses a backup that was changed or damaged, or that was written with another
session secret. If a restore fails, the app stays stopped. The output says if the data
changed. Start the app again:
Free disk space
Each release stays on the server after you install the next one. On the server, delete a release you no longer need:task deploy:status shows both tags.
Telegram notifications
Telegram sends the app’s notifications to your phone. This is optional.- Create a bot and get your chat id. Follow steps 1 and 2 of the Telegram runbook.
-
On the server, open the settings file:
-
Add both lines, with your values:
-
On your computer, restart the app:
sesame.env. Do not paste it into a chat,
a ticket or an agent session.
Is it working?
If the app shows
Not sent · Telegram refused the message, see
the Telegram runbook.
To choose which notifications go to Telegram, see
Choose where notifications go.
Previous: 4. Go live · Next: Troubleshooting