Skip to main content

Thresh 1.5.0 - Networking & Persistent Storage

ยท 5 min read
thresh Team
thresh Development Team

Release Date: February 27, 2026
Focus: Phase 1.5 - Container Networking & Storage

We're excited to announce thresh 1.5.0, bringing enterprise-grade networking and persistent storage to WSL development environments!

๐ŸŒ Port Mapping & Networkingโ€‹

Access your containerized services from Windows, your network, or other containers with full port mapping support.

Automatic Port Forwarding (Windows)โ€‹

thresh now automatically creates Windows netsh port forwarding rules when you start WSL environments:

{
"name": "webserver",
"base": "ubuntu-22.04",
"ports": ["8080:80", "8443:443"],
"packages": ["nginx"]
}
thresh up webserver

# Automatically accessible from Windows!
curl http://localhost:8080

How it works:

  1. Detects WSL IP address automatically
  2. Creates netsh portproxy rules
  3. Persists configuration to metadata
  4. Restores on thresh start

Advanced Networking Optionsโ€‹

Multiple port mappings:

"ports": ["8080:80", "8443:443", "5432:5432"]

IP binding:

"ports": ["127.0.0.1:8080:80"]  // Localhost only

Protocol specification:

"ports": ["8080:80/tcp", "53:53/udp"]

Exposed ports:

"expose": ["9090", "9091"]  // Inter-container communication

Network modes:

"network": "bridge"  // or "host", "none"

Custom hostnames:

"hostname": "api.local"

New Lifecycle Commandsโ€‹

Start environments with port forwarding:

thresh start webserver
# โœ“ Port forwarding applied: 8080:80, 8443:443

Stop and cleanup:

thresh stop webserver
# โœ“ Port forwarding removed

Perfect for managing resources after Windows restarts or when WSL port forwarding is lost!

๐Ÿ“ฆ Persistent Volumes & Storageโ€‹

Never lose database data again with three types of persistent storage:

Named Volumesโ€‹

Managed persistent storage that survives environment destruction:

{
"name": "postgres-persistent",
"base": "ubuntu-22.04",
"volumes": [
{
"name": "pgdata",
"mountPath": "/var/lib/postgresql/data"
}
],
"wslConfig": "database",
"packages": ["postgresql"]
}

Benefits:

  • โœ… Data persists across thresh destroy and recreation
  • โœ… Automatic permissions
  • โœ… Native Linux filesystem performance
  • โœ… Backup-friendly

Bind Mountsโ€‹

Mount host directories for live code editing:

{
"name": "nodejs-dev",
"bindMounts": [
{
"source": "C:\\Users\\demo\\projects\\webapp",
"target": "/app"
}
],
"volumes": [
{
"name": "node_modules",
"mountPath": "/app/node_modules"
}
]
}

Perfect for:

  • Live code reload
  • Sharing configuration files
  • Using existing host data

Tmpfs Mountsโ€‹

In-memory storage for caching and temporary data:

{
"tmpfs": [
{
"mountPath": "/tmp",
"size": "512m"
}
]
}

Use cases:

  • Build caches
  • Test databases
  • Temporary processing

๐Ÿ—„๏ธ Database Optimizationโ€‹

Combine persistent volumes with WSL configuration profiles for production-ready databases:

{
"name": "mysql-production",
"base": "ubuntu-22.04",
"ports": ["3306:3306"],
"volumes": [
{
"name": "mysql-data",
"mountPath": "/var/lib/mysql"
},
{
"name": "mysql-backups",
"mountPath": "/backups"
}
],
"wslConfig": "database",
"packages": ["mysql-server"]
}

The database WSL profile:

  • โœ… Disables Windows interop (fixes Plan9 filesystem issues)
  • โœ… Disables automount (pure Linux performance)
  • โœ… Enables systemd
  • โœ… No more chmod permission errors!

๐Ÿ“Š Enhanced Metadata Systemโ€‹

