Documentation

Getting Started & Deployment

Deploy TypeDock via zero-touch Docker, standalone HTTP binary, or Apache FastCGI on Linux and FreeBSD shared hosting.

TypeDock ships as a single static Go binary (CGO_ENABLED=0) alongside drop-in public/, themes/, and plugins/ directories. The same binary runs in three modes:

  1. Docker (Zero-Touch Container) — Environment-driven bootstrap, ready immediately on first boot.
  2. Standalone HTTP — Direct HTTP server for local development, VPS, or reverse-proxy setups.
  3. Apache FastCGI (mod_fcgid) — Drop-in upload for shared hosting (Linux amd64/arm64 and FreeBSD amd64).

1. Docker (Recommended for Cloud & VPS)

Use the official multi-arch image (ghcr.io/typedock/typedock):

docker run -d \
  --name typedock \
  -p 8080:8080 \
  -v typedock_storage:/app/storage \
  -v typedock_uploads:/app/public/uploads \
  -e APP_URL=https://example.com \
  -e TYPEDOCK_SITE_NAME="Acme Journal" \
  -e [email protected] \
  -e TYPEDOCK_ADMIN_PASSWORD=replace-with-strong-password \
  ghcr.io/typedock/typedock:latest

When TYPEDOCK_ADMIN_EMAIL and TYPEDOCK_ADMIN_PASSWORD are set on an empty database, TypeDock automatically runs migrations, seeds initial options, creates the admin user, and skips the web installer. On subsequent restarts, existing users are detected and bootstrapping becomes a no-op.

Adding Custom Themes & Plugins in Docker

Mount directories directly under /app/themes/ or /app/plugins/:

volumes:
  - typedock_storage:/app/storage
  - typedock_uploads:/app/public/uploads
  - ./themes/client-brand:/app/themes/client-brand:ro
  - ./plugins/custom-crm:/app/plugins/custom-crm:ro

2. Standalone Binary (Local or VPS)

Download typedock_<version>_<os>_<arch>.tar.gz (or .zip on Windows) from GitHub Releases:

tar -xzf typedock_0.1.0_linux_amd64.tar.gz
./typedock -http :8080
  • Visit http://localhost:8080/admin/install to complete the 3-step browser setup wizard.
  • Or pass TYPEDOCK_ADMIN_EMAIL and TYPEDOCK_ADMIN_PASSWORD to bootstrap headlessly.
  • Place behind Caddy, Nginx, or Cloudflare for TLS termination; TypeDock automatically honors X-Forwarded-Proto and Cf-Visitor for secure cookies.

3. Shared Hosting (Apache FastCGI)

TypeDock detects FastCGI automatically when launched by Apache mod_fcgid.

  1. Download the FastCGI bundle for your server:
    • Linux shared hosts: typedock-fcgi_<version>_linux_amd64.zip (or .tar.gz)
    • FreeBSD shared hosts: typedock-fcgi_<version>_freebsd_amd64.zip (or .tar.gz)
  2. Extract the archive into your webroot (domain root or any subdirectory such as public_html/blog/).
  3. Ensure permissions:
    chmod 755 app.fcgi
    chmod 700 storage
    
  4. Open your site URL in a browser and follow the 3-step installer. TypeDock detects your subdirectory base path automatically and suggests an external storage directory outside public_html/ when writable.

Scheduled Jobs (Cron) on Shared Hosting

In standalone/Docker mode, TypeDock runs an in-process background ticker. On FastCGI shared hosting, configure a cron job (e.g., every 5 minutes) to publish scheduled posts and process queued webhooks:

*/5 * * * * /path/to/webroot/app.fcgi -root /path/to/webroot -cli queue-work >/dev/null 2>&1

Restarting FastCGI After Binary Replacement

Use exact process matching so SSH sessions are never terminated:

pkill -x app.fcgi || true