Production config and first deployment of the Default Server

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
docker, github-actions, yaml

Research direction

Start by checking the Tinfoil configuration fields and release workflows against the linked template and Tinfoil docs, then review server ADR-0001 and ADR-0002. Add the production config, release workflows, and operator runbook, then follow the deployment steps and verify the acceptance criteria, including measurement publishing, Client lifecycle checks, and self-hosting instructions.

Written by the indexing model from the issue text.

Description

ready-for-human

What to build

The production Config Repo for the Default Server, and its first real deployment. This repo must stay public and holds no secrets: everything in it is measured and published. See server ADR-0001 (passphrase unlock), ADR-0002 (Setup Code hash) and ADR-0003 (how the Server uses the Volume).

Updated after the spikes:

  • The release workflows are already merged (freedomofpress/switchboard-deploy#3).
  • The Volume's owner and the container's user must both be 1000:1000, matching the image's USER. Only the Volume's owner can use the control socket, so if these don't match, the Server can't Claim or Unlock.
  • The shim only routes listed paths (others return 404) and doesn't set DOMAIN.

Repo contents:

  • tinfoil-config.yml (draft below; check field names against Tinfoil's docs and the tinfoilsh/tinfoil-containers-template repo).
  • Tinfoil's release workflows tinfoil-release.yml and tinfoil-release-publish.yml (already merged).
  • A README runbook for operators and self-hosters.
cvm-version: <from template>
cpus: 2
memory: 8192
volumes:
  - name: data            # no key-secret: unlocked at runtime (server ADR-0001)
    owner: "1000:1000"     # must match the container's user (server ADR-0003)
containers:
  - name: switchboard
    image: ghcr.io/freedomofpress/switchboard-server@sha256:<digest>
    user: "1000:1000"
    env:
      - PORT: "8080"
      - DATA_DIR: "/data"
      - VOLUME_NAME: "data"
      - SETUP_CODE_SHA256: "<hex sha256 of the Setup Code>"
    persistent_volumes:
      - data:/data
    read_only: true
    tmpfs:
      - /tmp
    restart: unless-stopped
shim:
  upstream-port: 8080
  paths:
    - /api/*

No outbound network access in v1 (signal-cli will need it later).

First deployment:

  1. Generate a Setup Code on a trusted machine (e.g. openssl rand -base64 32), put printf %s "$CODE" | sha256sum in SETUP_CODE_SHA256, keep the code offline.
  2. Give Tinfoil read-only GHCR credentials for the private image.
  3. Release with gh workflow run tinfoil-release.yml -f version=vX.Y.Z.
  4. Create a volume (tinfoil volume create switchboard-data --size <N>GB --host <HOST>; size is fixed and counts against the storage tier) and deploy with --volume switchboard-data:data and the custom domain.
  5. Add the domain's two CNAMEs, with Cloudflare proxying off.
  6. From a release-build Client, verify Attestation. The new Server shows as Locked; choose "Claim this Server" and enter the Setup Code. Store the Unlock Passphrase securely and share it with every Superadmin. Invite a second Superadmin.

Releasing updates: tag the server, copy the new digest into image: via PR, run the release workflow, update the instance. The Server restarts Locked and must be unlocked from the Client.

Self-hosting: fork this repo, use your own Setup Code hash, Tinfoil account, volume and domain, then use "Use a different server" in the Client with your domain and fork. Self-hosting only works once the server image or source is public.

Acceptance criteria

  • tinfoil-config.yml is committed with the Volume owner and container user set to 1000:1000, and a release publishes a measurement
  • The Default Server is deployed on its custom domain with an encrypted volume
  • From a release-build Client: Claim, restart, unlock, and the full user-management lifecycle work against it
  • The README documents first deployment, updates and self-hosting

This was written by an LLM.

Dominant language
No language data
Stars
0
Forks
0
Avg merge
1m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.