Ga naar inhoud

Je bekijkt de previewversie van de documentatiesiteDe inhoud hier dient om te testen en kan afwijken van de live documentatie.

Ga naar live documentatie

Upgrading to v0.23.0

Deze inhoud is nog niet beschikbaar in uw taal.

v0.23.0 is a maintenance release that converts the main config file (etc/config.yaml) from symbol keys to string keys. This is part of a series of changes preparing for the v0.24.0 release.

  1. Back up your configuration files. Especially etc/config.yaml and any custom .env files.
  2. Back up your Redis data. redis-cli BGSAVE or equivalent.

The app will halt on boot if it detects the old config format. You have three options for handling the migration.

Set the CONFIG_MIGRATE=auto environment variable. The migration runs automatically before the app starts.

Terminal window
docker run -p 3000:3000 \
-e SECRET=$SECRET \
-e REDIS_URL=redis://your-redis-host:6379/0 \
-e CONFIG_MIGRATE=auto \
-v $(pwd)/etc/config.yaml:/app/etc/config.yaml \
onetimesecret/onetimesecret:v0.23.0

Run the migration script yourself before starting the app:

Terminal window
bundle exec ruby migrations/20250727-1523_01_convert_symbol_keys.rb --dry-run

Review the output, then apply:

Terminal window
bundle exec ruby migrations/20250727-1523_01_convert_symbol_keys.rb --run

Set CONFIG_MIGRATE=skip to bypass the migration check. The app will attempt to start with the old config format, which may cause unexpected behavior.

The migration converts YAML keys in etc/config.yaml from Ruby symbol format (:key) to plain string format (key). No values are changed — only the key syntax is updated. The migration script creates a backup of your original file before making changes.

If you start the app without setting CONFIG_MIGRATE, you’ll see this:

INFO: Running entrypoint.sh...
ERROR: Migrations needed before startup
Pending migrations:
bundle exec ruby migrations/20250727-1523_01_convert_symbol_keys.rb --dry-run
Options:
1. Auto-migrate: Restart with CONFIG_MIGRATE=auto
2. Manual: Run each migration with --run flag
3. Skip: Set CONFIG_MIGRATE=skip (not recommended)

After starting, confirm everything is working:

  • Create a secret, retrieve it
  • If authentication is enabled: sign in, sign out
  • Check logs for any warnings about config format

If you run into issues not covered here, please open an issue on GitHub.