- Remote development servers and cloud VMs
- Shared team instances where multiple developers connect from their own browsers
- Headless CI or automation environments
Install
- Linux / macOS
- Windows
- GitHub Releases
Run the one-line installer. It detects your platform and architecture, downloads the latest binary and web assets, and installs them to Install a specific version or to a custom directory:Web assets are placed in
/usr/local/bin by default.The installer requires
sudo only if the target directory (default /usr/local/bin) is not writable by your user. Pass --dir ~/.local/bin to avoid sudo entirely./usr/local/share/codeg/web by default. The installer sets CODEG_STATIC_DIR accordingly in the printed quick-start command.Start the server
Run codeg-server
After installation via the script, the binary is on your If you installed manually or set a custom directory, prefix with the correct
PATH:CODEG_STATIC_DIR:Note the auth token
On first start, Codeg prints a randomly generated token to stderr:Copy this token — you will need it to log in.To use a fixed token across restarts, set
CODEG_TOKEN before starting the server:Open in your browser
Navigate to http://localhost:3080 (or the host and port you configured). Enter your token in the login prompt.
Authentication
Codeg uses token-based authentication. Every request to the server must include a valid token. Login prompt — Enter the token in the web UI when prompted. API requests — Pass the token as a Bearer header:Configuration
Configure Codeg with environment variables. All variables are optional; the defaults work for local use.| Variable | Default | Description |
|---|---|---|
CODEG_PORT | 3080 | HTTP port the server listens on |
CODEG_HOST | 0.0.0.0 | Bind address |
CODEG_TOKEN | (random) | Auth token — printed to stderr on start if not set |
CODEG_DATA_DIR | ~/.local/share/codeg | Directory for the SQLite database and settings |
CODEG_STATIC_DIR | ./web or ./out | Directory containing the Next.js static frontend assets |
Reverse proxy and HTTPS
For production use, place Codeg behind a reverse proxy such as nginx or Caddy to terminate TLS and serve it over a custom domain. Example nginx location block:Upgrade and Connection headers are required for WebSocket connections used by Codeg’s real-time event stream.
Git and SSH
The Codeg server includesgit and ssh for repository operations. You can clone private repositories, commit, and push directly from within the workspace without installing additional tools on the host.