Environment Variables

Complete reference for TaskView environment variables - database connection, JWT authentication, OAuth providers, SMTP email, GitHub/GitLab integration, encryption, and CORS configuration for your self-hosted Docker deployment.

TaskView is configured through environment variables set in the .env.taskview file (or passed directly to the Docker container). This page documents every available variable.

Database

These must match your PostgreSQL setup.

VariableRequiredDefaultDescription
DB_HOSTYes-Database hostname. Use db when running in Docker Compose.
DB_USERYes-Database username
DB_PASSWORDYes-Database password
DB_NAMEYes-Database name
DB_PORTNo5432Database port

Application

VariableRequiredDefaultDescription
APP_PORTNo1401Port the API server listens on
APP_URLYeshttps://app.taskview.techFull URL of the web app (e.g. https://tasks.company.com). Used for OAuth redirects and email links.

Authentication

VariableRequiredDefaultDescription
JWT_SIGNYes-Secret key for signing JWT tokens. Use a long random string.
ACCESS_LIFE_TIMENo1dHow long access tokens are valid. Examples: 1h, 1d, 7d
REFRESH_LIFE_TIMENo2dHow long refresh tokens are valid
JWT_ALGNoHS256JWT signing algorithm
Generate a strong JWT secret: node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"

SMTP (Email)

Required for password recovery, email confirmation, and invitation notifications. Without SMTP, these features won't work, but everything else functions normally.

VariableRequiredDefaultDescription
SMTP_HOSTNo-SMTP server hostname
SMTP_PORTNo465SMTP port
SMTP_USERNAMENo-SMTP login
SMTP_PASSWORDNo-SMTP password
SMTP_ENCRYPTIONNosslssl or tls
SMTP_FROM_NAMENoTaskViewSender name in emails
SMTP_FROM_EMAILNo-Sender email address

Encryption

Required for GitHub/GitLab integrations. OAuth tokens are encrypted at rest using AES-256-GCM.

VariableRequiredDefaultDescription
ENCRYPTION_KEYNo-32-byte hex string (64 characters). Required for integrations.

Generate a key:

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
If you change or lose the encryption key, all stored integration tokens become unreadable. You'll need to reconnect your GitHub/GitLab integrations.

GitHub Integration

For connecting GitHub repositories. See GitHub & GitLab Setup for a step-by-step guide.

VariableRequiredDefaultDescription
GITHUB_INTEGRATION_CLIENT_IDNo-OAuth App client ID
GITHUB_INTEGRATION_CLIENT_SECRETNo-OAuth App client secret
GITHUB_INTEGRATION_CALLBACK_URLNo-OAuth callback URL
GITHUB_BASE_URLNohttps://github.comOverride for GitHub Enterprise
GITHUB_API_URLNohttps://api.github.comOverride for GitHub Enterprise API

GitLab Integration

For connecting GitLab repositories.

VariableRequiredDefaultDescription
GITLAB_INTEGRATION_CLIENT_IDNo-OAuth App client ID
GITLAB_INTEGRATION_CLIENT_SECRETNo-OAuth App client secret
GITLAB_INTEGRATION_CALLBACK_URLNo-OAuth callback URL
GITLAB_BASE_URLNohttps://gitlab.comOverride for self-hosted GitLab
GITLAB_API_URLNohttps://gitlab.com/api/v4Override for self-hosted GitLab API

Full example

Here's a complete .env.taskview file for a production deployment:

DB_HOST="db"
DB_USER="taskview_db_user"
DB_PASSWORD="password"
DB_NAME="taskview"
DB_PORT=5432
APP_PORT=1401
JWT_ALG="HS256"
JWT_SIGN="secret"
ACCESS_LIFE_TIME="3d"
REFRESH_LIFE_TIME="9d"

SMTP_HOST=smtp
SMTP_PORT=587
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_ENCRYPTION=tls
SMTP_FROM_NAME=TaskView
SMTP_FROM_EMAIL=

# Your domain 
APP_URL="https://app.taskview.tech"

GOOGLE_CLIENT_ID=""
GOOGLE_CLIENT_SECRET=""
#You domain
GOOGLE_CALLBACK_URL="https://api.taskview.tech/module/auth/provider/google/callback"
GITHUB_CLIENT_ID=""
GITHUB_CLIENT_SECRET=""
GITHUB_CALLBACK_URL="https://api.taskview.tech/module/auth/provider/github/callback"
APPLE_CLIENT_ID=""
APPLE_TEAM_ID=""
APPLE_KEY_ID=""
APPLE_KEY_LOCATION="/usr/src/app/AuthKey.p8"
# Your domain
APPLE_CALLBACK_URL="https://api.taskview.tech/module/auth/provider/apple/callback"

#integrations
GITHUB_INTEGRATION_CLIENT_ID=
GITHUB_INTEGRATION_CLIENT_SECRET=
GITHUB_INTEGRATION_CALLBACK_URL=https://api.taskview.tech/module/integrations/oauth/github/callback

GITLAB_INTEGRATION_CLIENT_ID=
GITLAB_INTEGRATION_CLIENT_SECRET=
GITLAB_INTEGRATION_CALLBACK_URL=https://api.taskview.tech/module/integrations/oauth/github/callback

ENCRYPTION_KEY=

Built with Nuxt UI • © 2026 Thank you Nuxt Team for this awesome UI library and for the template!