This guide walks you through setting up the personal website from scratch: cloning, environment variables, first run, and verifying the dashboard.
- Docker and Docker Compose installed (e.g. on Ubuntu:
sudo apt install docker.io docker-compose-plugin) - Git
- (Optional) A domain and HTTPS reverse proxy (e.g. Nginx Proxy Manager) for production
git clone <your-repo-url> personal-website
cd personal-website-
Copy the example file:
cp .env.example .env
-
Edit
.envwith your values. Minimum required:- Database:
POSTGRES_PASSWORD(choose a strong password) - RustFS:
RUSTFS_ROOT_PASSWORD - Auth:
ADMIN_PASSWORD(dashboard login),NEXTAUTH_SECRET(generate:openssl rand -base64 32) - URLs: For local:
NEXTAUTH_URL=http://localhost:3000,NEXT_PUBLIC_SITE_URL=http://localhost:3000. For production: use your public HTTPS URL (e.g.https://yourdomain.com) - S3 (RustFS):
S3_ACCESS_KEYandS3_SECRET_KEY(you can use the same asRUSTFS_ROOT_USERandRUSTFS_ROOT_PASSWORDfor simplicity),S3_BUCKET=uploads - Contact form: Either Resend (
RESEND_API_KEY,RESEND_FROM_EMAIL) or SMTP variables, andCONTACT_EMAIL(recipient)
- Database:
Full reference: ENVIRONMENT.md.
Example for local development:
POSTGRES_USER=ben
POSTGRES_PASSWORD=myDbPassword123
POSTGRES_DB=blog
RUSTFS_ROOT_USER=rustfsadmin
RUSTFS_ROOT_PASSWORD=myRustfsPassword123
ADMIN_PASSWORD=admin123
NEXTAUTH_SECRET=run-openssl-rand-base64-32-to-generate
NEXTAUTH_URL=http://localhost:3000
NEXT_PUBLIC_SITE_URL=http://localhost:3000
S3_ACCESS_KEY=rustfsadmin
S3_SECRET_KEY=myRustfsPassword123
S3_BUCKET=uploads
CONTACT_EMAIL=you@example.com
RESEND_API_KEY=re_xxxx
RESEND_FROM_EMAIL=onboarding@resend.devImportant: Never commit .env to Git. It is listed in .gitignore.
From the project root:
docker compose up -d --buildThis builds the Next.js app and starts three containers:
- postgres – PostgreSQL 15 (port 5432)
- rustfs – S3-compatible object storage (ports 9000 API, 9001 Console)
- app – Next.js app (port 3000)
Wait until all containers are healthy (about 30–60 seconds). Check:
docker compose psAll services should show as “healthy” or “running”.
Migrations must run inside the app container so they use the same DATABASE_URL as the running app.
Option A – script (recommended):
./scripts/migrate.shOption B – manual:
docker compose exec app npx prisma migrate deployVerify:
docker compose exec app npx prisma migrate statusYou should see “Database schema is up to date.”
- Open http://localhost:3000 (or your server IP and port if remote).
- Go to http://localhost:3000/dashboard.
- Log in with the password you set for
ADMIN_PASSWORD.
On first visit, you may be redirected to the setup wizard (site name, logo, navigation, footer). You can complete it or skip and configure everything later under Content → Site settings.
To manage buckets and objects via the web UI:
- Open http://localhost:9001 (RustFS Console).
- Log in with
RUSTFS_ROOT_USERandRUSTFS_ROOT_PASSWORD. - The app creates the
uploadsbucket on first upload; you can also create it manually.
- Usually means the database schema is not up to date. Run migrations again:
or
./scripts/migrate.sh
docker compose exec app npx prisma migrate deploy, then reload the page.
- Do not run
npx prisma migrate deployon the host unless you have setDATABASE_URLin.envto point to a running Postgres (e.g.localhost:5432). Prefer running migrations inside the app container (see Step 4).
- Check logs:
docker compose logs app,docker compose logs postgres,docker compose logs rustfs. - Ensure
.envhas all required variables and no typos (see ENVIRONMENT.md). - For RustFS, ensure ports 9000 and 9001 are free; wait for the health check to pass (start period ~30s).
- If using Resend: verify
RESEND_API_KEYandRESEND_FROM_EMAIL; ensure the sender domain is verified in Resend. - If using SMTP (Gmail): use an App Password, not your normal password, and set
SMTP_*variables.
- Content: Use the dashboard to add posts, edit Home/About/Contact, and create custom pages. See DASHBOARD_USER_GUIDE.md.
- Production: Set
NEXTAUTH_URLandNEXT_PUBLIC_SITE_URLto your HTTPS domain; put a reverse proxy (e.g. Nginx Proxy Manager) in front of port 3000. See DEPLOYMENT.md. - CI/CD: CI (build on PR) is ready; CD (auto-deploy on push) is documented in DEPLOYMENT.md and can be configured when your server and SSH are ready.