cpgit home

From server to first repository.

One package installs the Git service and its browser console. Start with a fresh Linux server, check the plan, then install.

Preview build. The GUI and installer pass local checks; fresh-host installation, real email delivery and public HTTPS still need target verification.

Before you start

  • Linux with systemd, Git, OpenSSH server and Python 3.11 or newer.
  • A domain pointing to your server, with ports 80 and 443 available.
  • An empty, dedicated ext4 or XFS block filesystem, already mounted at a path such as /srv/cpgit. A regular directory is insufficient.
  • An SMTP relay for emailed sign-in codes, and your administrator email address.

The installer checks prerequisites but does not install OS packages, prepare disks or change DNS. It refuses existing installations and service accounts.

1. Get the package

This preview provides a Linux x86-64 build, built on Ubuntu 26.04. Use a matching architecture and compatible libc, or build from source on your target system.

Copy both files to the server. From their directory:

sha256sum -c cpgit-0.1.0-linux-x86_64.tar.gz.sha256
mkdir cpgit
tar -xzf cpgit-0.1.0-linux-x86_64.tar.gz -C cpgit
cd cpgit

2. Configure email

Create a private SMTP configuration from the included example:

sudo install -m 600 config/mail.example.toml /root/cpgit-mail.toml
sudoedit /root/cpgit-mail.toml

Fill in your SMTP server, sender and credentials. The default uses required STARTTLS on port 587; verified implicit TLS on port 465 is also supported. Keep this file private.

3. Review and install

Replace the example domain, email and mounted data path. Check the read-only plan first:

sudo python3 install.py --plan \
  --data-root /srv/cpgit \
  --domain git.example.com \
  --admin-email you@example.com \
  --mail-config /root/cpgit-mail.toml

When the plan passes and DNS and ports are ready, install with the same values:

sudo python3 install.py --apply --acme-production \
  --data-root /srv/cpgit \
  --domain git.example.com \
  --admin-email you@example.com \
  --mail-config /root/cpgit-mail.toml

--apply creates OS identities, configuration and services. --acme-production requests a trusted certificate and accepts the certificate authority’s terms. Omitting that flag uses ACME staging certificates, which browsers do not trust.

Open the console

Visit your configured HTTPS domain and sign in with the administrator email you supplied. Enter the emailed code, create a repository, add your personal SSH public key, and copy the clone URL.

Git SSH uses port 2222 by default. Administrative SSH is preserved. Choose another unused Git port with --ssh-port.

Already using an HTTPS reverse proxy?

Add --mode proxy --http-port 8080 to both installer commands and omit --acme-production. Forward your existing HTTPS proxy to 127.0.0.1:8080 and preserve the original Host. The public browser address stays HTTPS.

Already running cpgit?

This installer is for fresh hosts. Existing installations need an upgrade that preserves identities, repository storage and SSH configuration. Follow the browser upgrade guide in the package’s docs/web.md.