PromptHub
Back to Blog
Developer Tools Cryptocurrency Trading

Stop Wrestling with Browser Tabs! Monitor Freqtrade Bots in Your Terminal with FTUI

B

Bright Coding

Author

13 min read 144 views
Stop Wrestling with Browser Tabs! Monitor Freqtrade Bots in Your Terminal with FTUI

Stop Wrestling with Browser Tabs! Monitor Freqtrade Bots in Your Terminal with FTUI

Your browser has 47 tabs open. Three of them are Freqtrade dashboards. One just crashed. Again.

If you're running algorithmic trading bots with Freqtrade, you know the pain. Browser-based monitoring is slow, memory-hungry, and a nightmare when you're managing multiple bots across different servers. Every refresh takes forever. CORS errors haunt your dreams. And don't even get me started on trying to check your bots from a headless server over SSH.

What if I told you there's a blazing-fast, terminal-native solution that loads instantly, uses minimal resources, and lets you monitor unlimited Freqtrade bots from a single sleek interface?

Meet FTUI — the Freqtrade Textual User Interface that's making browser-based monitoring feel like ancient history. Built by the brilliant @froggleston using the powerhouse Textual and Rich frameworks, FTUI is the secret weapon that serious crypto traders are quietly adopting.

And here's the kicker: it installs in under 60 seconds.

Ready to reclaim your RAM and your sanity? Let's dive deep into why FTUI is about to become your most-used trading tool.


What is FTUI? The Terminal Revolution Freqtrade Traders Needed

FTUI (Freqtrade Textual User Interface) is a terminal-based monitoring client for the popular open-source Freqtrade cryptocurrency trading bot. Unlike the default browser-based FreqUI dashboard, FTUI operates entirely within your terminal — no browser required, no JavaScript↗ Bright Coding Blog bloat, no rendering lag.

Created by developer @froggleston, FTUI leverages two of Python↗ Bright Coding Blog's most impressive modern TUI (Text User Interface) frameworks:

  • Textual: A rapid application development framework for building sophisticated terminal interfaces with reactive widgets, CSS-like styling, and smooth event handling.
  • Rich: The legendary library for rich text and beautiful formatting in the terminal, bringing colors, tables, progress bars, and syntax highlighting to your console.

Why is FTUI trending now? The crypto trading community has reached a breaking point with browser-based monitoring. As traders scale from one bot to five, ten, or twenty, browser tabs become unmanageable. FTUI solves this elegantly with a single interface, zero CORS headaches, and native multi-server support.

Critical note: FTUI is currently in alpha state. Bugs exist. Features are missing. But the core experience is already so compelling that early adopters are building their workflows around it.

The project lives at https://github.com/freqtrade/ftui and is rapidly evolving with community feedback.


Key Features: Why FTUI Crushes Browser Monitoring

Let's dissect what makes FTUI technically superior to traditional monitoring approaches:

Lightning-Fast Performance

FTUI preloads all trade dataframes into memory on startup. No more waiting for browser renders or suffering through React↗ Bright Coding Blog hydration delays. The interface responds instantly to keyboard navigation.

True Multi-Server Monitoring

Unlike FreqUI, which requires complex CORS configuration to access bots across different servers, FTUI uses the freqtrade-client REST API client natively. Configure once, monitor everything.

Keyboard-Driven Navigation

Every screen is accessible via single keystrokes:

  • D → Dashboard
  • B → View Bots
  • S → Settings
  • H → Help

No mouse required. Perfect for SSH sessions and tmux workflows.

Rich Visual Feedback

Thanks to Rich integration, FTUI delivers:

  • Color-coded trade status with customizable color schemes
  • Real-time profit charts rendered as ASCII/Unicode visualizations
  • Structured log viewing with syntax highlighting
  • System information panels with clean tabular output

Customizable Color Themes

Every UI element's color is configurable via YAML. Match your terminal theme, create high-contrast accessibility profiles, or build your own aesthetic.

Lightweight Resource Footprint

Compared to Chrome's 500MB+ per tab, FTUI runs comfortably in a Python virtual environment using minimal memory. Ideal for VPS deployments where every megabyte costs money.

Future-Proof Architecture

The Settings screen framework is built for expansion. Upcoming releases promise in-app configuration editing, dynamic bot visibility toggling, and Docker↗ Bright Coding Blog containerization.


Real-World Use Cases: Where FTUI Absolutely Shines

