Skip to main content
Stashy auto-detects the database driver from the DB_DSN connection string.

Supported Databases

DSN prefixDatabase
file:stashy.dbSQLite (default)
postgres://user:pass@host/dbPostgreSQL
mysql://user:pass@tcp(host)/dbMySQL

SQLite (Default)

Zero-config — just works out of the box:
DB_DSN=file:stashy.db  # default
Good for single-instance deployments. The file is created automatically.

PostgreSQL

DB_DSN=postgres://stashy:secret@localhost:5432/stashy?sslmode=disable
Recommended for production multi-instance setups.

MySQL

DB_DSN=mysql://stashy:secret@tcp(localhost:3306)/stashy

Migrations

Migrations are managed by goose. Run them with:
stashy migrate              # run migrations and exit
stashy serve --migrate      # run migrations then start server
Always run migrations before starting a new version of Stashy.