# Production checklist

This guide describes SDK version 1001.0.0

Check a bot before it runs unattended, with the guide section that explains each item

## Before the first start

- Run Node.js 24.15 or newer
- Read the token from `process.env.FLUXER_BOT_TOKEN`, never from a source file or an image

Explained in: [Runtime requirements](https://fluxerly.neontechspace.com/docs/support-and-compatibility.md#runtime-and-upgrade-requirements) · [Preparing the bot](https://fluxerly.neontechspace.com/docs/deploying.md#prepare-the-bot)

## Failures

- Return or check every [Result](https://fluxerly.neontechspace.com/docs/glossary.md#result), the success or failure each request gives, so a failed send is reported instead of lost
- Send failures somewhere someone reads, with an `onError` hook or a log sink
- Do not resend a write whose outcome is unknown
- Leave rate limits to the SDK, which waits for HTTP 429 on its own

Explained in: [Returning the Result](https://fluxerly.neontechspace.com/docs/reliability.md#return-the-replys-result) · [Failures in one place](https://fluxerly.neontechspace.com/docs/logging.md#handle-failures-in-one-place) · [An existing logger](https://fluxerly.neontechspace.com/docs/logging.md#send-records-to-an-existing-logger) · [Sending once](https://fluxerly.neontechspace.com/docs/reliability.md#send-once-when-the-outcome-is-uncertain) · [Retry rules](https://fluxerly.neontechspace.com/docs/reliability.md#limits-and-retry-rules)

## Running unattended

- Turn on only the caches the bot reads, and size them for its communities
- Give the process manager a stop timeout of about 30 seconds
- Restart after a crash with a delay
- Add a session store, so a quick restart resumes and gets the events it missed
- Watch the connection and each event subscription the bot cannot work without, which `runBot` already does

Explained in: [Cache settings](https://fluxerly.neontechspace.com/docs/configuration.md#cache) · [Shutdown](https://fluxerly.neontechspace.com/docs/deploying.md#what-happens-on-shutdown) · [Restart policy](https://fluxerly.neontechspace.com/docs/deploying.md#restart-policy) · [Resuming after a restart](https://fluxerly.neontechspace.com/docs/sharding.md#resume-after-a-restart) · [Watching the connection](https://fluxerly.neontechspace.com/docs/application-supervision.md#watch-the-connection-and-subscription)

## Before each deploy

- Run offline tests, as in [writing a first test](https://fluxerly.neontechspace.com/docs/testing.md#write-a-first-test)
