Installation & Quickstart
Prerequisites
Section titled “Prerequisites”- Node.js 24 or later
- Basic comfort with the command line
Installation
Section titled “Installation”curl -sSL https://releases.itskod.com/install.sh | bashgit clone https://github.com/mikaelvesavuori/kod.gitcd kodnpm installnpm run build# Binary is at dist/kod.mjsVerify the installation:
kod --versionQuickstart
Section titled “Quickstart”-
Start the server
Start Kod with an admin token. This token is used for all administrative operations.
Terminal window KOD_ADMIN_TOKEN=kod_my_secret_token kod serveYou can also pass it as a flag:
Terminal window kod serve --admin-token kod_my_secret_tokenThe server starts on
http://localhost:3000by default. -
Configure the CLI
In a new terminal, run
kod initto set up the client:Terminal window kod init# Server URL: http://localhost:3000# API Token: kod_my_secret_tokenThis saves your configuration to
~/.kod/config.json. -
Create a repository
Terminal window kod repo create my-project -
Clone and push code
The easiest way is with
kod clone, which handles authentication automatically:Terminal window kod clone my-projectcd my-projectecho "# My Project" > README.mdgit add . && git commit -m "Initial commit"git push origin mainPlain
git clonealso works. If you installed Kod globally,kod initconfigures a Git credential helper so authentication is automatic:Terminal window git clone http://localhost:3000/repos/my-project.gitIf the credential helper is not installed, Git will prompt for credentials. Use any username (e.g.
git) and your API token as the password. -
Add a workflow (optional)
Create
.kod/workflows/build.tomlin your repository:[step:test]run: npm test[step:build]run: npm run buildPush again, and Kod will automatically run the workflow.
VM Deployment
Section titled “VM Deployment”To deploy Kod on a VPS (DigitalOcean, Scaleway, Hetzner, etc.):
# Install Kodcurl -sSL https://releases.itskod.com/install.sh | bash
# Create a systemd servicesudo tee /etc/systemd/system/kod.service > /dev/null <<EOF[Unit]Description=Kod Git ServerAfter=network.target
[Service]Type=simpleUser=kodEnvironment="KOD_ADMIN_TOKEN=kod_your_secret_token"Environment="KOD_ENCRYPTION_KEY=your-encryption-key"ExecStart=/usr/local/bin/kod serve --port 3000Restart=always
[Install]WantedBy=multi-user.targetEOF
sudo systemctl enable kodsudo systemctl start koddocker run -d \ -e KOD_ADMIN_TOKEN=kod_your_secret_token \ -e KOD_ENCRYPTION_KEY=your-encryption-key \ -v kod-data:/root/.kod \ -p 3000:3000 \ node:24-slim \ kod serveNext Steps
Section titled “Next Steps”- Configuration — Environment variables, CLI flags, and deployment options
- Workflows — Automate builds, tests, and deployments
- Secrets — Store encrypted secrets for your workflows
- CLI Reference — All available commands
- API Reference — HTTP API endpoints