Create the config
Add remote-sync-config.json to your project root. A minimal SFTP setup:
{
// connection
"type": "sftp",
"host": "example.com",
"user": "deploy",
"port": 22,
"ssh_key_file": "~/.ssh/id_ed25519",
"remote_path": "/var/www/mysite",
// behaviour
"upload_on_save": false,
"ignore": ["node_modules/**", ".git/**", "*.log"],
"ignore_regexes": ["\\.env.*"]
}
Use it
- Right-click a file or folder → MokoDeploy ▸ Upload.
- Run MokoDeploy: Diagnose to confirm the resolved host, path, key presence and ignore-rule counts before your first upload.
- Set
"upload_on_save": trueonce you trust the config to deploy on every save.
Comments are allowed because the file is parsed as JSONC. Part of the Moko VS Code suite.