Quick start
Run SlugBase locally for development or get a minimal production instance running quickly.
What you need
- Node.js compatible with the project (the production container images use Node 20).
- npm (workspace install at the repository root).
- For the fastest production tryout: Docker (see Docker or Docker Compose).
New to deployment? After this page, follow Docker Compose, Configuration, and First run setup for a complete path.
Steps
Clone the repository
Clone the SlugBase repository and open the project root in a terminal.
Install dependencies
npm install
Create a local `.env`
Before the backend can start, copy the repository template to .env at the project root (this tree ships .env.example; some checkouts use example.env for the same role). The server runs environment validation on every startup: JWT_SECRET and ENCRYPTION_KEY are required in development and production, not only when NODE_ENV=production. See Configuration for the full list and how to generate safe values.
Start dev servers
npm run dev
This runs the backend and frontend together. By default you get:
- Backend API:
http://localhost:5000 - Frontend dev server:
http://localhost:3000
Complete initial setup in the browser
With a fresh database, the app shows Initial Setup so you can create the first admin user. Continue with First run setup for field requirements and what happens next.
Build the app
From the repository root:
npm run build
Set required secrets
Before npm run start, define production secrets and URLs. The server validates JWT_SECRET, ENCRYPTION_KEY, and (in production) SESSION_SECRET. See Configuration for the full list and safe values.
Start the self-hosted server
npm run start
The combined API and built frontend are served from the self-hosted app entrypoint (default port 5000).
Open the app and finish setup
Visit your server URL, complete Initial Setup, then sign in. Use First run setup as the checklist.
Use the shipped Docker workflow
Build or pull an image, map port 5000, persist /app/data for SQLite, and pass environment variables (including secrets). The repository documents this in Docker and Docker Compose.
Verify health
The container health check expects HTTP 200 from /api/health inside the container.
Verify
| Goal | Check |
|---|---|
| Dev API up | Open http://localhost:5000/api/health (or your configured host) and confirm a successful response. |
| Dev UI | Load the frontend URL from Vite (default http://localhost:3000) and reach Initial Setup or login. |
| Production | Load your public origin; after setup you should reach the dashboard at /. |
Troubleshooting
Related
Last updated 2 days ago
Built with Documentation.AI