Skip to content
Preview. LawFive's code and server image aren't public yet, so some steps here won't work until they are.

Install a server

These steps give you a working server on port 3000. You can try it on localhost straight away. To use it from phones and watches, carry on to Set up HTTPS afterward.

This is the way to run a real server.

  1. Make a folder on the Docker host, and put these two files from the repository in it: compose.yaml, and .env.example saved as .env.

  2. Make a secret. It signs sign-in sessions, and has to be at least 32 characters.

    Terminal window
    openssl rand -base64 32
  3. Edit .env. Set AUTH_SECRET to that secret, and choose the image and a database password:

    .env
    LAWFIVE_IMAGE=ghcr.io/roachwork/lawfive:latest
    AUTH_SECRET=the-secret-you-just-made
    POSTGRES_PASSWORD=a-password-of-your-own
  4. Start it:

    Terminal window
    docker compose pull
    docker compose up -d
  5. Read the setup code from the logs:

    Terminal window
    docker compose logs server
  6. Open http://localhost:3000, or the machine’s address, and follow the setup wizard.

Tag What it is
latest The newest build from main
sha-<commit> The build of one commit
A version A tagged release, from a v* tag

To build the image yourself, clone the repository and work from its root:

Terminal window
cp .env.example .env # then set AUTH_SECRET
docker compose up -d --build
docker compose logs server

Leave LAWFIVE_IMAGE unset. An image you build this way shows its version as dev unless you pass --build-arg LAWFIVE_VERSION=… --build-arg LAWFIVE_COMMIT=….

To look around with sample data, with no database or Docker, see the demo server.