The Codeg desktop app is a Tauri 2-based native application for macOS, Linux, and Windows. It includes the full web UI embedded in a native window, along with system tray integration, desktop notifications, and auto-update support.Download the installer from the GitHub Releases page. No build step required — download the package for your platform, run the installer, and launch Codeg from your applications folder or start menu.Requirements for end users:
- macOS 11 or later (Apple Silicon and Intel)
- Windows 10 or later (x64)
- Linux with a desktop environment (x64 or arm64); WebKit2GTK 4.1 must be available (pre-installed on most modern Debian/Ubuntu systems)
The desktop app and the standalone server share the same core. Conversations, settings, and project data are stored locally and are compatible across both modes.
Run codeg-server on any Linux, macOS, or Windows machine and access the full Codeg UI from any browser. No desktop environment required.Option 1: One-line install (Linux / macOS)
curl -fsSL https://raw.githubusercontent.com/xintaofei/codeg/main/install.sh | bash
Install a specific version or to a custom directory:curl -fsSL https://raw.githubusercontent.com/xintaofei/codeg/main/install.sh | bash -s -- --version v0.5.2 --dir ~/.local/bin
The installer detects your platform and architecture (x64 or arm64), downloads the matching binary and web assets, and installs them to /usr/local/bin by default.Option 2: One-line install (Windows PowerShell)
irm https://raw.githubusercontent.com/xintaofei/codeg/main/install.ps1 | iex
Install a specific version:.\install.ps1 -Version v0.5.2
The Windows installer places codeg-server.exe in %LOCALAPPDATA%\codeg and adds that directory to your user PATH.Option 3: Download from GitHub releases
Download a pre-built binary directly from the Releases page. Each release includes the server binary and bundled web assets.| Platform | File |
|---|
| Linux x64 | codeg-server-linux-x64.tar.gz |
| Linux arm64 | codeg-server-linux-arm64.tar.gz |
| macOS x64 | codeg-server-darwin-x64.tar.gz |
| macOS arm64 | codeg-server-darwin-arm64.tar.gz |
| Windows x64 | codeg-server-windows-x64.zip |
Extract the archive and run the binary:tar xzf codeg-server-linux-x64.tar.gz
cd codeg-server-linux-x64
CODEG_STATIC_DIR=./web ./codeg-server
Starting the server
The server starts on port 3080 by default. Open http://localhost:3080 in your browser.Configuration
Configure the server with environment variables at startup:HTTP port the server listens on.
Network address the server binds to.
Authentication token. If not set, a random token is generated and printed to stderr on each start. Set this to a fixed value for persistent deployments.
env.CODEG_DATA_DIR
string
default:"~/.local/share/codeg"
Directory where Codeg stores its SQLite database.
env.CODEG_STATIC_DIR
string
default:"./web or ./out"
Path to the Next.js static export directory (the bundled web UI). Set this when running a manually extracted binary.
Example with custom settings:CODEG_PORT=8080 CODEG_TOKEN=my-secret CODEG_DATA_DIR=/var/lib/codeg codeg-server
Authentication
On first start (or whenever CODEG_TOKEN is not set), Codeg prints a randomly generated token to stderr:Auth token: a1b2c3d4e5f6...
Enter this token in the web UI when prompted. For programmatic or API access, pass it as a Bearer token:Authorization: Bearer your-token
WebSocket connections can also authenticate via the token query parameter:ws://localhost:3080/ws?token=your-token
If you expose Codeg on a public network, always set CODEG_TOKEN to a strong, fixed secret. The randomly generated token changes each restart unless explicitly set.
Codeg publishes a multi-stage Docker image built on a slim Debian runtime. It includes git and ssh for repository operations.Docker Compose (recommended)
Create a docker-compose.yml file (or use the one from the repository):services:
codeg:
image: ghcr.io/xintaofei/codeg:latest
ports:
- "3080:3080"
volumes:
- codeg-data:/data
# Mount your project directories (optional):
# - /path/to/projects:/projects
environment:
- CODEG_TOKEN=${CODEG_TOKEN:-}
- CODEG_PORT=3080
- CODEG_HOST=0.0.0.0
restart: unless-stopped
volumes:
codeg-data:
Start the container:Docker run
Run Codeg directly without Compose:docker run -d -p 3080:3080 -v codeg-data:/data ghcr.io/xintaofei/codeg:latest
With a fixed token and mounted project directory:docker run -d -p 3080:3080 \
-v codeg-data:/data \
-v /path/to/projects:/projects \
-e CODEG_TOKEN=your-secret-token \
ghcr.io/xintaofei/codeg:latest
Data persistence
Codeg stores its database and settings in the /data volume inside the container. Mount a named volume (codeg-data:/data) or a host path to preserve your data across container restarts and upgrades.Optionally mount one or more project directories so Codeg can access your local repositories from within the container:-v /home/user/projects:/projects
The /data volume contains the Codeg SQLite database and configuration. Back up this volume before upgrading the container image if you want to preserve your history.
Authentication
If CODEG_TOKEN is not set in the environment, the container prints a randomly generated token to its logs on startup:docker logs <container-id>
Open http://localhost:3080 and paste the token when prompted.