SFTP/FTP Auto Upload - VS Code Extension

SFTP/FTP Auto Upload
A lightweight VS Code extension that automatically uploads files to your SFTP/FTP server when saved, with manual upload/download options for files and folders. It is also tracking file changes on server side when more then one devlopers working on same project. If you try to edit file which is changed on server by other developer then it will download and update local file and also create a backup file for local file for safety. So it will protect from overwriting in team work.
Extension only work and active if you have sftp.json file under .vscode folder
Features ✨
- Auto-upload on save - Files are uploaded immediately when saved locally
- Auto Delete on delete - File or Folder deleted from server when deleted locally
- Auto-sync and Backup :
- Files are uploaded immediately when saved locally and check if server file is latest then warning before owerwrite.
- When Open File it will check server file also. If server file is latest then download first and also create a backup.
- Manual file operations:
- Upload single file (right-click → "Upload to Server")
- Download single file (right-click → "Download from Server")
- Folder operations :
- Upload entire folder recursively
- Download entire folder recursively
- Delete entire folder
- On Rename file or folder, Old File will be deleted from server also
- Multiple protocol support:
- SFTP (SSH File Transfer Protocol)
- FTP (File Transfer Protocol)
- Simple configuration - Single JSON config file
Installation ⚙️
- Open VS Code extensions marketplace (
Ctrl+Shift+X)
- Search for "SFTP Auto Upload"
- Click Install
Configuration ⚙️
- Create
.vscode/sftp.json in your project root:
{
"name": "myftp1",
"host": "your-server.com",
"protocol": "ftp",
"port": 21,
"username": "your-username",
"password": "your-password",
"remotePath": "/path/on/server",
"privateKey": "mykeyorfile",
"uploadOnSave": true,
"syncOnSave": false,
"syncOnOpen": true,
"ignore": [".vscode", ".git", ".DS_Store"]
}
{
"name": "myftp1",
"host": "your-server.com",
"protocol": "sftp",
"port": 22,
"username": "your-username",
"password": "your-password",
"remotePath": "/path/on/server",
"privateKey": "mykeyorfile",
"uploadOnSave": true,
"syncOnSave": false,
"syncOnOpen": true,
"ignore": [".vscode", ".git", ".DS_Store"]
}
- Available configuration options:
| Key |
Type |
Description |
Default |
protocol |
string |
sftp or ftp |
Required |
host |
string |
Server hostname/IP |
Required |
port |
number |
Server port |
22 (SFTP), 21 (FTP) |
username |
string |
Login username |
Required |
password |
string |
Login password (optional if using private key) |
|
privateKey |
string |
Path to private key (SFTP only) |
|
remotePath |
string |
Base path on remote server |
Required |
uploadOnSave |
boolean |
Enable auto-upload on save |
false |
syncOnSave |
boolean |
Enable auto-sync on Save |
false |
syncOnOpen |
boolean |
Enable auto-sync on Open |
false |
Usage 🚀
Automatic Upload
- Set
"uploadOnSave": true in config
- Save any file in your project
- File will be automatically uploaded to server
Manual Operations
Requirements 📋
- VS Code 1.60.0 or later
- Node.js (included with VS Code)
Known Limitations ⚠️
- Folder operations are only supported for SFTP, not FTP
- Large file transfers may require manual operation
- First-time setup requires server credentials
Contributing 🤝
Contributions are welcome! Please open issues or pull requests on our GitHub repository.
License 📄
This extension is MIT licensed.
Happy coding! 🎉