Logseq server apps for self-hosting
This is similar in spirit to other Logseq self-hosting repos, but much simpler, with minimal build steps, dependencies, and mount requirements.
It should be easier to understand, modify, and deploy on appliance systems like TrueNAS.
- Log Docker in to your registry. The
Makefileheader shows how for GHCR, using a classic Personal Access Token with thewrite:packagesscope. - Set
REGISTRYin theMakefile. For GHCR, just replacealmkxwith your username. - Build and push using the usage guide at the top of the
Makefile.
GHCR packages are private by default. Make them public if you want them openly available.
Use Docker Compose or your system's UI for custom apps.
These are the minimal requirements, and they assume the default writable (not read-only) image filesystem.
Ports are set by ARG PORT at the top of each Dockerfile: 6001 (sync), 6002 (publish), 6003 (web).
Expose, bind, or reverse proxy them as needed.
- User:
nonroot(UID65532) by default.- If changed, the
datavolume's permissions must match the user. - On TrueNAS, you can use
568, the built-inappsuser.
- If changed, the
- Volume
data: mount at/data, read/write for UID65532(nonroot), or match the image's user if changed.
Required environment variables:
COGNITO_ISSUER=https://cognito-idp.us-east-1.amazonaws.com/us-east-1_dtagLnju8
COGNITO_CLIENT_ID=69cs1lgme7p8kbgld8n5kseii6
COGNITO_JWKS_URL=https://cognito-idp.us-east-1.amazonaws.com/us-east-1_dtagLnju8/.well-known/jwks.jsonIf behind a reverse proxy, also set your public URL:
DB_SYNC_BASE_URL=https://sync.example.com- User:
node(UID1000) by default.- Keep the default, as any other user can't write to
/app/worker.
- Keep the default, as any other user can't write to
- Volume
data: mount at/data, read/write for UID1000(node).
Required environment variables:
COGNITO_ISSUER=https://cognito-idp.us-east-1.amazonaws.com/us-east-1_dtagLnju8
COGNITO_CLIENT_ID=69cs1lgme7p8kbgld8n5kseii6
COGNITO_JWKS_URL=https://cognito-idp.us-east-1.amazonaws.com/us-east-1_dtagLnju8/.well-known/jwks.jsonNo special setup.