Deployment

Review your strategy for self-hosted Python package export.

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 environmentExample status
  • Package structurePreviewed
  • .env.examplePrepared
  • Broker config examplePrepared
  • Risk configPrepared
  • Historical backtest reportReviewed
  • Broker checklistNeeds user check
  • Static IP checkRequired if broker needs it
  • Live modeDisabled by default

Package safety status

DRY_RUNtrue
LIVE_TRADING_ENABLEDfalse
Broker secretsuser-local only
Orders from Stockey SaaSnot placed
Risk acknowledgementrequired
Deployment owneruser
Self-hosted packageSecrets excludedDry-run firstStatic IP checklistUser-owned serverLive disabled by default

Stockey shows the package flow. You control where it runs.

Stockey does not run your live strategy from shared infrastructure. The planned export flow centers on dry-run-first self-hosted packages and setup guidance for infrastructure you control.

What Stockey prepares

  • Python strategy package
  • Strategy config files
  • Risk config files
  • Broker config examples
  • Historical backtest report
  • AI analysis summary
  • Deployment instructions
  • Broker setup 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.

Export directions, one self-hosted boundary.

Public package direction ranges from a bare Python package to planned local UI and later advanced runtime options. They remain user-owned, user-controlled, dry-run-first, and outside Stockey SaaS execution.

Bare Python package

A self-hosted ZIP path for technical users with scripts, config files, .env.example, dependencies, command-line runs, and dry-run-first behavior.

Planned local UI option

A planned local UI package option may add a local app and launcher while broker credentials stay on the user's machine or server.

Later advanced runtime

A later runtime package option may include local app controls, broker setup examples, and runtime checklists without Stockey SaaS placing orders or operating broker accounts.

From tested strategy to self-hosted package.

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

Strategy reviewed

user confirms assumptions, risk rules, and backtest analysis

Package export reviewed

planned Python files, configs, docs, and disclosures stay visible before export

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

User-controlled runtime

user controls final local or server-side operation and monitoring

Every self-hosted path 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/
live_guards.py
portfolio_risk.py
daily_kill_switch.py
execution/
live_guards.py
broker/generated_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 prepares example values and setup instructions. The user enters credentials only on their own machine or server.

Environment Variables
example values
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 environment 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
User action
Confirm historical data access
Needs broker check
Confirm instrument master access
Needs broker check

Network setup

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

Local safety checks

Validate broker_config.example.yaml
Ready
Confirm .env variables
User action
Run dry-run startup
User action
Confirm logs and error handling
User action
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 safety checks.

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

Live mode stays locked until the user enables it locally.

The package keeps safety 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
src/execution/live_guards.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 review, configure, and hand off your strategy package for self-hosted use without storing broker secrets or running order actions from Stockey.