Skip to main content

Tutorial Intro

Let's discover Nym in less than 5 minutes.

Getting Started

Get started by creating a new site.

Or try Nym immediately by joining a server with

What you'll need

  • Node.js version 16.14 or above:
    • When installing Node.js, you are recommended to check all checkboxes related to dependencies.

App Domain structure

The system will consist of 3 different apps hosted separately.

Admin site

Administrative app to manage your admin account and registered site(s).


Site setup & Mult-tenant

Next, set up your site: (e.g: https://{user-subdomain} or any parked domain)

This is for registered users and sites to show contents and manage contents.

Hello World!

Configure your environment

Environment values (.env)

  • NODE_ENV (production|development)
  • VERCEL_ENV (production|preview|development) Set automatically
  • NEXT_PUBLIC_VERCEL_ENV (production|preview|development) Set automatically
  • VERCEL_URL (https://{nym-xyz} Set automatically
  • NEXT_PUBLIC_VERCEL_URL (https://{nym-xyz} Set automatically









Prisma and PlanetScale

A good resource to understand Prisma and its Shadow DB

  • DATABASE_URL (mysql://user:password@host:port/database)
  • SHADOW_DATABASE_URL (Only required for local env where we run migration commands)


  • TWITTER_API_KEY Use Twitter API Key
  • TWITTER_API_SECRET Use Twitter API Secret

Setting up DB for development environment

Using PlanetScale

  1. Login to
  2. Create a DB.
  3. Copy the connection string for the DB, and set it to the .env file variables. (See PlanetScale Doc)
  4. Run migration yarn prisma migrate dev

Migrating DB (PScale and Prisma)

During Development

  1. Edit prisma/schema.prisma
  2. Format the schema doc
yarn prisma format
  1. Migrate dev db
# Check the changes in the current schema (prisma/schema.prisma)
# and generate migration file, push to DB.
yarn prisma migrate dev

For Production Deployment

  • On PlanetScale, Configure main branch as a production branch
  • Create a dev branch from main branch
  • Make sure you connect to the dev branch only, not to the main branch directly.
  • When you want to deploy changes from dev to main, go to and create deployment request from dev branch to main branch.

Running the development server

cd my-website
yarn start

The cd command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.

The yarn start command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.