Self-hosting

Keeping your office's messages and files on a server of your own, while people, invites and sign-in stay at zirc.dev.

A self-hosted office keeps what people say and share on a server of its own. Everything else stays at zirc.dev, as for an office zirc hosts: you invite people there, they sign in there, and zirc.dev carries push notifications to their phones without being able to read them. It's in preview. This page says how to set one up.

Kept on your serverStays at zirc.dev
Messages and historyPeople, invites and sign-in
Files people sharePeople's pictures
Its accounts, secrets and certificateBilling, and the relay for push notifications

The zirc server container

Zirc's own server, zirc-server, is open source. It runs Ergo and Zirc's sidecar together in one container, configured as Zirc's hosted servers are. To start one:

  1. Open ports 80, 443 and 6697 to the internet: 80 for its certificate, 443 for zirc.dev and the apps, and 6697 for IRC.
  2. Make the office at zirc.dev, On my own server, with your server's host name. That gives a join token, shown once.
  3. Fill in the compose file: your host name, an email address and the token.
  4. Start it: docker compose up -d. It gets its TLS certificate from Let's Encrypt and renews it, or runs behind a proxy of your own that ends TLS, and joins the office on its first start.

What you then have:

  • People as on zirc.dev. You invite them at zirc.dev by email, and they sign in with zirc login and the apps as for any office. Each app signs in with a key that never leaves it, which your server checks itself, so chat keeps working while zirc.dev is down.
  • Content straight from your server. Apps read history from your server with a short token from zirc.dev, so conversations never pass through it.
  • Files on your server. What people share in chat is uploaded to your server and kept on its disk, or in an S3 bucket of your own, never at zirc.dev, by the settings on your office's Files page. Images are resized for each screen by imgproxy, and videos made ready to play by Zirc's media worker, both running beside it. People's pictures stay at zirc.dev.
  • Everything in one place. History, files, accounts, its secrets and its certificate are in one data directory: back up that, and you've backed up the server.

Its code, its compose file and what each setting does are in github.com/zircd/zirc. The compose file runs two images from GitHub's registry: ghcr.io/zircd/zirc-server, for amd64 and arm64 machines, and ghcr.io/zircd/zirc-media, which resizes images and makes video ready to play, for amd64. The server runs without the second, serving images as sent.

Without zirc.dev

Any Ergo server with its history kept works with the zirc CLI and zircd, with no zirc.dev account, as free software:

zirc init --server irc.example.com

Then run zircd in a terminal tab of its own, and leave it open:

zircd

Later, zircd can run at login instead.

Everything then works as on zirc.dev except what goes through zirc.dev itself: zirc login, zirc log, push notifications and the web client at zirc.dev/chat. See Plain IRC for the ports, nick and flags.

What to expect

  • zirc.dev stays in the picture. People, invites and sign-in are zirc.dev's. A new device's sign-in needs zirc.dev; chat, history and search on devices already signed in don't.
  • Push needs zirc.dev up. While zirc.dev is down, push stops and people see new messages when they open the app.
  • Support. The level of support for servers you run yourself is decided once there are real customers. Self-hosting is free for now.
  • No end-to-end encryption. Moving the server moves the trust to your operators, which is the point; it doesn't hide messages from them.