Scenario 1: The Multi-Bot Fleet Operator

You're running 12 Freqtrade bots across 3 VPS instances — some spot trading, some futures, different strategies per market regime. Previously, you needed 12 browser tabs or complex reverse proxy setups. With FTUI, one config.yaml aggregates everything. You see aggregate P&L on the Dashboard, drill into individual bots with B, and never context-switch again.

Scenario 2: The Headless Server Admin

Your trading infrastructure lives on cloud instances with no GUI. SSH is your only access point. Browser forwarding over SSH is painful and insecure. FTUI runs natively in your terminal session — zero graphical dependencies, instant connection.

Scenario 3: The tmux/screen Power User

Your workflow lives in terminal multiplexers. You already monitor logs, edit configs, and deploy code in tiled terminal panes. FTUI integrates seamlessly into this environment, unlike browser windows that break your spatial workflow.

Scenario 4: The Low-Bandwidth Trader

Traveling? On mobile tethering with limited data? FTUI's text-based protocol transmits kilobytes versus megabytes of HTML/CSS/JS. Your dashboards load instantly even on constrained connections.

Scenario 5: The Automation Engineer

You're building trading infrastructure that needs programmatic health checks. FTUI's underlying freqtrade-client library gives you clean Python APIs. The TUI becomes both your monitoring dashboard and your development sandbox.


Step-by-Step Installation & Setup Guide

Prerequisites

  • Linux system (Windows/macOS support planned; Docker container coming)
  • Python 3.8+
  • Running Freqtrade bot(s) with API enabled

Method 1: Quick pip Install (Recommended)

# Create isolated environment
mkdir ~/ftui && cd ~/ftui
python3 -m venv .venv
source .venv/bin/activate

# Install FTUI directly from PyPI
pip install ftui

Method 2: Development Install from Source

# Clone and enter repository
mkdir ~/ftui && cd ~/ftui
python3 -m venv .venv
source .venv/bin/activate

# Install dependencies and package in editable mode
pip3 install -r requirements.txt
pip3 install -e .

Configuration Setup

Create your configuration file:

touch config.yaml
nano config.yaml

Here's the complete configuration structure with all options explained:

---
servers:
    # Bot A: Local instance on default port
    - name        : "botA"
      username    : "you"
      password    : "your_password"
      ip          : 1.2.3.4
      port        : 8080
    
    # Bot B: Second instance on same server, different port
    - name        : "botB"
      username    : "you"
      password    : "your_password"
      ip          : 1.2.3.4
      port        : 8081

    # Bot C: Remote server deployment
    - name        : "botC"
      username    : "you"
      password    : "your_password"
      ip          : 5.6.7.8
      port        : 8080

# Custom color scheme (optional — omit for defaults)
colours:
    pair_col: "purple"
    bot_col: "yellow"
    bot_start_col: "white"
    trade_id_col: "white"
    open_rate_col: "white"
    current_rate_col: "white"
    open_date_col: "cyan"
    winrate_col: "cyan"
    open_trade_num_col: "cyan"
    closed_trade_num_col: "purple"
    profit_chart_col: "orange"
    link_col: "yellow"
    candlestick_trade_text_col: "orange"
    candlestick_trade_open_col: "blue"
    candlestick_trade_close_col: "purple"

# Performance tuning for large bot fleets
debug: False
show_fear: True
pool_connections: 20      # Increase for 10+ bots
pool_maxsize: 15          # Prevent urllib connection exhaustion

Critical configuration notes:

  • Indentation matters — YAML is whitespace-sensitive
  • IP addresses must match your Freqtrade bot's API binding
  • Credentials must match your bot's api_server config
  • Color names must be valid Textual color constants

Launch FTUI

# Ensure venv is activated
source .venv/bin/activate

# Launch with explicit config path
ftui -y config.yaml

You'll see the iconic FTUI ASCII banner and connection confirmations:

███████╗████████╗██╗   ██╗██╗
██╔════╝╚══██╔══╝██║   ██║██║
█████╗     ██║   ██║   ██║██║
██╔══╝     ██║   ██║   ██║██║
██║        ██║   ╚██████╔╝██║
╚═╝        ╚═╝    ╚═════╝ ╚═╝

Freqtrade Textual User Interface (FTUI)

Setting up botA version 2024.1-dev-1b70e9b07 at http://1.2.3.4:8080: SampleStrategy running dry_run 5m
Setting up botB version 2024.1-dev-1b70e9b07 at http://1.2.3.4:8081: SampleStrategy running dry_run 5m
Starting FTUI - preloading all dataframes.......

