Run Tack

Configure Tack

Docker Compose reads .env. Copy .env.example or run ./scripts/setup.sh. Recreate the app after changing configuration: docker compose up -d --build --wait. Keep the file local. Explicit environment values override .env for the host commands that use scripts/with-env.mjs.

Docker and core settings

VariableDefault/exampleMeaning
POSTGRES_DBtackDatabase name; keep stable after first initialization
POSTGRES_USERtackDatabase owner; keep stable after first initialization
POSTGRES_PASSWORDGeneratedDatabase password; replacing the file value does not rotate an initialized database password
POSTGRES_PORT54329Loopback host port for local development; container traffic uses 5432
TACK_BIND_ADDRESS127.0.0.1Host address exposed by the app; use a host TLS proxy with the default
TACK_PORT3000Host port exposed by the app container
BETTER_AUTH_SECRETGeneratedAt least 32 characters, used by authentication; keep stable and private
BETTER_AUTH_URLhttp://localhost:3000Actual public browser/agent origin; use HTTPS for non-local access
BETTER_AUTH_TRUSTED_ORIGINShttp://localhost:3000Comma-separated allowed origins; normally the public origin
TACK_ADMIN_EMAILadmin@example.comAccount created/confirmed as administrator during startup
TACK_ADMIN_PASSWORDGeneratedInitial local password, 10–128 characters; does not overwrite an existing password
TACK_ADMIN_NAMETack AdminName used when creating the bootstrap account
TACK_ADMIN_COLORrustInitial avatar color: rust, blue, gold, green, slate, violet

The PostgreSQL image initializes credentials only for a new data volume. Rotate an existing database password through PostgreSQL and update all matching connection settings together. Do not delete the volume to change a password. Bootstrap confirms its configured account as an active administrator on startup; use a designated recovery account and choose that identity deliberately.

Sign-in providers

VariableDefaultMeaning
TACK_AUTH_DEFAULTlocalPreferred sign-in option: local or a configured provider ID
COGNITO_ISSUEREmptyExact User Pool OIDC issuer
COGNITO_CLIENT_IDEmptyCognito app client ID
COGNITO_CLIENT_SECRETEmptyConfidential client secret, where configured
COGNITO_NAMEAmazon CognitoSign-in button label
COGNITO_ALLOW_SIGN_UPfalseAllow verified provider users to create member accounts on first sign-in
TACK_OIDC_PROVIDERS[]JSON array of additional provider definitions

See authentication for callback URLs, verified email requirements, provisioning, and retaining local sign-in.

Host development and tests

VariablePurpose
DATABASE_URLOptional PostgreSQL URL; takes precedence over individual PG settings
PGHOST, PGPORT, PGDATABASE, PGUSER, PGPASSWORDExplicit host database settings; the command wrapper maps POSTGRES_* values when these are absent
DATABASE_POOL_SIZEPool size, default 10; host runtime setting, not forwarded by the default Compose file
TEST_DATABASE_URLDisposable database for unit/integration tests; use its own database name
E2E_DATABASE_URLDisposable database for browser tests
E2E_PORTBrowser-test server port, default 3100; use 3157 when 3100 is busy

The host command wrapper supplies test URLs from the configured database if absent; test operations are isolated by schema. Prefer a dedicated test database as described in development.

Local agent adapter

TACK_BASE_URL and TACK_API_KEY are supplied by the agent host, not to the Tack app container. The adapter accepts HTTPS origins, with HTTP allowed only for loopback development. NODE_EXTRA_CA_CERTS can supply a private CA certificate for Node clients. See agent access.

Project site

TACK_SITE_URL optionally changes the documentation site’s canonical origin and path when building a fork. It defaults to https://p2dev.github.io/tack/. The project site is static documentation; the Tack application needs a separate Next.js/PostgreSQL deployment.