DreamHost Manager
- Repo stars 0
- Author repo FarmFriend-Terminal-React
DreamHost Manager Skill
Complete solution for managing websites on DreamHost hosting via SFTP/SSH.
Quick Start
1. Setup Credentials
Copy and configure .env file:
cp assets/.env.template .env
# Edit .env with your DreamHost credentials
See setup_guide.md for detailed credential setup.
2. Configure Domain Mappings (Optional but Recommended)
Add your domains to .env for convenient naming:
# .env
DOMAIN_farm-friend.com=/home/dh_cqevup/farm-friend.com
DOMAIN_yourdomain.com=/home/username/yourdomain.com
3. Test Connection
Verify your setup works (using domain name or full path):
# Using domain name (if configured in .env)
python scripts/sftp_operations.py list farm-friend.com
# Using full path (always works)
python scripts/sftp_operations.py list /home/dh_cqevup/farm-friend.com
4. Deploy Your Site
For React apps:
# Using domain name
python scripts/react_deployer.py deploy . farm-friend.com
python scripts/routing_manager.py configure-app farm-friend.com
# Or using full path
python scripts/react_deployer.py deploy . /home/dh_cqevup/farm-friend.com
python scripts/routing_manager.py configure-app /home/dh_cqevup/farm-friend.com
For static sites:
python scripts/directory_sync.py upload ./my-website farm-friend.com
For backups:
python scripts/backup_restore.py backup farm-friend.com ./backups
Core Features
React Application Deployment
Deploy React apps built with Create React App, Vite, or Next.js:
python scripts/react_deployer.py deploy <project_dir> <remote_path>
Automatically:
- Detects framework type
- Runs build process
- Uploads optimized artifacts
- Cleans old deployments
Multi-Site Routing
Configure multiple sites on same domain using:
- Subdomains:
app1.yourdomain.com,app2.yourdomain.com - Subdirectories:
yourdomain.com/app1,yourdomain.com/app2
# Subdomain
python scripts/routing_manager.py configure-subdomain /home/user/app1.yourdomain.com
# Subdirectory
python scripts/routing_manager.py configure-subdir app1 /home/user/yourdomain.com/app1
File Operations
Upload, download, and manage files:
# Upload single file
python scripts/sftp_operations.py upload ./index.html yourdomain.com/index.html
# Download file
python scripts/sftp_operations.py download yourdomain.com/index.html ./backup.html
# List files
python scripts/sftp_operations.py list yourdomain.com
# Create directory
python scripts/sftp_operations.py mkdir yourdomain.com/new-folder
# Delete file
python scripts/sftp_operations.py delete yourdomain.com/old.html
Note: Use domain names (if configured in .env) or full paths like /home/user/yourdomain.com
Directory Synchronization
Sync entire directories for quick deployments:
python scripts/directory_sync.py upload ./my-website yourdomain.com
Features:
- Recursive upload/download
- Timestamp comparison (skips unchanged files)
- Automatic exclusion (.git, node_modules, etc.)
- Progress tracking
Backup & Restore
Create and restore timestamped backups:
# Create backup
python scripts/backup_restore.py backup yourdomain.com ./backups
# List backups
python scripts/backup_restore.py list ./backups
# Restore backup
python scripts/backup_restore.py restore ./backups/backup_20240115_120000.tar.gz yourdomain.com
Features:
- Automatic timestamped backups
- Tar.gz compression
- Safe restore (backs up current version first)
- Large file support
Blog & Content Management
Upload and manage blog posts:
# Upload post with images
python scripts/blog_manager.py upload ./posts/my-post.md yourdomain.com/blog
# List posts
python scripts/blog_manager.py list yourdomain.com/blog
# Update post
python scripts/blog_manager.py update ./posts/my-post.md yourdomain.com/blog/my-post.md
# Delete post
python scripts/blog_manager.py delete yourdomain.com/blog/old.md
Server Commands
Execute shell commands on the server:
# Check disk usage
python scripts/ssh_commands.py disk-usage yourdomain.com
# Change file permissions
python scripts/ssh_commands.py chmod yourdomain.com/config.php 644
# Recursively change permissions (standard web setup)
python scripts/ssh_commands.py chmod-recursive yourdomain.com 644 755
# Create symlink
python scripts/ssh_commands.py symlink yourdomain.com /backup
# Find files
python scripts/ssh_commands.py find yourdomain.com "*.html"
# Execute custom command
python scripts/ssh_commands.py exec "cd /home/user/yourdomain.com && ls -la"
Scripts Reference
| Script | Purpose | Key Functions |
|---|---|---|
sftp_operations.py |
Core file operations | upload, download, list, mkdir, delete, rename |
directory_sync.py |
Sync directories | Recursive upload/download with timestamp checking |
react_deployer.py |
Deploy React apps | Auto-detect framework, build, deploy artifacts |
routing_manager.py |
Configure routing | .htaccess for React Router, multi-site setup |
backup_restore.py |
Backup management | Create, restore, list timestamped backups |
ssh_commands.py |
Server commands | chmod, symlinks, find, disk usage |
blog_manager.py |
Blog content | Upload posts, manage assets, organize content |
Documentation
- setup_guide.md - Credential setup and first-time configuration
- common_workflows.md - Practical examples for deployment, backups, content management
- react_deployment.md - React-specific deployment and multi-site routing
Configuration
.env File Format
DREAMHOST_HOST=your_host.dreamhost.com
DREAMHOST_USER=your_username
DREAMHOST_PASSWORD=your_password
# OR for SSH key (more secure):
# DREAMHOST_SSH_KEY_PATH=/path/to/.ssh/id_rsa
See assets/.env.template for complete template with security notes.
Domain Name Mapping & Per-Domain Credentials
Each domain can have its own DreamHost credentials (host, user, password). Configure them in your .env file:
# .env
# ========== DOMAIN 1: farm-friend.com ==========
DOMAIN_farm-friend.com=/home/dh_cqevup/farm-friend.com
DREAMHOST_HOST_farm-friend.com=server1.dreamhost.com
DREAMHOST_USER_farm-friend.com=user1
DREAMHOST_PASSWORD_farm-friend.com=password1
# ========== DOMAIN 2: yourdomain.com ==========
DOMAIN_yourdomain.com=/home/dh_xxxx/yourdomain.com
DREAMHOST_HOST_yourdomain.com=server2.dreamhost.com
DREAMHOST_USER_yourdomain.com=user2
DREAMHOST_PASSWORD_yourdomain.com=password2
The agent automatically extracts the domain from your command and uses the matching credentials:
# Agent automatically uses farm-friend.com credentials
python scripts/sftp_operations.py list farm-friend.com
# Agent automatically uses yourdomain.com credentials
python scripts/react_deployer.py deploy . yourdomain.com
# Also works with full paths (uses credentials from the domain in the path)
python scripts/sftp_operations.py list /home/dh_cqevup/farm-friend.com
How it works:
- Agent extracts domain from the command:
farm-friend.com - Looks up credentials in .env:
DREAMHOST_HOST_farm-friend.com,DREAMHOST_USER_farm-friend.com, etc. - Connects to that domain's DreamHost account
- Performs the requested operation
This allows seamless management of multiple domains with different DreamHost accounts.
Common Workflows
Deploy Static Website
python scripts/directory_sync.py upload ./website yourdomain.com
Deploy React App with Routing
python scripts/react_deployer.py deploy . yourdomain.com
python scripts/routing_manager.py configure-app yourdomain.com
Daily Backup
python scripts/backup_restore.py backup yourdomain.com ./backups
Update Blog Post
python scripts/blog_manager.py update ./posts/post.md yourdomain.com/blog/post.md
See references/common_workflows.md for more examples.
Dependencies
Install required packages:
pip install -r requirements.txt
Required:
- paramiko - SFTP/SSH library
- python-dotenv - Environment variable loading
- scp - Enhanced file transfer
Troubleshooting
Connection Issues
- Verify credentials in
.env - Check host is accessible
- Confirm SFTP port 22 is open
- Test with:
python scripts/sftp_operations.py list /home/username
See references/setup_guide.md for detailed troubleshooting.
Next Steps
- Follow setup in
references/setup_guide.md - Test with examples in
references/common_workflows.md - Deploy your site!
- Fluxly category
- DevOps · hosting · deployment · sftp
- Author-declared agents
- No explicit declaration found; this is not inferred or tested compatibility
- Static check
- 98 / 100 · heuristic scan, not runtime safety proof
- Author / version / license
- @0-CYBERDYNE-SYSTEMS-0 · v1.0.0 · no license declared
- Fluxly token estimate
- Lean
- Fluxly setup estimate
- Guided setup
- External API key
- No requirement detected
- Detected OS requirements
- Unspecified
- Runtime requirements
- Python
- Detected file/system behavior
-
- Read-only
- Write / modify
- Shell exec
- Env read
- Detected network behavior
- Local-only
- Install commands
- None (reference only)
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
The current SKILL.md does not define a fixed output example. Quick Start
Copy and configure .env file: See setupguide.md for detailed credential setup.
Add your domains to .env for convenient naming:
Verify your setup works (using domain name or full path):
For React apps: For static sites: For backups:
Core Features
# DreamHost Manager Skill
Complete solution for managing websites on DreamHost hosting via SFTP/SSH.
## Quick Start
### 1. Setup Credentials
Copy and configure `.env` file:
```bash
cp assets/.env.template .env
# Edit .env with your DreamHost credentials
```
See `setup_guide.md` for detailed credential setup.
### 2. Configure Domain Mappings (Optional but Recommended)
Add your domains to `.env` for convenient naming:
```bash
# .env
DOMAIN_farm-friend.com=/home/dh_cqevup/farm-friend.com
DOMAIN_yourdomain.com=/home/username/yourdomain.com
```
### 3. Test Connection
Verify your setup works (using domain name or full path):
```bash
# Using domain name (if configured in .env)
python scripts/sftp_operations.py list farm-friend.com
# Using full path (always works)
python scripts/sftp_operations.py list /home/dh_cqevup/farm-friend.com
```
### 4. Deploy Your Site
**For React apps:**
```bash
# Using domain name
python scripts/react_deployer.py deploy . farm-friend.com
python scripts/routing_manager.py configure-app farm-friend.com
# Or using full path
python scripts/react_deployer.py deploy . /home/dh_cqevup/farm-friend.com
python scripts/routing_manager.py configure-app /home/dh_cqevup/farm-friend.com
```
**For static sites:**
```bash
python scripts/directory_sync.py upload ./my-website farm-friend.com
```
**For backups:**
```bash
python scripts/backup_restore.py backup farm-friend.com ./backups
```
## Core Features
### React Application Deployment
Deploy React apps built with Create React App, Vite, or Next.js:
```bash
python scripts/react_deployer.py deploy <project_dir> <remote_path>
```
Automatically:
- Detects framework type
- Runs build process
- Uploads optimized artifacts
- Cleans old deployments
### Multi-Site Routing
… Author text anchors workflow facts; Fluxly only indexes current sections, terms, files, and commands.
sections -> Quick Start → 1. Setup Credentials → 2. Configure Domain Mappings (Optional but Recommended) → 3. Test Connection → 4. Deploy Your Site → Core Features
terms -> For React apps · For static sites · For backups · Subdomains · Subdirectories · setupguide.md · commonworkflows.md · reactdeployment.md
files/cmd -> .env · setupguide.md · app1.yourdomain.com · app2.yourdomain.com · yourdomain.com/app1 · yourdomain.com/app2 · /home/user/yourdomain.com · sftpoperations.py
body sha256 -> 0ffaa23a8738
Decide Fit First
Design Intent
How To Use It
Boundaries And Review