Self-Hosted Deployment
Run the entire Project Nexus stack on your own infrastructure.
Stack​
For a fully self-hosted deployment you need to host:
| Service | Recommended Option |
|---|---|
| Next.js Web App | Vercel, Railway, Render, Docker |
| Supabase (DB + Auth) | Self-hosted Supabase (Docker) |
Option A: Docker + Local Supabase​
Suitable for home servers, VPS instances, or air-gapped environments.
Prerequisites​
- A VPS or server with Docker and Docker Compose.
- A domain name (optional but recommended for auth redirects).
Steps​
-
Set up local Supabase — See Local Supabase Setup. Run the same steps on your server.
-
Clone the repository on your server:
git clone https://github.com/MAX-786/project-nexus.git
cd project-nexus -
Configure
.env.localwith your self-hosted Supabase URLs. -
Build the Next.js app:
pnpm install
pnpm build -
Start the production server:
cd apps/web
pnpm startOr add it as a
systemdservice or run it behind an Nginx reverse proxy.
Option B: Railway / Render​
Both Railway and Render support Next.js monorepos with minimal configuration:
- Connect your GitHub repository.
- Set the root directory to
apps/weband the build command tocd ../.. && pnpm install && pnpm --filter web build. - Add the required environment variables.
- Deploy.
Environment Variables for Production​
See the full Environment Variables Reference. Key variables for production:
NEXT_PUBLIC_SUPABASE_URL=https://your-supabase-instance.com
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
NEXT_PUBLIC_SITE_URL=https://your-domain.com