Edit files on your DirectAdmin server directly from Visual Studio Code. This extension uses the modern DirectAdmin REST API and VS Code's FileSystemProvider so remote files feel like local files — no FTP or SFTP required.
Features
- Login — Connect with server URL, username, and password (stored securely via VS Code SecretStorage)
- Import Website — Pick a domain and open its
public_htmlfolder in the workspace - Explorer — Browse domains and files in a dedicated DirectAdmin tree view
- Read / Save — Open files from the server; saving uploads changes automatically
- Refresh — Reload the remote file tree
- Logout — Clear stored credentials
Requirements
- Visual Studio Code 1.85 or newer
- A DirectAdmin server with the modern
/api/...REST API enabled - A user account or login key with file manager access
Getting Started
-
Install dependencies and compile:
npm install npm run compile -
Press F5 in VS Code to launch the Extension Development Host.
-
Run DirectAdmin: Login from the Command Palette (
Ctrl+Shift+P). -
Run DirectAdmin: Import Website and select a domain.
-
Browse and edit files under the imported workspace folder or in the DirectAdmin explorer view.
Commands
| Command | Description |
|---|---|
DirectAdmin: Login |
Connect to your DirectAdmin server |
DirectAdmin: Import Website |
Open a domain's public_html folder |
DirectAdmin: Refresh |
Reload the file tree |
DirectAdmin: Logout |
Disconnect and remove stored credentials |
Right-click items in the DirectAdmin explorer:
| Action | Description |
|---|---|
| New File | Create a new file in a folder (opens in editor) |
| New Folder | Create a new folder on the server |
| Delete | Remove a file or folder (confirmation dialog) |
Settings
| Setting | Default | Description |
|---|---|---|
directadmin.server |
"" |
Default server URL for login |
directadmin.username |
"" |
Default username for login |
directadmin.autoUpload |
true |
Upload files automatically on save |
directadmin.autoRefresh |
true |
Refresh the tree after changes |
API Endpoints Used
This extension communicates exclusively through the modern DirectAdmin REST API:
| Operation | Endpoint |
|---|---|
| Verify session | GET /api/session |
| List domains | GET /api/session/user-config |
| List directory | GET /api/filemanager/list |
| Download file | GET /api/filemanager/download |
| Upload file | POST /api/filemanager-actions/upload |
| Create folder | POST /api/filemanager-actions/mkdir |
| Delete | POST /api/filemanager-actions/remove |
| Rename / move | POST /api/filemanager-actions/move |
Authentication uses HTTP Basic Auth as described in the DirectAdmin API documentation.
Development
npm install
npm run compile # one-off build
npm run watch # watch mode (used by F5 launch)
Security Notes
- Passwords are stored in VS Code SecretStorage, not in settings or workspace files.
- Use a dedicated DirectAdmin login key with restricted permissions for production use.
- Server URLs should use HTTPS.
License
MIT — see LICENSE. Source: github.com/Knuger67/dadmin-live-sync