Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Instance Setup

There are a few ways to set up a Convinator instance, but by far the easiest method is to use docker-compose.

Docker compose setup

For this setup, you need to create 3 files: a docker compose file, environment file, and Convinator configuration.

# ./docker-compose.yml
name: convinator

volumes:
  pg_data:

services:
  database:
    image: postgres:18
    restart: unless-stopped
    shm_size: 128mb
    environment:
      POSTGRES_DB: 'convinator'
      POSTGRES_USER: 'convinator'
      POSTGRES_PASSWORD: '${DATABASE_PASSWORD}'
      TZ: utc
    volumes:
      - pg_data:/var/lib/postgresql
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready', '-U', 'convinator', '-d', 'convinator']
      interval: 30s
      timeout: 60s
      retries: 5
      start_period: 80s

  convinator:
    image: codeberg.org/borisnl/convinator
    restart: unless-stopped
    ports:
      - '3000:3000'
    volumes:
      - ./convinator.toml:/data/convinator.toml:ro
      - ./uploads:/data/uploads
    env_file: .env
    depends_on:
      database:
        condition: service_healthy

For the environment file, you need to generate 2 secrets: database password, and JWT secret. You can do this using the terminal like this:

openssl rand -hex 32
# ./.env
DATABASE_PASSWORD=your-generated-secret
CONVI_JWT_SECRET=other-generated-secret
CONVI_DATABASE_URL="postgres://convinator:${DATABASE_PASSWORD}@database:5342/convinator"

Finally the Convinator configuration. For more info on this file, see the configuration docs.

# ./convinator.toml
[storage]
adapter = "fs"

[storage.fs]
base_dir = "uploads"

[link_embeds]
enabled = true
allowed_urls = ["https://*"]

After creating these files, you are ready to start the instance!

docker compose up -d

Now your instance should be running on localhost:3000.