Featured image of post Affine Incorrect config

Affine Incorrect config

I have switched from Obsidian to Affine, and during tinkering with settings, I have used invalid config of r2 storage, which caused my application to go to crash loop.

It is fixable with following steps:

  1. We will temporarily open ports to DB by going to docker-compose.yml and add ports section to database container.
1
2
3
4
5
6
7
8
  postgres:
    image: pgvector/pgvector:pg16
    container_name: affine_postgres
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    ports:
      - 5432:5432
...
  1. Restart with docker compose up -d --force-recreate
  2. n local PC, download any SQL client, I will use Beekeeper Studio . Affine uses Postgres, so we will Connect to DB with variables in .env and db type of postgreSQL
  3. Find app_configs table, and edit the table which causes error.