This repository contains a Docker image for running the TiddlyPWA sync server. It uses the official Deno runtime and provides a simple way to run the sync server with environment variable configuration.
-
Generate your admin password hash and salt using Docker (no local Deno installation required):
docker run --rm denoland/deno:latest run https://codeberg.org/valpackett/tiddlypwa/raw/branch/release/server/hash-admin-password.ts
-
Run the container with the required environment variables:
docker run -d \ --name tiddlypwa-sync \ -p 8000:8000 \ -v $(pwd)/data:/app/data \ -e ADMIN_PASSWORD_HASH=your_generated_hash \ -e ADMIN_PASSWORD_SALT=your_generated_salt \ -e DB_PATH=/app/data/pwa.db \ tanc/tiddlypwa-sync-server
The following environment variables must be set for the server to function:
ADMIN_PASSWORD_HASH
: Hash of the admin password (generated in step 1)ADMIN_PASSWORD_SALT
: Salt used for the password hash (generated in step 1)DB_PATH
: Path to the SQLite database file (recommended: /app/data/pwa.db)
PORT
: Server port (default: 8000)HOST
: Server host (default: 0.0.0.0)BASEPATH
: Base path when running behind a reverse proxy
It's recommended to run this behind a reverse proxy with TLS support. Example Caddy configuration:
wiki.example.com {
reverse_proxy localhost:8000
}
docker build -t tiddlypwa-sync-server .
This repository includes GitHub Actions workflows to:
- Build the Docker image
- Push to Docker Hub on new tags and main branch updates
To use the GitHub Actions:
- Fork this repository
- Add your Docker Hub credentials as secrets:
DOCKERHUB_USERNAME
DOCKERHUB_TOKEN
- Push a tag (e.g.,
v1.0.0
) to trigger a release build