{"record":{"id":"906f63013b36ef74","repo":"ory/hydra","slug":"the-dsn-connection-string-looks-like-a-sqlite-conn","errorCode":null,"errorMessage":"The DSN connection string looks like a SQLite connection, but SQLite support was not built into the binary. Please check if you have downloaded the correct binary or are using the correct Docker Image. Binary archives and Docker Images indicate SQLite support by appending the -sqlite suffix.","messagePattern":"The DSN connection string looks like a SQLite connection, but SQLite support was not built into the binary\\. Please check if you have downloaded the correct binary or are using the correct Docker Image\\. Binary archives and Docker Images indicate SQLite support by appending the -sqlite suffix\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"driver/registry.go","lineNumber":57,"sourceCode":"\tx.RegistryCookieStore\n\tclient.Registry\n\tconsent.Registry\n\tjwk.Registry\n\ttrust.Registry\n\toauth2.Registry\n\totelx.Provider\n\tx.NetworkProvider\n\n\tkratos.Provider\n\n\tfosite.Transactional\n}\n\nfunc newRegistryWithoutInit(c *config.DefaultProvider, l *logrusx.Logger) (*RegistrySQL, error) {\n\tscheme, _, _ := strings.Cut(c.DSN(), \"://\")\n\tif !pop.DialectSupported(pop.CanonicalDialect(scheme)) {\n\t\tif dbal.IsSQLite(c.DSN()) {\n\t\t\treturn nil, errors.New(\"The DSN connection string looks like a SQLite connection, but SQLite support was not built into the binary. Please check if you have downloaded the correct binary or are using the correct Docker Image. Binary archives and Docker Images indicate SQLite support by appending the -sqlite suffix.\")\n\t\t}\n\t\treturn nil, errors.New(\"unsupported DSN type\")\n\t}\n\n\treturn &RegistrySQL{\n\t\tl:           l,\n\t\tconf:        c,\n\t\tinitialPing: defaultInitialPing,\n\t}, nil\n}\n\nfunc callRegistry(ctx context.Context, r *RegistrySQL) {\n\tr.ClientValidator()\n\tr.ClientManager()\n\tr.ClientHasher()\n\tr.ConsentManager()\n\tr.ConsentStrategy()\n\tr.KeyManager()","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/ory/hydra/blob/4174065ffb052799890f7480f5360a877a67ffc1/driver/registry.go#L39-L75","documentation":"newRegistryWithoutInit inspects the DSN's scheme and checks whether pop (the ORM) supports that dialect. When the scheme looks like SQLite (dbal.IsSQLite matches) but the binary was compiled without SQLite support (no `-sqlite` build tag), it returns this explanatory error instead of a generic failure.","triggerScenarios":"Starting Hydra (driver.New) with a DSN like `sqlite://foo.db` or `file:foo.db` while the binary/Docker image was built without the sqlite build tag — e.g. the standard `oryd/hydra` image (non-sqlite variant).","commonSituations":"Using the default oryd/hydra Docker image for local development with sqlite; downloading the plain binary release instead of the -sqlite one; following an old tutorial that predates the image split.","solutions":["Use a DSN for a fully supported database (postgres, mysql, cockroach) matching your deployment","Download/build a binary or Docker image with the -sqlite suffix for local development, e.g. oryd/hydra:-sqlite variant or build with the sqlite build tag","Set the DSN via ORY_HYDRA_DSN to the correct database URL"],"exampleFix":"// before (docker run)\n-e DSN=sqlite:///var/lib/sqlite/db.sqlite\n// after (postgres)\n-e DSN=postgres://user:pass@host:5432/hydra?sslmode=disable","handlingStrategy":"validation","validationCode":"func dsnSupportsBinary(dsn string) error {\n    if strings.HasPrefix(dsn, \"sqlite\") || strings.HasPrefix(dsn, \"file:\") {\n        if !sqliteBuildTagEnabled {\n            return errors.New(\"this binary lacks sqlite support; use the -sqlite image/binary or a postgres/mysql DSN\")\n        }\n    }\n    return nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Match the DSN dialect to the image/binary variant you deploy","Use -sqlite tagged images only for local development","Document the required DSN per environment"],"tags":["database","sqlite","dsn","hydra"],"backgroundTag":"sqlite-not-supported","analyzedSha":"4174065ffb052799890f7480f5360a877a67ffc1","analyzedAt":"2026-09-03T14:52:41.581Z","contentChangedAt":"2026-09-03T14:52:41.581Z","schemaVersion":2},"datasetVersion":"2026-09-10T17:17:09.494Z"}