All networking and storage configuration is now persisted:

Location: ~/.thresh/metadata/{environmentName}.json

{
"EnvironmentName": "webserver",
"Created": "2026-02-27T10:30:00Z",
"Ports": ["8080:80"],
"Expose": ["9090"],
"Network": "bridge",
"Hostname": "web-dev",
"Volumes": [
{"name": "data", "mountPath": "/data"}
],
"BindMounts": [
{"source": "C:\\projects", "target": "/app"}
]
}

Enables:

  • Automatic port forwarding restoration
  • Environment recreation with same volumes
  • Configuration backup and portability

๐Ÿš€ Complete Exampleโ€‹

Full-stack application with all Phase 1.5 features:

{
"name": "webapp-stack",
"description": "Full web app with database, code mount, and networking",
"base": "ubuntu-22.04",
"ports": [
"3000:3000", // Frontend
"8080:8080", // Backend
"5432:5432" // PostgreSQL
],
"expose": ["9090"], // Prometheus metrics
"network": "bridge",
"hostname": "webapp.local",
"volumes": [
{
"name": "pgdata",
"mountPath": "/var/lib/postgresql/data"
}
],
"bindMounts": [
{
"source": "C:\\Users\\demo\\projects\\webapp",
"target": "/app"
}
],
"tmpfs": [
{
"mountPath": "/tmp",
"size": "512m"
}
],
"wslConfig": "database",
"packages": [
"postgresql",
"nodejs",
"npm",
"redis-server"
]
}
# One command to rule them all
thresh up webapp-stack

# Services accessible from Windows:
curl http://localhost:3000 # Frontend
curl http://localhost:8080/api # Backend
psql -h localhost -p 5432 -U postgres # Database

# Code editing on Windows, running in Linux
# Database data persists forever
# Full network isolation

๐Ÿ”ง What's Changedโ€‹

New Blueprint Propertiesโ€‹

  • ports - Port mappings in "hostPort:containerPort" format
  • expose - Ports to expose without publishing
  • network - Network mode (bridge, host, none)
  • hostname - Container hostname
  • volumes - Named volumes for persistence
  • bindMounts - Host directory mounts
  • tmpfs - In-memory temporary mounts

New CLI Commandsโ€‹

  • thresh start <env> - Start stopped environment with port forwarding
  • thresh stop <env> - Stop environment and remove port forwarding

Platform Supportโ€‹

  • โœ… Windows (WSL2) - Full networking with automatic port forwarding
  • โœ… Linux - Native Docker/nerdctl port mapping
  • โœ… macOS - Native Docker/nerdctl port mapping

๐Ÿ“š Documentationโ€‹

Comprehensive guides added:

๐ŸŽฏ Testingโ€‹

Extensively tested on Windows:

  • โœ… Port mapping with multiple ports
  • โœ… Named volumes persistence
  • โœ… Bind mounts (Windows โ†’ WSL)
  • โœ… Tmpfs mounts
  • โœ… Network modes
  • โœ… Port forwarding restoration
  • โœ… Native AOT compatibility

See Phase 1.5 Testing Report for details.

๐Ÿ”ฎ What's Nextโ€‹

Phase 1.5 Week 2-3:

  • Volume management commands
  • Network management commands
  • Inter-container networking
  • Docker Compose integration

Phase 1.5 Week 4:

  • Package manager integrations (Chocolatey, Scoop, Winget)
  • Documentation refinements
  • Performance optimizations

๐Ÿ™ Feedbackโ€‹

We'd love your feedback on Phase 1.5!

  • Try the new networking features
  • Test persistent volumes with your databases
  • Let us know what's working (or not)

GitHub Issues | Documentation | Discord

๐Ÿ“ฆ Downloadโ€‹

# Windows (PowerShell)
irm https://thresh.sh/install.ps1 | iex

# Or download directly
# https://github.com/dealer426/thresh/releases/tag/v1.5.0

Happy containerizing! ๐Ÿš€