Deployment

Bake your strategy into a self-hosted Python package.

After building and testing your strategy, Stockey prepares the files, configs, checklists, and deployment guidance needed to run it on your own machine, VPS, EC2, GCP VM, or private server.

Deployment targets

  • Local machine
  • Private VPS
  • AWS EC2
  • AWS Lightsail
  • GCP VM
  • Docker server
  • Manual setup

Deployment readiness checklist

  • Python environmentReady
  • Package generatedReady
  • .env.example createdReady
  • Broker config placeholderReady
  • Risk configReady
  • Historical backtest reportReviewed
  • Broker checklistPending
  • Static IP checkRequired if broker needs it
  • Live modeDisabled by default

Package runtime status

DRY_RUNtrue
LIVE_TRADING_ENABLEDfalse
Broker secretsuser-local only
Order endpointsself-hosted only
Risk acknowledgementrequired
Deployment owneruser
Self-hosted packageSecrets excludedDry-run firstStatic IP checklistUser-owned serverLive disabled by default

Stockey prepares the package. You control the runtime.

Stockey does not run your live strategy from shared infrastructure. It generates a deployable package and guides you through setup on infrastructure you control.

What Stockey prepares

  • Python strategy package
  • Strategy config files
  • Risk config files
  • Broker config placeholders
  • Historical backtest report
  • AI analysis summary
  • Deployment instructions
  • Broker readiness checklist
  • Static IP checklist where applicable

What the user controls

  • Broker API credentials
  • Local machine or VPS
  • Environment variables
  • Database password if used
  • Static IP setup
  • Dry-run verification
  • Live enablement decision
  • Ongoing monitoring

Stockey does not store broker secrets permanently and does not enable live mode inside the SaaS.

From tested strategy to self-hosted runtime.

The deployment flow keeps strategy approval, package files, environment setup, broker review, and dry-run verification explicit.

Strategy approved

user confirms assumptions, risk rules, and backtest analysis

Package baked

Stockey generates Python files, configs, docs, and disclosures

Environment configured

user sets .env variables on local machine or server

Broker checklist reviewed

broker-specific setup and data limits are confirmed

Dry-run verified

package starts with non-live safety defaults

Self-hosted runtime ready

user controls final deployment and monitoring

Every deployment starts with a clear package structure.

strategy_package/
strategy_package/
README.md
RISK_DISCLOSURE.md
.env.example
config/
strategy_config.yaml
broker_config.example.yaml
risk_config.yaml
instruments.csv
src/
strategy.py
main_backtest.py
main_live.py
data/
broker_historical_fetch.py
csv_loader.py
backtest/
engine.py
metrics.py
reports.py
risk/
dry_run_guard.py
live_safety_gate.py
portfolio_risk.py
daily_kill_switch.py
execution/
order_router.py
broker_adapter.py
reports/
backtest_summary.md
ai_analysis.md
deployment/
LOCAL_SETUP.md
VPS_SETUP.md
AWS_EC2_SETUP.md
GCP_VM_SETUP.md
DOCKER_SETUP.md
BROKER_SETUP.md
STATIC_IP_CHECKLIST.md
LIVE_READINESS.md

Safeguards

Secrets excluded from ZIP
.env.example only
Live mode disabled by default
Dry-run guard included
Risk acknowledgement required
Broker checklist included
User owns exported package

Environment setup stays explicit.

Stockey generates placeholders and setup instructions. The user enters credentials only on their own machine or server.

Environment Variables
mock only
STOCKEY_STRATEGY_MODEbacktest
DRY_RUNtrue
LIVE_TRADING_ENABLEDfalse
BROKER_NAMEzerodha
BROKER_API_KEYyour_local_key_here
BROKER_ACCESS_TOKENyour_local_token_here
DATABASE_URLoptional_local_database_url
RISK_ACKNOWLEDGEDfalse
STATIC_IP_ACKNOWLEDGEDfalse

Setup checklist

Copy .env.example to .env
Add broker credentials locally
Confirm dry-run mode
Confirm risk settings
Run historical backtest
Review logs
Enable live mode only outside Stockey SaaS after user decision

Run the package where you control the environment.

Each target keeps technical setup visible without provisioning anything from this public page.

Local machine

Good for testing, inspection, and manual runs.

python -m src.main_backtest
DRY_RUN=true

Private VPS

Dedicated server controlled by the user.

ssh user@server
systemd optional

AWS EC2

Cloud VM deployment with optional static IP setup.

elastic_ip=optional
env_file=.env

AWS Lightsail

Simpler VPS-style deployment for individual users.

static_ip_check
snapshot_ready

GCP VM

Cloud VM deployment with environment and service setup.

vm_service=manual
logs=enabled

Docker server

Containerized deployment with repeatable runtime config.

docker compose up
env_file=.env

Broker setup is handled as a checklist, not a hidden assumption.

Different brokers have different API, session, data, and network requirements. Stockey surfaces these before deployment.

API access

Create broker API app
User action
Configure session/redirect flow
Pending
Confirm historical data access
Ready
Confirm instrument master access
Ready

Network setup

Check whether static IP is required
Required
Attach static IP to VPS if needed
User action
Confirm broker whitelist if applicable
Pending
Document public IP in deployment notes
Pending

Runtime checks

Validate broker_config.example.yaml
Ready
Confirm .env variables
User action
Run dry-run startup
Pending
Confirm logs and error handling
Pending
Review live-readiness checklist
Required

Deployment handoff for users who want help.

Stockey can guide the setup process without taking over the user’s trading decisions or storing broker secrets.

Environment setup

Help mapping config files, .env variables, and folder structure.

Server setup

Assist with VPS, EC2, Lightsail, GCP VM, or Docker preparation.

Broker checklist

Walk through broker API setup, static IP checks, and capability notes.

Dry-run verification

Confirm the package starts safely and logs expected runtime checks.

Deployment support does not include investment advice, trade recommendations, or Stockey-side runtime execution.

Live mode stays locked until the user enables it locally.

The package keeps runtime gates explicit, local, and user-controlled.

Safety gate checklist

Backtest reviewed
AI analysis reviewed
Risk config complete
Broker setup complete
Static IP acknowledged where required
.env configured locally
DRY_RUN manually changed by user
LIVE_TRADING_ENABLED manually changed by user
User accepts responsibility
runtime_gate.py
if DRY_RUN != false:
    block_live_orders()
if LIVE_TRADING_ENABLED != true:
    block_live_orders()
if RISK_ACKNOWLEDGED != true:
    block_live_orders()

Prepare the package. Control the deployment.

Stockey helps you bake, configure, and hand off your strategy package for self-hosted use — without storing broker secrets or running runtime actions from Stockey.