LIVEReading: Run Civitai's Model-Sharing Platform on Your Own MachineTotal time: 18 minSteps: 6Worked first time: 45% LIVEReading: Run Civitai's Model-Sharing Platform on Your Own MachineTotal time: 18 minSteps: 6Worked first time: 45%
CBW
Run Civitai's Model-Sharing Platform on Your Own Machine
Spicygithub.com/civitai/civitai2026-07-16

Run Civitai's Model-Sharing Platform on Your Own Machine

Spin up a local copy of the Civitai model-sharing platform — the same site used to share Stable Diffusion models, LoRAs, and textual inversions. Runs entirely on your machine via Docker and Node.

// Build stats

  • Total time18 min
  • Number of steps6
  • DifficultySpicy
  • Worked first time45%
// Before you start

What you need

  • A Mac, Linux, or Windows machine (Windows users must use WSL2)
  • Docker Desktop installed and running
  • Node.js v20 or later installed (use nvm if unsure)
  • Make installed (comes with Mac/Linux; Windows users install via WSL)
  • Git installed
  • At least 8 GB of free disk space for Docker images and the database
01
Step 1 of 6

Install nvm and Node.js 20

3 min

nvm lets you install and switch between Node.js versions without breaking anything else on your machine. The project requires Node 20. Run the two commands below — the first installs nvm, the second installs and activates Node 20.

Terminal · mac
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash && source ~/.bashrc && nvm install 20 && nvm use 20
What you should see
Now using node v20.x.x (npm v10.x.x)
This might happen

source ~/.bashrc has no effect if you use zsh

Run source ~/.zshrc instead, or close and reopen your terminal

02
Step 2 of 6

Clone the repository

2 min

This downloads the full Civitai source code to a folder called 'civitai' on your machine. Windows users: run this inside WSL, not in a regular Windows terminal, or you will hit severe performance problems.

Terminal · mac
$ git clone https://github.com/civitai/civitai.git && cd civitai
What you should see
Cloning into 'civitai'... done.
This might happen

Windows users who clone outside WSL will see extremely slow Docker file performance

Open a WSL terminal (Ubuntu app or similar) and run the clone command from there

03
Step 3 of 6

Run the automated setup

10-20 min

The make init command does everything in one shot: creates a starter config file, installs all JavaScript packages, starts the Postgres database and other services in Docker, runs database migrations, and seeds the database with dummy data. This is the longest step — Docker needs to download several images the first time.

Terminal · mac
$ make init
What you should see
You should see Docker pulling images, then database migrations running, then a message that the server has started. The terminal will stay active.
This might happen

Error: command not found for a tool inside node_modules

Run: export PATH="$PATH:$(realpath node_modules/.bin)" and then retry make init

04
Step 4 of 6

Add MinIO storage keys to your config

5 min

The app stores uploaded images and files in MinIO, a local S3-compatible storage service that Docker is already running. You need to generate an access key inside MinIO's web UI and paste it into the .env.development config file. Open MinIO at http://localhost:9000, log in with username minioadmin and password minioadmin, click 'Access Keys', then 'Create Access Key'. Copy the Key and Secret shown.

Terminal · mac
$ nano .env.development
What you should see
The .env.development file opens in your terminal editor. Find the lines S3_UPLOAD_KEY, S3_UPLOAD_SECRET, S3_IMAGE_UPLOAD_KEY, and S3_IMAGE_UPLOAD_SECRET and paste your copied values. Also set WEBHOOK_TOKEN to any random string (e.g. mysecrettoken123). Set EMAIL_USER, EMAIL_PASS, and EMAIL_FROM to any placeholder values (e.g. test@example.com). Save with Ctrl+O then Ctrl+X.
This might happen

nano is not installed on your system

Use any text editor — open the file at civitai/.env.development in VS Code, Notepad, or TextEdit

05
Step 5 of 6

Update git submodules and start the dev server

3 min

The project uses git submodules for some shared code. This command fetches them. Then you start the development server. If make init already left the server running, stop it first with Ctrl+C, then run these two commands.

Terminal · mac
$ git submodule update --recursive && npm run dev
What you should see
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
This might happen

Port 3000 is already in use

Find and stop whatever is using port 3000, or check if make init already started the server in another terminal tab

06
Step 6 of 6

Create your account and visit the site

2 min

Open http://localhost:3000 in your browser. Click Sign Up and create an account. Because this is a local dev environment, confirmation emails are not sent to a real inbox — they are captured by a local mail tool called Maildev. To see your confirmation email, open http://localhost:1080 in your browser.

Terminal · mac
$ open http://localhost:3000 && open http://localhost:1080
What you should see
The Civitai homepage loads in your browser. The Maildev inbox at localhost:1080 shows any registration emails.
This might happen

open command not found on Linux

Just type the URLs manually into your browser: http://localhost:3000 and http://localhost:1080

// Status

cooked. baked. worked.

A fully working local copy of the Civitai website running at http://localhost:3000, with a Postgres database, file storage, and seed data — ready for you to browse, create an account, and explore the codebase.

// the honest bit

The honest part

This is a large, complex production web app — not a simple tool. Several features will not work locally by design: AI generation/training (Orchestration), real-time chat and notifications (Signals), and the Buzz credit system all require Civitai's private internal infrastructure. Expect occasional rough edges during setup; the project's Discord is the best place to report issues. Windows users must use WSL2 or they will face serious performance problems. This guide is for exploration and development only — running this as a public site requires significant additional infrastructure (Cloudflare, production Postgres, S3, etc.).