Nâng cao và xử lý sự cố
PIN và owner, biểu tượng khay, Preferences, chất lượng khi mạng yếu, truy cập từ xa, dòng lệnh, xử lý sự cố và cập nhật.
PIN, owner và quản trị
- Rotate (mặc định): sau mỗi lần pair thành công, SwiftDesk sinh PIN mới, mỗi PIN chỉ dùng được một lần.
- Fixed: giữ nguyên PIN tới khi bạn đổi, giống AnyDesk. Đặt PIN trong giao diện là chuyển sang Fixed.
- Owner: thiết bị pair đầu tiên là owner. Owner có nút Manage host trong app và web client: xem và đổi PIN, đổi chế độ, đổi vai trò thiết bị, thu hồi thiết bị, đọc nhật ký. Thiết bị thường không làm được những việc này. Pair lại bằng PIN luôn hạ về vai trò user.
- Ask me before anyone connects: bật trên chính máy host (menu khay hoặc cửa sổ SwiftDesk). Khi có thiết bị không phải owner kết nối, người ngồi ở máy host bấm Accept hoặc Decline trong cửa sổ SwiftDesk; sau 30 giây không trả lời thì tự từ chối. Việc duyệt không làm từ app của owner.
- Pause new connections: từ chối mọi kết nối mới, phiên đang mở vẫn giữ.
- Thu hồi thiết bị từ khay, cửa sổ SwiftDesk, app của owner hoặc cloud: phiên đang mở của thiết bị đó bị ngắt ngay, lần sau phải nhập PIN.
- Nhật ký: mọi lần pair, kết nối, thu hồi, đổi PIN, nhận file đều ghi vào
audit.log cạnh host.json.
- Chống dò PIN: 5 lần sai từ một IP thì khóa IP đó 60 giây; 30 lần sai trong 10 phút từ mọi IP thì khóa pairing, và đổi PIN nếu đang ở chế độ Rotate.
Biểu tượng khay
Trên Windows, màu biểu tượng: xanh dương là rảnh, xanh lá là đang có người điều khiển, xám có dấu tạm dừng là tạm dừng nhận kết nối. Trên Mac, biểu tượng đơn sắc theo màu thanh menu: màn hình viền là rảnh, màn hình tô đặc là có người kết nối, dấu tạm dừng là tạm dừng. Mỗi khi có thiết bị kết nối, hệ điều hành hiện thông báo.
- Bấm chuột trái: mở cửa sổ SwiftDesk: Your address và PIN ở trên, các tab This computer (đang kết nối, thiết bị đã pair, duyệt kết nối, nhật ký), Connect to another computer và Preferences.
- Bấm chuột phải (trên Mac: Ctrl-click): mở menu, trong đó có Address và PIN, bấm để copy.
| Mục menu | Tác dụng |
| Danh sách đang kết nối | Disconnect từng thiết bị hoặc Disconnect all |
| Address · PIN | Bấm để copy địa chỉ (ưu tiên IP Tailscale) hoặc PIN |
| Rotate / Fixed · New random PIN | Đổi chế độ PIN, sinh PIN ngẫu nhiên |
| Ask me before anyone connects | Hỏi người ở máy host trước khi cho thiết bị không phải owner vào |
| Pause new connections | Tạm dừng nhận kết nối mới |
| ⚠ (chỉ trên Mac) | Hiện khi thiếu quyền ghi màn hình; bấm để mở đúng trang cài đặt |
| Open SwiftDesk… | Mở cửa sổ SwiftDesk |
| Connect to… | Mở tab Connect to another computer để điều khiển máy khác |
| Check for updates… · Update available | Kiểm tra bản mới; khi có bản mới, bấm để cài |
| Start at login · Cloud · Quit | Tự chạy khi đăng nhập, trạng thái SwiftDesk Cloud, thoát |
Preferences
Tab Preferences trong cửa sổ SwiftDesk có năm nhóm: General, Security, Display & quality, Cloud và Updates. Phần lớn thay đổi áp dụng ngay; mục cần khởi động lại được đánh dấu “restart required”. Nếu SwiftDesk được chạy kèm cờ dòng lệnh, mục tương ứng bị khóa vì cờ dòng lệnh luôn được ưu tiên.
- Advertise on the network: tắt để máy này không hiện khi người khác dùng Scan network.
- Use the native viewer (faster): dùng trình xem native khi mở máy SwiftDesk khác.
- Updates: kênh cập nhật, tự kiểm tra, tự cài, và quay lại bản trước. Xem Cập nhật.
Chất lượng và mạng yếu
- Mặc định: tối đa 60 fps, trần 8 Mbps, encode phần cứng. Màn hình đứng yên gần như không tốn băng thông.
- Nút Quality: Low 2 Mbps (4G yếu), Normal 8, High 20 (xem video). Đây là trần; SwiftDesk vẫn tự hạ khi mạng không đủ.
- Phiên mới bắt đầu ở mức vừa phải rồi tăng nhanh lên trần khi mạng cho phép, nên lúc mới kết nối không bị nghẽn.
- Khi băng thông xuống dưới khoảng 3,5 Mbps, SwiftDesk giảm độ phân giải còn 75 %, tối đa 45 fps. Dưới 1,5 Mbps còn 50 %, tối đa 30 fps. Sàn là 500 kbps, chữ vẫn đọc được.
- Client hiện thông báo dạng “Network limited: … kbps, 75 % resolution, 45 fps”. Khi mạng khá lên, SwiftDesk nâng dần lại, khoảng 5 giây một bước.
- Âm thanh Opus có FEC; mất gói vẫn nghe liền. Hình vỡ lâu thì bấm Sharpen.
- Mượt nhất khi dùng Wi-Fi 5 GHz hoặc dây, và Tailscale có đường thẳng (
tailscale status không ghi “relay”).
SwiftDesk giữ hình mượt thế nào
- Kiểm soát nghẽn mạng: client báo thời điểm nhận từng gói, SwiftDesk ước lượng băng thông thật và chỉnh bitrate ngay ở khung kế tiếp.
- FlexFEC và gửi lại gói: gói sửa lỗi đi kèm theo tỉ lệ mất gói đo được (bằng 0 khi mạng sạch); gói mất được gửi lại khi client xin.
- Rate control theo từng khung: SwiftDesk tự chọn mức nén cho mỗi khung, nên gõ phím tốn rất ít, và chất lượng hồi lại khi màn hình yên.
- Làm nét không mất mát: vùng đứng yên khoảng 200 ms được gửi lại đúng từng pixel và vẽ đè lên video.
Truy cập từ xa và phạm vi mạng
SwiftDesk ưu tiên LAN và Tailscale. Máy chỉ nhận kết nối trong phạm vi đã chọn, kết nối ngoài phạm vi bị từ chối trước cả bước PIN:
| --network | Ai được kết nối |
lan (mặc định) | Mạng LAN riêng và Tailscale |
tailnet | Chỉ Tailscale. Nên dùng khi máy ở mạng công cộng |
any | Mọi nơi. Không khuyến nghị |
Muốn điều khiển máy ở nhà khi đang ở ngoài: cài Tailscale trên cả hai thiết bị, đăng nhập cùng tài khoản, rồi dùng địa chỉ Tailscale của máy. Không mở cổng 7340 ra internet.
SwiftDesk Cloud (tùy chọn)
- Đăng nhập bằng passkey, hoặc bằng mã 6 số từ ứng dụng xác thực (Google Authenticator, Microsoft Authenticator, 1Password, Bitwarden…) kèm mã khôi phục dùng một lần. Tài khoản mới chỉ qua lời mời.
- Thấy mọi máy của mình, đổi PIN và thu hồi thiết bị từ xa, mời người nhà.
- Đồng bộ danh bạ giữa các thiết bị, mật khẩu được mã hóa đầu cuối bằng sync passphrase.
- Các máy trong cùng tài khoản có thể mở nhau không cần PIN nếu bạn bật trong dashboard; mỗi lần kết nối được ghi vào nhật ký của cả hai máy.
- Relay bước bắt tay khi hai máy không thấy nhau trực tiếp. Hình và tiếng vẫn mã hóa đầu cuối giữa hai máy.
Dòng lệnh
Bên trong, SwiftDesk chạy file swiftdesk-host; bạn hiếm khi cần tới nó vì Preferences đã có các tùy chọn này. Các cờ hay dùng:
| Cờ | Ý nghĩa |
--pin 123456 | Đặt PIN cố định (chuyển sang Fixed) |
--name "Office PC" | Tên hiển thị trên client |
--port 7340 | Cổng nghe HTTP và WebSocket |
--network lan|tailnet|any | Phạm vi được kết nối |
--fps 60, --bitrate-kbps 8000 | Trần fps và bitrate |
--screen 1 | Màn hình chia sẻ lúc khởi động |
--no-audio | Không chia sẻ âm thanh |
--tray | Chạy với biểu tượng khay |
--list-clients, --revoke <id> | Liệt kê và thu hồi thiết bị đã pair |
--install-autostart, --uninstall-autostart | Bật hoặc tắt tự chạy khi đăng nhập |
--check-update, --rollback-update | Kiểm tra bản mới (không cài) · Quay lại bản trước |
Xử lý sự cố
| Triệu chứng | Cách xử lý |
| Kết nối được nhưng màn hình đen (Mac) | Thiếu quyền ghi màn hình cho SwiftDesk. Làm lại bước 2 trên Mac; nếu vẫn đen, xem Bật rồi mà vẫn không chạy. Log /tmp/swiftdesk-host.log ghi “declined TCCs”. |
| Màn hình đen (Windows) | Phiên đang khóa, ở màn hình đăng nhập/UAC, hoặc bạn vừa ngắt RDP. Đăng nhập lại vào máy; SwiftDesk tự nối lại. |
| Laptop Windows gập màn hình | Vẫn hoạt động nhờ chụp GDI; có thể kém mượt hơn. Mở màn hình ra để dùng lại đường GPU. |
| Mac không nhận chuột/phím | Thiếu quyền Accessibility cho SwiftDesk (bước 3 trên Mac). |
| “wrong PIN or expired pairing” | Kiểm tra PIN trong cửa sổ SwiftDesk của đúng máy. Ở chế độ Rotate, PIN đã đổi sau lần pair trước. Thiết bị bị thu hồi phải nhập PIN lại. |
| “too many failed attempts” | Chờ 1 phút rồi thử lại. |
| Mở bằng cửa sổ có sẵn thay vì trình xem native | Trình xem native chưa pair với máy đó. Kết nối một lần trong cửa sổ có sẵn; lần sau trình xem native được dùng. |
| App Android báo lỗi khi rớt mạng | Bấm Thử lại. Web client và trình xem native tự kết nối lại. |
| Cảnh báo chứng chỉ RDP đã thay đổi | Có thể do Windows vừa cài lại hoặc gia hạn chứng chỉ, nhưng cũng có thể có người chặn giữa đường. Đừng tiếp tục nếu bạn không biết lý do. |
| AI Terminal báo không có quyền | Thiết bị chưa là owner. Trên máy host: cửa sổ SwiftDesk → Paired devices → Make owner. |
| AI Terminal không mở qua cloud | Chưa hỗ trợ qua relay của cloud. Kết nối trực tiếp trong LAN hoặc Tailscale. |
| Không kết nối được | Hai máy có cùng LAN/tailnet không? Mở http://<máy>:7340/api/info xem có trả JSON. Kiểm tra Windows Firewall đã cho phép. Kiểm tra phạm vi --network. |
| Đang chờ mãi | Máy kia có thể đang bật “Ask me before anyone connects”: người ngồi ở máy đó cần bấm Accept trong cửa sổ SwiftDesk (tự từ chối sau 30 giây). |
| Hình vỡ, giật | Bấm Sharpen; xem chấm chất lượng mạng; hạ Quality; dùng Wi-Fi 5 GHz hoặc dây. |
| Không có tiếng | Máy kia chạy với --no-audio? Trình duyệt chặn autoplay: bấm Mute rồi bỏ Mute. |
| Clipboard không sang | Chỉ owner nhận clipboard từ máy kia. Trình duyệt chỉ ghi clipboard khi tab đang focus. |
| Bấm Connect không phản ứng (trình duyệt) | Tải lại mạnh trang (Ctrl/Cmd+Shift+R) để lấy web client mới. |
| Không thấy biểu tượng khay (Windows 11) | Mở mũi tên ^ trên taskbar, kéo biểu tượng SwiftDesk ra ngoài. |
Cập nhật
SwiftDesk kiểm tra bản mới mỗi 6 giờ (hoặc khi bạn bấm Check for updates…). Mỗi bản cập nhật có chữ ký Ed25519 và mã SHA-256; bản không khớp bị từ chối và ghi vào nhật ký. SwiftDesk không bao giờ tự hạ phiên bản.
- Windows: khi có bản mới, bấm Update available trên menu khay; SwiftDesk cài ngầm rồi tự chạy lại. Hoặc chạy lại bộ cài, hay lệnh PowerShell một dòng.
- macOS: SwiftDesk mở Installer và hỏi mật khẩu máy; từ bản 0.12.1 quyền được giữ nguyên.
- Android: cài APK mới đè lên bản cũ.
- Web client nằm trong SwiftDesk: cập nhật máy đó là có web client mới.
Trong Preferences → Updates: chọn kênh (stable hoặc beta), bật hoặc tắt tự kiểm tra (mặc định bật) và tự cài (mặc định tắt; khi bật, SwiftDesk chỉ cài lúc không ai đang kết nối). Trên Windows, nút Roll back quay về bản trước.
Advanced and troubleshooting
PIN and owner, the tray icon, Preferences, quality on weak networks, remote access, the command line, troubleshooting and updates.
PIN, owner and admin
- Rotate (default): a new PIN after every successful pairing, so each PIN works once.
- Fixed: the PIN stays until you change it, AnyDesk style. Setting a PIN in the UI switches to Fixed.
- Owner: the first device that pairs. It gets Manage host in the app and web client: view and change the PIN and mode, change device roles, revoke devices, read the audit log. Other devices cannot do this. Re-pairing with the PIN always drops to the user role.
- Ask me before anyone connects: turned on at the host computer itself (tray menu or SwiftDesk window). When a non-owner device connects, the person at the host presses Accept or Decline in the SwiftDesk window; with no answer it is declined after 30 seconds. Approval is not done from the owner's app.
- Pause new connections: refuse new sessions, keep the open ones.
- Revoke from the tray, the SwiftDesk window, the owner app or the cloud: that device's live sessions end at once and it must enter the PIN again.
- Audit log: every pairing, connection, revocation, PIN change and received file goes to
audit.log next to host.json.
- Brute-force protection: 5 failures from one IP lock it out for 60 seconds; 30 failures from any IP within 10 minutes lock pairing and rotate the PIN in Rotate mode.
Tray icon
On Windows the icon is blue when idle, green while someone is connected and grey with pause bars when paused. On a Mac the menu-bar icon is monochrome and follows the menu-bar colour: an outlined screen when idle, a filled screen while someone is connected, pause bars when paused. A notification appears whenever a device connects.
- Left-click: opens the SwiftDesk window: Your address and PIN at the top, then the This computer tab (connected now, paired devices, approvals, audit log), Connect to another computer and Preferences.
- Right-click (Ctrl-click on a Mac): opens the menu, which shows Address and PIN; click either to copy.
| Menu item | What it does |
| Connected devices | Disconnect one device or Disconnect all |
| Address · PIN | Click to copy the address (Tailscale IP first) or the PIN |
| Rotate / Fixed · New random PIN | Change the PIN mode, generate a random PIN |
| Ask me before anyone connects | Ask the person at the host before a non-owner device gets in |
| Pause new connections | Stop accepting new sessions |
| ⚠ (Mac only) | Shown while Screen Recording is missing; click it to open the right settings page |
| Open SwiftDesk… | Open the SwiftDesk window |
| Connect to… | Open the Connect to another computer tab to control another machine |
| Check for updates… · Update available | Check for a new version; when one is out, click to install it |
| Start at login · Cloud · Quit | Autostart, SwiftDesk Cloud status, quit |
Preferences
The Preferences tab in the SwiftDesk window has five groups: General, Security, Display & quality, Cloud and Updates. Most changes apply at once; the ones that need a restart are marked “restart required”. When SwiftDesk was started with command-line flags, the matching fields are locked, because flags always win.
- Advertise on the network: turn it off so this computer does not show up when others use Scan network.
- Use the native viewer (faster): use the native viewer when opening other SwiftDesk computers.
- Updates: channel, automatic checks, automatic install and roll back. See Updating.
Quality and weak networks
- Defaults: up to 60 fps, 8 Mbps ceiling, hardware encode. A static screen costs almost no bandwidth.
- The Quality button: Low 2 Mbps (weak 4G), Normal 8, High 20 (video). It is a ceiling; SwiftDesk still lowers it when the link cannot keep up.
- A new session starts at a moderate rate and climbs quickly to the ceiling when the network allows, so the first seconds do not choke the link.
- Below about 3.5 Mbps SwiftDesk drops to 75 % resolution, up to 45 fps; below 1.5 Mbps to 50 %, up to 30 fps. The floor is 500 kbps, where text stays readable.
- The client shows “Network limited: … kbps, 75 % resolution, 45 fps”. When the link recovers SwiftDesk steps back up, about one step every 5 seconds.
- Opus audio carries FEC, so it keeps playing through packet loss. If the picture stays broken, press Sharpen.
- Smoothest on 5 GHz Wi-Fi or Ethernet, and a direct Tailscale path (
tailscale status does not say “relay”).
How SwiftDesk keeps the picture moving
- Congestion control: the client reports when each packet arrived; SwiftDesk estimates the real bandwidth and changes the bitrate on the next frame.
- FlexFEC and retransmission: repair packets follow the measured loss (zero on a clean link); lost packets are resent when the client asks.
- Per-frame rate control: SwiftDesk picks the compression for every frame, so typing costs very little and quality comes back once the screen is quiet.
- Lossless refinement: regions that stay still for about 200 ms are resent pixel-exact and drawn over the video.
Remote access and network scope
SwiftDesk is LAN and Tailscale first. It only accepts peers inside the chosen scope; others are refused before the PIN check:
| --network | Who may connect |
lan (default) | Private LAN ranges and Tailscale |
tailnet | Tailscale only. Use it on public Wi-Fi |
any | Everyone. Not recommended |
To reach your home computer while away: install Tailscale on both devices with the same account and use the computer's Tailscale address. Do not expose port 7340 to the internet.
SwiftDesk Cloud (optional)
- Sign in with a passkey, or with a 6-digit code from an authenticator app (Google Authenticator, Microsoft Authenticator, 1Password, Bitwarden…) plus single-use recovery codes. New accounts are by invitation only.
- See all your computers, change PINs and revoke devices remotely, invite family members.
- Sync your address book across devices, with passwords end-to-end encrypted by a sync passphrase.
- Computers on the same account can open each other without a PIN when you allow it in the dashboard; every such connection is logged on both computers.
- Relay the handshake when the two machines cannot see each other directly. Video and audio stay end-to-end encrypted between the two.
Command line
Under the hood SwiftDesk runs the swiftdesk-host binary; you rarely need it because Preferences covers these options. Common flags:
| Flag | Meaning |
--pin 123456 | Set a fixed PIN (switches to Fixed) |
--name "Office PC" | Name shown in clients |
--port 7340 | HTTP and WebSocket port |
--network lan|tailnet|any | Who may connect |
--fps 60, --bitrate-kbps 8000 | fps and bitrate ceilings |
--screen 1 | Display shared at start |
--no-audio | Do not share audio |
--tray | Run with the tray icon |
--list-clients, --revoke <id> | List and revoke paired devices |
--install-autostart, --uninstall-autostart | Start at login on or off |
--check-update, --rollback-update | Check for a new version (no install) · Go back to the previous version |
Troubleshooting
| Symptom | Fix |
| Connected but black screen (Mac) | Screen Recording is missing for SwiftDesk. Repeat step 2 on the Mac; if it stays black, see Switched on but still not working. The log /tmp/swiftdesk-host.log says “declined TCCs”. |
| Black screen (Windows) | The session is locked, at sign-in/UAC, or you just disconnected RDP. Sign back in; SwiftDesk reconnects. |
| Windows laptop lid closed | Works through GDI capture, possibly less smooth. Open the lid to return to the GPU path. |
| Mac ignores mouse/keyboard | Accessibility is missing for SwiftDesk (step 3 on the Mac). |
| “wrong PIN or expired pairing” | Check the PIN in the SwiftDesk window of the right computer. In Rotate mode the PIN changed after the last pairing. Revoked devices must enter the PIN again. |
| “too many failed attempts” | Wait one minute and retry. |
| Opened in the built-in window instead of the native viewer | The native viewer is not paired with that computer yet. Connect once in the built-in window; next time the native viewer is used. |
| The Android app shows an error after a drop | Press Retry. The web client and the native viewer reconnect by themselves. |
| RDP warns that the certificate changed | It may be a reinstalled Windows or a renewed certificate, but it can also mean someone is intercepting the connection. Do not continue unless you know why. |
| AI Terminal says not allowed | The device is not an owner. On the host: SwiftDesk window → Paired devices → Make owner. |
| AI Terminal does not open through the cloud | Not supported through the cloud relay yet. Connect directly over LAN or Tailscale. |
| Cannot connect | Are both on the same LAN/tailnet? Open http://<computer>:7340/api/info and check it returns JSON. Check Windows Firewall allowed it, and the --network scope. |
| Stuck waiting | The other computer may have “Ask me before anyone connects” on: the person there must press Accept in the SwiftDesk window (declined after 30 seconds). |
| Blocky or stuttering picture | Press Sharpen; check the network-quality dot; lower Quality; use 5 GHz Wi-Fi or Ethernet. |
| No sound | Is the other computer running with --no-audio? The browser may block autoplay: toggle Mute off and on. |
| Clipboard does not arrive | Only owners receive the other computer's clipboard. Browsers only write the clipboard while the tab has focus. |
| Connect does nothing (browser) | Hard-reload the page (Ctrl/Cmd+Shift+R) to get the latest web client. |
| No tray icon (Windows 11) | Open the ^ arrow on the taskbar and drag the SwiftDesk icon out. |
Updating
SwiftDesk checks for new versions every 6 hours (or when you click Check for updates…). Every update carries an Ed25519 signature and a SHA-256; anything that does not match is refused and written to the audit log. SwiftDesk never downgrades on its own.
- Windows: when a new version is out, click Update available in the tray menu; SwiftDesk installs silently and starts again. Or rerun the installer or the PowerShell line.
- macOS: SwiftDesk opens Installer and asks for your password; from 0.12.1 the permissions are kept.
- Android: install the new APK over the old one.
- The web client ships inside SwiftDesk: update that computer and the web client updates too.
In Preferences → Updates: pick the channel (stable or beta), turn automatic checks on or off (on by default) and automatic install (off by default; when on, SwiftDesk installs only while nobody is connected). On Windows, Roll back returns to the previous version.