FTP/SFTP Sync Watcher
The most reliable VS Code extension for automatic file synchronization with FTP/SFTP servers
Features •
Installation •
Configuration •
Commands •
Troubleshooting
✨ Features
| Feature |
Description |
| 🔄 Upload on Save |
Automatically upload files when you save them |
| 👁️ File Watcher |
Monitor file changes and sync automatically in real-time |
| 🌳 Remote Explorer |
Browse and manage remote files directly in VS Code |
| 🗑️ Auto-Delete |
Optionally delete remote files when local files are deleted |
| 📁 .gitignore Support |
Automatically respects your .gitignore rules |
| 🚫 Custom Ignore Patterns |
Exclude files and folders with powerful glob patterns |
| 🔐 SSH Key Authentication |
Secure SFTP connections with private key support |
| 📊 Status Bar Integration |
Real-time sync status at a glance |
| ⚡ Smart Reconnection |
Automatic reconnection with exponential backoff |
| 🔁 Operation Queue |
Prevents hanging uploads with timeout and retry mechanisms |
| 🛡️ Connection Pooling |
Intelligent connection management to avoid server limits |
🚀 Why This Extension?
Other FTP/SFTP extensions often stop working after a while and fail to upload files silently. This extension solves that with:
🔧 Robust Architecture
- Automatic Reconnection with exponential backoff (up to 5 retries)
- Operation Timeout — no more hanging uploads
- Health Checks — detects connection issues proactively
- Global Connection Limiting — respects server connection limits
|
⚡ Smart Queue System
- Non-blocking Queue — uploads are processed in sequence
- Retry Mechanism — failed uploads are retried automatically
- Rate Limit Handling — waits intelligently when server is busy
- Priority System — important operations first
|
📦 Installation
From VS Code Marketplace (Recommended)
- Open VS Code
- Press
Ctrl+P (or Cmd+P on Mac)
- Type:
ext install ThaLoco0ne.ftp-sync-watcher
- Press Enter
Manual Installation
- Download the
.vsix file from Releases
- In VS Code:
Extensions → ... → Install from VSIX...
⚙️ Configuration
Create a .ftpsync.json file in your .vscode folder. The extension will guide you through this process.
Quick Start
Press Ctrl+Shift+P → FTP Sync: Create Configuration File
SFTP Configuration (Recommended)
{
"name": "Production Server",
"protocol": "sftp",
"host": "example.com",
"port": 22,
"username": "deploy",
"privateKeyPath": "~/.ssh/id_rsa",
"remotePath": "/var/www/html",
"localPath": "..",
"uploadOnSave": true,
"watcher": {
"enabled": true,
"files": "**/*",
"autoUpload": true,
"autoDelete": false
},
"ignore": [".git", ".vscode", "node_modules"],
"useGitIgnore": true
}
FTP Configuration
{
"name": "FTP Server",
"protocol": "ftp",
"host": "ftp.example.com",
"port": 21,
"username": "ftpuser",
"password": "your-password",
"remotePath": "/public_html",
"secure": true,
"uploadOnSave": true
}
Configuration Reference
📋 Click to expand full configuration options
| Option |
Type |
Default |
Description |
name |
string |
- |
Display name for this connection profile |
protocol |
"ftp" | "sftp" |
"sftp" |
Connection protocol |
host |
string |
required |
Hostname or IP address |
port |
number |
22 (SFTP) / 21 (FTP) |
Port number |
username |
string |
required |
Username for authentication |
password |
string |
- |
Password (not recommended for SFTP) |
privateKeyPath |
string |
- |
Path to SSH private key file |
passphrase |
string |
- |
Passphrase for encrypted private key |
remotePath |
string |
required |
Remote directory path |
localPath |
string |
"." |
Local directory relative to workspace |
uploadOnSave |
boolean |
true |
Auto-upload on file save |
watcher.enabled |
boolean |
true |
Enable file watcher |
watcher.files |
string | false |
"**/*" |
Glob pattern for watched files |
watcher.autoUpload |
boolean |
true |
Auto-upload changed files |
watcher.autoDelete |
boolean |
false |
Delete remote files when local deleted |
ignore |
string[] |
[...] |
Glob patterns to exclude |
useGitIgnore |
boolean |
true |
Apply .gitignore rules |
secure |
boolean |
false |
Use FTPS (FTP over TLS) |
timeout |
number |
30000 |
Connection timeout in ms |
debug |
boolean |
false |
Enable debug logging |
🎮 Commands
Access all commands via the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
| Command |
Description |
FTP Sync: Upload Current File |
Upload the active file |
FTP Sync: Upload Folder |
Upload an entire folder |
FTP Sync: Download Current File |
Download the active file |
FTP Sync: Start Watcher |
Start the file watcher |
FTP Sync: Stop Watcher |
Stop the file watcher |
FTP Sync: Toggle Watcher |
Toggle watcher on/off |
FTP Sync: Connect to Server |
Connect to remote server |
FTP Sync: Disconnect |
Disconnect from server |
FTP Sync: Create Configuration File |
Create a new config file |
FTP Sync: Show Output Channel |
Show logs |
📂 Remote Explorer
Browse and manage your remote files directly in VS Code:
Features
- 🌳 Tree View — Navigate your remote file structure
- 📥 Download — Download files with one click
- 🗑️ Delete — Remove remote files
- 🔄 Refresh — Update the file list
|
Access
- Click the FTP Sync icon in the Activity Bar
- Click Connect to connect to your server
- Browse and manage your files!
|
📊 Status Bar
The status bar shows the current state:
| Icon |
Status |
Description |
| ☁️ |
FTP Sync |
Watcher inactive — click to start |
| 👁️ |
Watching |
Watcher active — click to stop |
| 🔄 |
Syncing... |
Upload in progress |
| ❌ |
Error |
Error occurred — check output for details |
🎯 Glob Patterns
Ignore Patterns
{
"ignore": [
".git", // Ignore .git folder
".vscode", // Ignore .vscode folder
"node_modules", // Ignore node_modules
"*.log", // Ignore all .log files
"**/*.map", // Ignore all .map files in any folder
"dist/**", // Ignore everything in dist folder
"!dist/index.html", // Except dist/index.html
"temp*", // Ignore files/folders starting with temp
"**/.DS_Store" // Ignore all .DS_Store files
]
}
Watch Patterns
{
"watcher": {
"files": "src/**/*.{ts,js,css,html}",
"autoUpload": true,
"autoDelete": false
}
}
| Pattern |
Description |
**/* |
All files in all folders |
src/** |
All files in src folder |
*.js |
All JS files in root |
**/*.{js,ts} |
All JS and TS files |
🔒 Security Best Practices
⚠️ Important Security Recommendations
- Use SSH Keys — Prefer
privateKeyPath over password for SFTP
- Protect Config Files — Add
.ftpsync.json to .gitignore if it contains sensitive data
- Use Environment Variables — Consider using passphrase-protected keys
- Limit Permissions — Use the minimum required server permissions
🔧 Troubleshooting
🔌 Connection Issues
- Verify host, port, and credentials
- Ensure the server is reachable
- Enable
"debug": true for detailed logs
- Check the Output Channel:
FTP Sync: Show Output Channel
- For FTP: Try enabling
"secure": true for FTPS
📤 Files Not Uploading
- Check the
ignore patterns
- Ensure
uploadOnSave is enabled
- Verify the file isn't excluded by
.gitignore
- Check the Output Channel for errors
🔐 SSH Key Issues
- Ensure the key is in OpenSSH format
- Check file permissions of the private key
- For encrypted keys: provide the
passphrase
- Try converting the key:
ssh-keygen -p -m PEM -f ~/.ssh/id_rsa
⚠️ Max Connections Error (530)
This extension handles this automatically by:
- Limiting concurrent connections (max 2)
- Waiting 60 seconds when server rejects connections
- Queuing operations and processing sequentially
If you still see this error, wait a few minutes for old connections to close.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Found a Bug?
Please open an issue with:
- Your VS Code version
- Extension version
- Steps to reproduce
- Error messages from the Output Channel
📄 License
This project is licensed under the MIT License.
Made with ❤️ by LiL-Loco
Report Bug •
Request Feature