REAL Code Examples from the Repository

Let's examine the actual implementation patterns from FTUI's codebase and documentation.

Example 1: Server Configuration Block

The config.yaml server definition demonstrates clean YAML structure for multi-bot orchestration:

servers:
    - name        : "botA"
      username    : "you"
      password    : "your_password"
      ip          : 1.2.3.4
      port        : 8080
    - name        : "botB"
      username    : "you"
      password    : "your_password"
      ip          : 1.2.3.4
      port        : 8081

What's happening here? Each list element under servers defines a Freqtrade REST API endpoint. The name field becomes your display label in the UI. Notice how multiple bots on the same IP use different ports — this is the standard pattern for running multiple Freqtrade instances on one server. The username and password must match the credentials configured in each bot's config.json under the api_server section.

Pro tip: Use descriptive names like "BTC_Spot_Scalper" instead of "botA" — your future self will thank you when you have 15 bots and need to identify strategies instantly.


Example 2: Connection Pool Tuning (CLI)

For high-frequency monitoring of large bot fleets, adjust urllib3's connection pool:

# Command-line override for connection pool sizing
ftui -c config.json --pool_connections 20 --pool_maxsize 15

Why this matters: The default urllib3 connection pool size is 10. When FTUI polls multiple bots simultaneously, connections get discarded with warnings like connection pool is full, discarding connection: 127.0.0.1. These CLI flags increase the pool's capacity and maximum queued connections.

The -c flag specifies an alternative config format (JSON in this example), showing FTUI's flexibility in configuration sources. The --pool_connections parameter sets how many connections to keep open per host, while --pool_maxsize controls the maximum number of connections to save in the pool.


Example 3: Connection Pool Tuning (YAML Config)

Prefer configuration files over CLI flags? Embed pool settings directly:

pool_connections: 20
pool_maxsize: 15

Integration context: These keys sit at the top level of your config.yaml, alongside servers, colours, debug, and show_fear. This declarative approach is version-control friendly and ensures consistent behavior across team deployments.

Performance guideline: Start with pool_connections = 2 × (number of bots) and pool_maxsize = pool_connections - 5. Monitor for warnings and adjust upward. Excessive connections waste memory; insufficient pools cause request queuing delays.


Example 4: Complete Color Customization Schema

FTUI exposes granular color control for every UI element:

colours:
    pair_col: "purple"                    # Trading pair names (BTC/USDT)
    bot_col: "yellow"                     # Bot identifier labels
    bot_start_col: "white"                # Bot startup timestamp
    trade_id_col: "white"                 # Unique trade identifiers
    open_rate_col: "white"                # Entry price display
    current_rate_col: "white"             # Live market price
    open_date_col: "cyan"                 # Trade open timestamp
    winrate_col: "cyan"                   # Strategy win rate percentage
    open_trade_num_col: "cyan"            # Count of active positions
    closed_trade_num_col: "purple"        # Count of completed trades
    profit_chart_col: "orange"            # ASCII profit visualization
    link_col: "yellow"                    # Clickable/hyperlinked text
    candlestick_trade_text_col: "orange"  # OHLC text annotations
    candlestick_trade_open_col: "blue"    # Candle body (bullish)
    candlestick_trade_close_col: "purple" # Candle body (bearish)

Design philosophy: This schema separates semantic concerns (what the data represents) from visual presentation. Traders with color vision deficiencies can build high-contrast themes. Those running in monochrome terminals can map everything to grayscale intensities. The link_col specifically highlights interactive elements that Textual makes focusable.


Advanced Usage & Best Practices

Optimize Your Terminal Environment

  • Use a modern terminal emulator (Alacritty, WezTerm, iTerm2, Windows Terminal) for full Unicode and truecolor support
  • Set minimum 120×40 terminal size for comfortable dashboard viewing
  • Enable mouse support in your terminal for clickable widgets (Textual handles this automatically)

tmux Integration

# Create dedicated FTUI session that persists across disconnects
tmux new-session -d -s ftui 'cd ~/ftui && source .venv/bin/activate && ftui -y config.yaml'
tmux attach -t ftui

Systemd Service for Unattended Monitoring

Create /etc/systemd/system/ftui.service for automatic startup:

[Unit]
Description=FTUI Freqtrade Monitor
After=network.target

