Running on PlanetScale

PlanetScale is a MySQL-compatible serverless database platform powered by Vitess.

Setup

  1. Follow Install documentation up to "Configure umami" section.

  2. Create a database on PlanetScale called umami-db and copy the DATABASE_URL string from "Connect" > "Connect with Prisma" > ".env" tab.

  3. Add the DATABASE_URL to your .env file:

    DATABASE_URL=mysql://username:password@host/umami-db?sslaccept=strict
    
  4. Run yarn run build-db && yarn run update-db

  5. Visit the umami-db dashboard and make sure the Tables are created and then promote it to production if you want.

  6. You should now be able to build and start Umami (yarn build followed by yarn start).

  7. Follow the Getting started guide starting from the Login step and be sure to change the default password.

Troubleshooting

If are getting an error like the following example:

PrismaClientInitializationError: Can't reach database server at `host.aws-region.psdb.cloud`:`3306`

You can try add a connection timeout query parameter on your DATABASE_URL:

DATABASE_URL=mysql://username:password@host/umami-db?sslaccept=strict&connect_timeout=300