Run Snipet
Snipet is one server plus a Postgres database. Pick how you want to run it.
You need Docker with Compose.
curl -O https://raw.githubusercontent.com/usesnipet/snipet/main/docker-compose.ymldocker compose up -dOpen localhost:8852.
You need Node.js 22 or later, pnpm and Postgres. The repo’s docker-compose.dev.yml can run Postgres for you.
git clone https://github.com/usesnipet/snipet.gitcd snipetcp .env.example .envpnpm installpnpm devEdit .env first if your Postgres isn’t at the default DATABASE_URL. The web app opens at localhost:5173.
Sign in
Section titled “Sign in”On first boot Snipet creates an admin from ROOT_USERNAME and ROOT_PASSWORD (admin by default). Without a password set, a random one is generated and printed once in the server logs.
Configuration
Section titled “Configuration”Set these as environment variables, or in a .env file at the repo root when running from source.
| Variable | Default | What it does |
|---|---|---|
PORT |
8852 |
Port the server listens on. |
DATABASE_URL |
local Postgres | Postgres connection string. |
JWT_SECRET |
insecure default | Signs sign-in and app tokens. At least 32 characters. |
ENCRYPTION_KEY |
insecure default | Encrypts model and plugin credentials: 32 bytes, base64. Changing it makes stored credentials unreadable. |
ROOT_USERNAME, ROOT_PASSWORD |
admin |
First admin, created when there are no users. |
CORS_ORIGINS |
unset | Sites allowed to call the API from a browser, comma-separated. Needed for the chat widget. |
PUBLIC_URL |
http://localhost:$PORT |
URL the server is reached at, used in links to uploaded files. |
PLUGINS_DIR |
built-in | Folder with your own plugin manifests. |
STORAGE_DRIVER |
fs |
Where uploads and debug logs go: fs (a local folder) or s3. |