[Service]
Type=simple
User=trader
WorkingDirectory=/home/trader/ftui
ExecStart=/home/trader/ftui/.venv/bin/ftui -y /home/trader/ftui/config.yaml
Restart=always

[Install]
WantedBy=multi-user.target

Avoid the Sleep Crash

Known issue: putting your PC to sleep disrupts async workers. On laptops, configure FTUI to run on a persistent server, or wrap in a restart loop:

while true; do ftui -y config.yaml; sleep 5; done

Security Hardening

  • Store config.yaml with chmod 600 — it contains plaintext passwords
  • Use SSH tunneling instead of exposing Freqtrade APIs publicly
  • Consider API key rotation via environment variable injection

Comparison with Alternatives

Feature FTUI FreqUI (Browser) Custom Scripts
Startup Time Instant 3-10 seconds Varies
Memory Usage ~50MB 500MB+ per tab Varies
Multi-Server Native, no CORS Complex proxy setup Manual REST calls
SSH/Headless Perfect fit Requires X11/VNC Terminal-native
Visual Polish Rich ASCII/Unicode Full CSS styling Minimal
Keyboard Control Full navigation Limited shortcuts CLI-only
Installation pip install Requires bot + browser Custom development
Real-time Updates Polling-based WebSocket push Implementation-dependent
Mobile Friendly Terminal apps work Responsive design No
Customization YAML colors + config Full CSS theming Unlimited

Verdict: Choose FTUI when you prioritize speed, efficiency, and terminal-native workflows. Stick with FreqUI if you need rich visual charts or mobile browser access. Build custom scripts only for highly specialized automation that neither tool provides.


FAQ: Your Burning FTUI Questions Answered

Can I control my bots through FTUI?

Not yet. FTUI is passive monitoring only in its current alpha release. The roadmap includes control capabilities, but for now, use Freqtrade's Telegram integration or direct API calls for trade execution.

Does FTUI work on Windows or macOS?

Currently Linux only. The team plans Docker containerization for cross-platform support. macOS users may have success with minor modifications; Windows users should use WSL2 as a workaround.

How many bots can I monitor simultaneously?

No hard limit, but practical scaling depends on connection pool tuning. Start with --pool_connections 20 for 10+ bots. The Dashboard aggregates all configured servers automatically.

Is my password secure in config.yaml?

No — it's plaintext. Set file permissions to 600 and consider running FTUI on the same machine as your bots to avoid network exposure. Future releases may support environment variable substitution.

What happens when FTUI crashes?

Known alpha issues include async worker failures after system sleep. The UI may intermittently crash. A simple restart resolves most issues. Follow the project's GitHub for stability improvements.

Can I use FTUI with Docker-based Freqtrade bots?

Absolutely. Configure the ip field as your Docker host's IP (or host.docker.internal for local containers) and expose the bot's API port. No CORS configuration needed — that's FTUI's superpower.

Will FTUI replace FreqUI entirely?

Unlikely — they're complementary tools. FreqUI excels at visual analysis and mobile access. FTUI dominates in speed, resource efficiency, and terminal workflows. Sophisticated traders will likely use both.


Conclusion: Your Terminal Just Became Your Trading Command Center

FTUI represents a paradigm shift in how we think about trading bot monitoring. It strips away the bloat, eliminates the browser dependency, and delivers exactly what professional traders need: instant information, minimal overhead, and infinite scalability.

Yes, it's alpha software. Yes, there are bugs. But the core experience is so fundamentally superior to browser-based alternatives that early adopters are already building their operational workflows around it. The combination of Textual's reactive framework and Rich's visual polish creates something that feels futuristic yet familiar — like your terminal finally evolved to match your trading ambitions.

The future promises Docker deployment, in-app configuration editing, and expanded bot control. But even today, FTUI solves real problems that have plagued Freqtrade operators for years.

Don't let browser tabs slow down your trading edge. Install FTUI, configure your bots, and experience what terminal-native monitoring feels like. Your CPU — and your workflow — will thank you.

👉 Get started now: https://github.com/freqtrade/ftui

Star the repository, report issues, and join the growing community of terminal-first traders who refuse to let their monitoring infrastructure lag behind their strategies.


Have you tried FTUI? What's your terminal monitoring setup? Drop your configuration tips in the comments — let's build the definitive FTUI resource together.

Comments (0)

Comments are moderated before appearing.

No comments yet. Be the first to share your thoughts!

All tools