Configuration avancée
Configuration
Environment variables and advanced configuration options.
Environment variables
Configure TradeJourney via the .env file at the project root.
All available options
.env
# === PostgreSQL ===
POSTGRES_USER=tradejourney
POSTGRES_PASSWORD=CHANGE_ME_TO_STRONG_PASSWORD
POSTGRES_DB=tradejourney
POSTGRES_EXTERNAL_PORT=5432
# === Application ===
EXTERNAL_PORT=3000 # Application external port
APP_VERSION="prod_w_1.1.0" # Application version
DEBUG_MODE=false # Debug mode (detailed logs)
SHOW_LOG_VIEW=false # Show console button (LogView)
# === Security ===
JWT_SECRET=CHANGE_ME_TO_RANDOM_SECRET # openssl rand -base64 32
ADMIN_API_TOKEN=CHANGE_ME_TO_RANDOM_SECRET
# === Features ===
QUANTOWER_ENABLE=true # Enable Quantower import
PLUGINS_ENABLED=false # Enable plugin system
POLYGON_API_KEY= # Polygon.io API key (optional)
# === External storage server (optional) ===
STORAGE_SERVER_PORT=5000
STORAGE_SERVER_DEBUG=false
CLEANUP_DAYS_OLD=2
Configure the port
By default, TradeJourney uses port 3000. To change:
.env
EXTERNAL_PORT=8080
Then restart the application.
Enable the plugin system
Plugins are disabled by default. To display the Plugins tab in settings:
.env
PLUGINS_ENABLED=true
Enable debug mode
To display detailed logs during development or debugging:
.env
DEBUG_MODE=true
SHOW_LOG_VIEW=true
Timezone per account
To manage different timezones per account:
- Go to Settings → Accounts
- Edit an account
- Enable Manage timezone at account level
- Select the appropriate timezone
Data structure
TradeJourney stores its data in two places:
- PostgreSQL database: all trades, accounts, tags, and notes. Each database you create in the application corresponds to an isolated PostgreSQL schema.
- Disk files (
upload/folder): trade screenshots and plugins.
upload/
└── user_1_data/
├── database_test/
│ ├── screenshots/ # Screenshots des trades
│ └── plugins/ # Plugins installés
└── database_db2/
└── screenshots/
With Docker, this data is persisted in two volumes: tradejourney_pg_data (PostgreSQL) and tradejourney_uploads (files).
Update
With Docker
Terminal
# First back up your data (see the Backup page)
docker compose down
git pull origin master
docker compose up -d --build
PostgreSQL and file volumes are preserved between updates.
Without Docker
In development mode:
Terminal
git pull origin master
npm install
npm run dev
Mobile access
TradeJourney is responsive and accessible from a mobile on the same network:
- Find your machine's IP:
ip addrorifconfig - Access from mobile:
http://192.168.1.X:3000
For permanent access, configure a domain name, or a tool like Ngrok that points to your machine.