From source
Use this path when you do not want to run containers. For a development environment with hot reload and seeded users, see Development setup instead.
1. Clone the repository
Section titled “1. Clone the repository”git clone https://codefloe.com/flexcal/flexcal.gitcd flexcalOn Windows, clone from Git Bash with admin privileges so symlinks are created:
git clone -c core.symlinks=true https://codefloe.com/flexcal/flexcal.git2. Install dependencies
Section titled “2. Install dependencies”bun installBun is the only supported package manager. npm, yarn and pnpm are not.
3. Configure the environment
Section titled “3. Configure the environment”cp .env.example .envcp .env.appStore.example .env.appStoreGenerate the two mandatory secrets:
# NEXTAUTH_SECRETopenssl rand -base64 32# CALENDSO_ENCRYPTION_KEY, must be 32 bytes for AES256openssl rand -base64 24Point DATABASE_URL at your PostgreSQL instance and copy the same value into .env.appStore:
DATABASE_URL='postgresql://<user>:<pass>@<db-host>:<db-port>/<db-name>'Set NEXT_PUBLIC_WEBAPP_URL to the public URL of the instance, with no trailing slash.
See Configuration for the rest.
4. Apply the database schema
Section titled “4. Apply the database schema”The schema lives in packages/prisma/schema.prisma.
bun run --cwd packages/prisma db-deploydb-deploy applies existing migrations and never generates new ones, which is what you want in production.
db-migrate is the development counterpart and can drop data.
5. Build and start
Section titled “5. Build and start”bun run buildbun run start6. Create the first user
Section titled “6. Create the first user”Open the instance in a browser. The setup wizard creates the first user with the ADMIN role.
It only works while the User table is empty.
Alternatively, use Prisma Studio:
bun run db-studioOpen the User model, add a record with email, username, a
BCrypt-hashed password, and metadata set to {}.
Cron jobs
Section titled “Cron jobs”A few features depend on scheduled requests to the endpoints under apps/web/app/api/cron.
Wire these up with whatever scheduler your platform provides (systemd timers, Kubernetes CronJobs,
or a platform feature such as Vercel Cron).
Reverse proxies and other platforms
Section titled “Reverse proxies and other platforms”flexcal is a plain Next.js application, so generic Next.js guidance applies to reverse proxies, TLS termination and hosting platforms. See Troubleshooting for the proxy header settings that matter to NextAuth.