Skip to main content

Managing Containers

Containers in Rexec provide isolated, on-demand development environments in the cloud. Each container comes with persistent storage, customizable resources, and automatic tool installation based on your selected role.

Creating a Container

From the Dashboard

  1. Click the Create Terminal button in the top navigation
  2. Choose your container configuration:
    • Image Type: Select from Ubuntu, Debian, Alpine, Fedora, or custom images
    • Role: Choose pre-configured tool sets (Node.js, Python, Go, Rust, etc.)
    • Resources: Allocate memory, CPU, and disk space
    • Shell Setup: Configure shell enhancements and themes
  3. Click Create Container
  4. Wait for the container to be created (you’ll see real-time progress)
  5. Your terminal will automatically connect when ready

Available Images

  • ubuntu - Latest Ubuntu LTS (default)
  • debian - Debian stable
  • alpine - Lightweight Alpine Linux
  • fedora - Latest Fedora
  • custom - Provide your own Docker image
  • macos - macOS VM (Enterprise tier only)

Pre-configured Roles

Roles automatically install development tools when your container starts:
  • node - Node.js, npm, yarn, pnpm
  • python - Python 3, pip, virtualenv
  • go - Go compiler and tools
  • rust - Rust toolchain (rustc, cargo)
  • java - OpenJDK and Maven
  • php - PHP and Composer
  • ruby - Ruby and Bundler
  • elixir - Elixir and Mix
  • c - GCC, Make, CMake
  • barebone - Minimal setup (fastest startup)

Container Limits by Tier

  • Max Containers: 5
  • Memory: Up to 2GB per container
  • CPU: Up to 2 vCPUs (2000 millicores)
  • Disk: Up to 8GB per container
  • Session Duration: 50 hours
  • Max Containers: 10
  • Memory: Up to 4GB per container
  • CPU: Up to 4 vCPUs (4000 millicores)
  • Disk: Up to 16GB per container
  • Session Duration: Unlimited
  • Max Containers: 20
  • Memory: Up to 8GB per container
  • CPU: Up to 8 vCPUs (8000 millicores)
  • Disk: Up to 32GB per container
  • Session Duration: Unlimited
  • macOS Containers: Available

Managing Container Settings

Updating Container Configuration

  1. In the Dashboard, find your container card
  2. Click the ⚙ Settings icon
  3. Modify settings:
    • Name: Rename your container
    • Memory: Adjust memory allocation (512MB - tier limit)
    • CPU: Change CPU shares (512 - tier limit)
    • Disk: Update storage quota (2GB - tier limit)
  4. Click Save Changes
When you change resources, the container will be automatically recreated with the new settings. Your data persists on the attached volume.

Container Lifecycle

Status Indicators:
  • 🟢 running - Container is active and ready
  • 🟡 creating - Container is being set up
  • 🟡 configuring - Installing role tools
  • stopped - Container is paused
  • 🔴 error - Creation or startup failed

Starting and Stopping

Stop a Container:
# From CLI
rexec container stop <container-id>
Or click the Stop button in the container card menu. Start a Stopped Container:
# From CLI
rexec container start <container-id>
Or click the Start button in the container card.
If a container was removed from the Docker host, it will be automatically recreated with the same configuration when you click Start.

API Examples

Create Container via API

curl -X POST https://rexec.sh/api/containers \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "ubuntu",
    "name": "dev-environment",
    "role": "node",
    "memory_mb": 2048,
    "cpu_shares": 1024,
    "disk_mb": 8192,
    "shell": {
      "enhanced": true,
      "theme": "robbyrussell",
      "autosuggestions": true,
      "syntax_highlight": true
    }
  }'

List Containers

curl https://rexec.sh/api/containers \
  -H "Authorization: Bearer $TOKEN"
Response:
{
  "containers": [
    {
      "id": "abc123...",
      "name": "dev-environment",
      "image": "ubuntu",
      "role": "node",
      "status": "running",
      "created_at": "2026-03-04T10:30:00Z",
      "resources": {
        "memory_mb": 2048,
        "cpu_shares": 1024,
        "disk_mb": 8192
      },
      "idle_seconds": 120
    }
  ],
  "count": 1,
  "limit": 5
}

