Dohub Dohub Docs

Người dùng

Quản lý server (workspace)

Tạo, chỉnh sửa, bật, tắt và xóa server — từ template hoặc form thủ công.

Server (workspace) là một Helm release codehub trên Kubernetes: container chính (thường code-server), ingress riêng, optional sidecar (monitor, backup, wstunnel).

My servers

Luồng tổng quan

  1. Create server — lưu cấu hình vào DB (pod chưa chạy).
  2. Start — Helm install/upgrade, tạo pod + ingress.
  3. Stop — gỡ release, giữ cấu hình.
  4. Edit — chỉ khi server offline.
  5. Delete — xóa workspace và release (nếu có).

Tạo từ Quick template

  1. Tab My serversCreate server.
  2. Phần Quick templates: click một template (Lollipop, Oreo, …) để điền sẵn CPU, RAM, GPU, image, mounts.
  3. Kiểm tra lại form bên dưới, nhấn Create server.

Tạo thủ công — từng trường

Modal create server
TrườngMô tả
Server nameTên hiển thị; slug dùng cho URL và release name.
Service domainChỉ hiện nếu group có quyền custom domain. Hostname ingress tùy chỉnh; để trống dùng {slug}-{user}.{DOMAIN}.
CPU (vCPU)Request CPU; limit ≈ 1.5× (theo chart).
RAMVí dụ 4G, 8G.
Nodeauto hoặc pin pod lên hostname cụ thể.
Mount drivesChọn drive + mount path (mặc định /home/coder). Nhiều drive: + Add drive.
Mount filesFile nhỏ → ConfigMap mount (tên file, path, nội dung).
GPUnone hoặc profile HAMi (ví dụ mig-2g.10gb, gpu, gpu:2).
Privileged containerCheckbox nếu group cho phép — securityContext.privileged.
Docker imageCombobox tìm image đã đăng ký / catalog.
Version (tag)Tag image (ví dụ 4.89.0-ubuntu).
Image pull policyIfNotPresent, Always, Never.
Exposed portsPort HTTP chính + phụ, phân tách dấu phẩy (mặc định 8080).
Container commandOverride CMD; để trống dùng mặc định image.
Environment variablesKEY + value, Add / Update. Hỗ trợ value dài (textarea).
Chi tiết form

Panel Current specifications tóm tắt cấu hình; Export JSON tải file cấu hình.

Chỉnh sửa server

  1. Stop server trước (bắt buộc).
  2. Mở card server hoặc modal → Edit (hoặc mở lại Create server ở chế độ edit).
  3. Thay đổi trường → Save changes.
Edit server

Start / Stop

Start Stop
  • Start — triển khai pod; URL workspace xuất hiện sau khi Running.
  • Stophelm uninstall; dữ liệu trên PVC drive vẫn giữ.

Xóa server

  1. Nên Stop trước (khuyến nghị).
  2. Icon Delete trên card → gõ deleteDelete.
Delete server

Bulk create server

Bulk create server — JSON/CSV nhiều server; tùy chọn Start servers after create.

[{"name":"docs-demo-ws","cpu":2,"ram":"4G","drive_mounts":[{"drive_id":"<uuid>","mount_path":"/home/coder"}],"docker_repository":"codercom/code-server","docker_tag":"4.89.0-ubuntu"}]
Quan trọng: Không chỉnh sửa/xóa server production. Demo: tạo docs-demo-* rồi xóa ngay.