Skip to main content

Command menu

Jump to a page or search the catalog

AI Tools & Scripts

Redeploy a Live Trading Bot Safely (PM2, Go)

A redeploy runbook for a live trading service under PM2: catch new required env vars before boot, confirm the account is flat, back up the binary, restart by the real process name, prove the new build is live, roll back fast.

$7.00

What you get: 1 file · 12.14 KB · ZIP

See purchase options

Product description

A careful, repeatable procedure for shipping a new build of a running crypto trading service without an outage or a double-trade. It is written for Go services run under PM2 on a Linux host, and the checks carry over to similar stacks.

What is inside: - SKILL.md - the full procedure: diff the new code's required environment variables against the host's env file so nothing panics at boot, confirm the account is flat before restarting, back up the current binary, build and test on the host, restart by the real process name (not by a guess), and verify with a marker that only the new build prints. It also covers rollback and the control-plane case (HTTP API, Postgres migrations, static admin panel). - references/service-types.md - how the procedure changes per service type, and how to prune old rollback copies while keeping a ledger of which build ran when. - scripts/binary_identity.sh - reads the running binary from the process table and prints its start time, sha256, build settings and module graph, so "is commit X live" is answered from the binary, not from memory. - scripts/par_upload.sh - uploads a binary to several hosts in parallel with a per-host exit line. - scripts/swap_binary.sh - moves the live binary aside, installs the new one, checks the hash.

Who it is for: solo operators and small teams who deploy their own trading services and have been bitten by a missing env var, a half-updated library or a restart in the middle of a position. Needs SSH access, bash and, for Go, a toolchain. Nothing here places trades. Also included in the Crypto Trading Ops Playbooks pack at a lower per-skill price.

Example request

Deploy the latest main of my trader to the staging host. Check env changes first, make sure no position is open, and prove the new build is the one running.

Example result

Example on a fictional setup (host trading-1, service trader under PM2). Following live-service-redeploy the agent first diffed the required environment variables referenced by the new commit against the host env file and found one new required variable, EXCHANGE_TIMEOUT_MS, which would have caused a panic at boot. It stopped, proposed the line to add, and asked for the value.

After that: account check showed no open positions and no conditional orders, so the restart was safe. It backed up the live binary as trader.prev-0412, built on the host, ran the unit tests, compared sha256 of the build against the uploaded file, swapped the binary and restarted by the exact PM2 name from the process list (not the similarly named stopped entry).

Verification: the restart count moved by exactly one, no panic lines after the boot marker, and the new boot line "build marker v2" appeared in the log. binary_identity.sh printed the running executable's sha256 and the module graph, matching the intended commit. Rollback command was left ready: swap trader.prev-0412 back and restart. The agent listed three old rollback copies for pruning and asked before deleting anything.

Requirements

  • SSH access to your own Linux host running the service under PM2
  • bash, curl, sha256sum on the host
  • Go toolchain on the host or build machine (for Go services)

How to install

Unzip into your Claude Code skills folder (~/.claude/skills/ or .claude/skills/ in a project) and start a new session; the skill loads by its description.

What you get

1 file · 12.14 KB

  • live-service-redeploy.zipZIP · 12.14 KB
LicenseCommercial use allowed
Package checkPassed

Getly opened the uploaded files and found nothing that would stop them opening. It is not a virus scan or a quality rating.

PublishedDec 3, 2026
File size12.14 KB
File formatZIP
Versionv1.0

Tags

claude codeclaude skillai agenttrading bot
C
Claude Workflow Lab

Frequently asked questions

Do I get access instantly?

Yes. This is a digital product - you can download it right after checkout, straight from your library.

Can I use it for commercial projects?

Yes. Commercial use is allowed: use it in your own business and in things you sell. You may not resell or redistribute the file itself.

What's your refund policy?

You can request a refund within 30 days. If something isn't right, request it from your order and the Getly team reviews it.

What file formats and sizes will I get?

You'll download 1 file - ZIP - 12.14 KB in total.

Do I get free updates?

Yes - when the seller ships a new version, you can re-download the latest files from your library at no extra cost. Check the changelog for recent updates.

Price

$7.00