Update Container Settings

curl -X PATCH https://rexec.sh/api/containers/<container-id>/settings \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "production-test",
    "memory_mb": 4096,
    "cpu_shares": 2048,
    "disk_mb": 16384
  }'

Delete Container

curl -X DELETE https://rexec.sh/api/containers/<container-id> \
  -H "Authorization: Bearer $TOKEN"

Persistent Storage

Each container has a persistent volume mounted at /workspace. Data stored here survives:
  • Container restarts
  • Resource updates
  • System maintenance
Volume Name Format: rexec-{user_id}-{container_name}

Best Practices

/workspace
├── projects/        # Your code repositories
├── configs/         # Dotfiles and configuration
├── scripts/         # Utility scripts
└── data/            # Application data
While volumes are persistent, always maintain backups:
# Sync to external storage
rsync -avz /workspace/ user@backup:/path/

# Use Git for code
cd /workspace/projects/myapp
git push origin main

Shell Customization

Enhanced Shell Features

When creating a container with enhanced shell enabled, you get:
  • Oh My Zsh with custom themes
  • Autosuggestions based on command history
  • Syntax Highlighting for commands
  • Git Aliases for faster workflows
  • System Stats in your prompt

Available Themes

  • robbyrussell (default)
  • agnoster
  • powerlevel10k
  • spaceship

Tmux Integration

Enable tmux for session persistence and split panes:
{
  "shell": {
    "use_tmux": true
  }
}

Troubleshooting

If the container creation takes longer than 5 minutes:
  1. Check the WebSocket connection status (indicator in UI)
  2. Refresh the page to reconnect
  3. If still stuck, delete and recreate the container
  4. Contact support if the issue persists
Common Causes:
  • Large custom image download
  • Docker host overload
  • Network connectivity issues
If you can’t connect to your container:
  1. Verify the container status is “running” (not “configuring”)
  2. Check your browser console for WebSocket errors
  3. Try reconnecting from the Dashboard
  4. Ensure your token hasn’t expired (refresh if needed)
# Check disk usage
df -h /workspace

# Find large files
du -sh /workspace/* | sort -rh | head -10

# Clean up
rm -rf /workspace/node_modules
npm cache clean --force
Or increase disk quota in container settings (subject to tier limits).
If your container shows a lock icon and prompts for MFA:
  1. Enter your 6-digit TOTP code from your authenticator app
  2. Or use a backup code if you’ve lost access to your authenticator
  3. To remove MFA protection, click “Unlock Terminal” and verify with a code
See the Authentication Guide for MFA setup.

Advanced Usage

Custom Docker Images

Select “custom” as the image type and provide a Docker image name:
{
  "image": "custom",
  "custom_image": "your-registry.com/your-image:tag"
}
Requirements:
  • Image must be publicly accessible or authenticated
  • Must include a shell (/bin/sh or /bin/bash)
  • SSH is optional (WebSocket terminal works without it)

Automation with CLI

# Create and connect in one command
rexec create --image ubuntu --role python --name ml-env --connect

# Batch create multiple containers
for env in dev staging prod; do
  rexec create --name "app-$env" --role node
done

# Auto-start stopped containers
rexec list --status stopped | jq -r '.[].id' | xargs -I {} rexec start {}

Guest vs. Authenticated Sessions

Guest Containers

  • No sign-in required
  • Limited to 5 containers
  • 50-hour maximum lifetime
  • Automatically cleaned up after expiration
  • Cannot be restarted after stopping

Authenticated Containers

Free tier users with PipeOps login:
  • Same 5 container limit as guests
  • 50-hour session duration for free tier
  • Can restart containers
  • Unlimited duration with Pro/Enterprise subscription
Upgrade to Pro for unlimited session duration and 10 concurrent containers.

Real-time Updates

The Rexec dashboard uses WebSocket connections to provide live updates:
  • Container Status: See status changes instantly
  • Resource Usage: Monitor CPU, memory, and disk in real-time
  • Idle Time: Track how long containers have been inactive
  • Creation Progress: Watch image pull and setup stages
Look for the connection indicator in the top right of the dashboard.

Build docs developers (and LLMs) love