Configuration

Environment Variables

Most important server configurations can directly be defined with env variables. If you have scaffolded your project using the npm init or pnpm create method, you can define these variables in the .env file.

Variable Description Default Value
DATABASE_URL (*) Prisma Database Connection String.
PORT Port used for the web server. 3000
NP_RUNTIME_PATH Path to the folder with the Nitropage runtime files. ./src/runtime
NP_AUTH_SALT Salt used for storing hashed passwords in the database. ...
NP_AUTH_PASSWORD Password used for cookie encryption (must be >= 32 characters). ...
NP_AUTH_COOKIE_MAXAGE Maximum age for Nitropage admin login cookies. 86400
NP_FILESYSTEM_S3_ENDPOINT IP or host of the S3 endpoint.
NP_FILESYSTEM_S3_PORT Port of the S3 endpoint. 443 / 80
NP_FILESYSTEM_S3_SSL Enable if the endpoint uses HTTPS. 1
NP_FILESYSTEM_S3_ACCESS_KEY S3 endpoint access key.
NP_FILESYSTEM_S3_SECRET_KEY S3 endpoint secret key.
NP_FILESYSTEM_S3_PUBLIC_URL Accessible public url (if the endpoint is behind a firewall).
NP_FILESYSTEM_S3_PUBLIC_BUCKET Bucket name for public, downloadable files. public
NP_FILESYSTEM_S3_PRIVATE_BUCKET Bucket name for privte, protected files. private
VITE_NP_DEMO Build with Demo mode (disabled projects and uploads). 0