Repository navigation
Run locally with Node.js
Run Dossier without Docker: build it from source with Node.js, next to a PostgreSQL you install yourself. It takes longer to set up than Docker or Docker Compose, and upgrading means building again.
This runs the production build, the same server the image runs. To work on Dossier's code, with reloading as you edit, see DEVELOPMENT.md.
- Node.js 24. It comes with Corepack, which sets up the Yarn version Dossier uses.
- PostgreSQL 18.
- Git.
- About 2 GB of free memory and 3 GB of disk: the dependencies, the build and the Chromium that prints PDFs.
The commands below are for Ubuntu 24.04 or newer, and work the same in WSL 2 on Windows. On macOS, install Node.js 24 from nodejs.org and PostgreSQL 18 with Postgres.app, then go on from step 2.
Ubuntu's own packages are older than Dossier needs, so add Node.js's and PostgreSQL's repositories first:
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt-get install -y nodejs git
sudo apt-get install -y postgresql-common
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
sudo apt-get install -y postgresql-18node --version should print v24 and something.
Make a user and a database, both named dossier, with a random password. The second line prints the password: keep it for step 4.
DB_PASSWORD=$(openssl rand -hex 24)
echo "$DB_PASSWORD"
sudo -u postgres psql -c "CREATE USER dossier WITH PASSWORD '$DB_PASSWORD'" -c "CREATE DATABASE dossier OWNER dossier"On macOS, open psql from Postgres.app instead and run the two statements, with the printed password in place of $DB_PASSWORD:
CREATE USER dossier WITH PASSWORD '<the password>';
CREATE DATABASE dossier OWNER dossier;Clone the repository and switch to the newest release:
git clone https://github.com/AienTech/dossier.git ~/dossier
cd ~/dossier
git checkout "$(git tag --sort=-v:refname | head -n 1)"Switch on Corepack, then install the dependencies and the Chromium that prints PDFs. On Linux, --with-deps also installs the system libraries and fonts Chromium needs, so it asks for your password; on macOS, leave it out:
sudo corepack enable
yarn install --immutable
yarn playwright-core install --with-deps --only-shell chromiumIf Corepack asks whether to download Yarn, answer yes.
Copy the example settings to .env, which only you may read, and make a folder for nightly backups and zipped PDFs:
cp .env.example .env
chmod 600 .env
mkdir ~/dossier-dataThen make a hash of the password you'll sign in with. Type it twice; the command prints one line that starts with argon2id::
yarn hash-passwordOpen .env in a text editor and set:
-
DOSSIER_PASSWORDto the linehash-passwordprinted. -
DOSSIER_SECRETto 32 or more random characters:openssl rand -base64 32makes some. -
DATABASE_URLtopostgresql://dossier:<the password from step 2>@localhost:5432/dossier. -
DOSSIER_DATA_DIRto the folder you made, as a whole path, such as/home/you/dossier-data(/Users/you/dossier-dataon macOS). It's commented out in the file: remove the#in front. Its default,/data, is meant for the image.
What the variables do: Environment variables in the README. .env.example describes them too.
Set up the database, then build. The build takes a few minutes:
yarn prisma generate
yarn prisma migrate deploy
yarn prisma db seed
yarn build
cp -r public .next/standalone/
cp -r .next/static .next/standalone/.next/migrate deploy creates the tables and db seed loads the built-in themes. The image does both on every start; here you run them after each build. The last two lines copy the pictures and styles next to the server.
HOSTNAME=127.0.0.1 PORT=3000 node .next/standalone/server.jsOpen http://localhost:3000 and sign in with your password. Then pick an AI model in Settings → AI provider (see Choosing an AI provider) and, if you like, a job source in Settings → Job search (see Choosing a job source). With Ollama on the same computer, its address is http://localhost:11434.
HOSTNAME=127.0.0.1 keeps Dossier to your own computer; without it, it also listens on your network. Press Ctrl+C to stop it.
Run these in ~/dossier.
-
Change a setting: the build copies
.envinto.next/standalone, and the server reads that copy. So after editing.env, copy it again, then stop the server and start it as in step 6:cp .env .next/standalone/
-
Back up: export from Settings → Your data; nightly backups go to
DOSSIER_DATA_DIR. Take database dumps too. On macOS, leave outsudo -u postgres:sudo -u postgres pg_dump -Fc dossier > dossier.dumpTo restore a dump, stop the server, run this, and start it again:
sudo -u postgres pg_restore --clean --if-exists -d dossier < dossier.dumpMore in Backups and restore.
-
Upgrade: take an export and a database dump first. Stop the server, fetch the new release and install its dependencies:
git fetch --tags git checkout "$(git tag --sort=-v:refname | head -n 1)" yarn install --immutable yarn playwright-core install --with-deps --only-shell chromiumThen run every command in step 5, and start it as in step 6. The release notes say what else changed; see Upgrading.
-
Something's wrong: the server prints its log in the terminal; see Troubleshooting.
To keep Dossier running on a server without Docker, see Without Docker.
On your own computer
On a server
In the README