Skip to content

Getting Started

Quick Start (Docker)

bash
# Create a directory for OpenTask
mkdir opentask && cd opentask

# Download the compose file
curl -O https://raw.githubusercontent.com/trentmcnitt/opentask/main/docker-compose.yml

# Generate a secret key and start the app
cat > .env <<EOF
AUTH_SECRET=$(openssl rand -base64 32)
OPENTASK_INIT_USERNAME=admin
OPENTASK_INIT_PASSWORD=changeme
OPENTASK_INIT_TIMEZONE=America/New_York
EOF

docker compose up -d

Open http://localhost:3000 and log in with the username and password you set above. The initial user and database are created automatically on first start.

INFO

Login is username-based, not email-based.

Updating

bash
docker compose pull
docker compose up -d

Your data is stored in ./data/ and persists across updates. Schema migrations run automatically on startup.

WARNING

Store the data directory on a local filesystem — network mounts (NFS, CIFS) are not compatible with SQLite's file locking.

Backup

SQLite makes backups simple. Use the built-in .backup command for a safe, consistent copy:

bash
# From the host (recommended)
docker compose exec opentask sqlite3 /app/data/tasks.db '.backup /app/data/backup.db'
cp data/backup.db /path/to/your/backups/tasks-$(date +%F).db

# Or stop the container first, then copy directly
docker compose stop
cp data/tasks.db /path/to/your/backups/
docker compose start

WARNING

SQLite uses WAL (write-ahead logging), so tasks.db-wal and tasks.db-shm files may exist alongside the main database. A plain cp tasks.db while the app is running could produce an inconsistent backup. The sqlite3 .backup command avoids this.

Additional Users

bash
# Docker
docker compose exec opentask tsx scripts/create-user.ts <username> <password>

# Bare metal
npx tsx scripts/create-user.ts <username> <password> <email> <timezone>

Manual Installation (without Docker)

Requires Node.js 20+ and npm.

bash
git clone https://github.com/trentmcnitt/opentask.git
cd opentask
npm install

# Configure
cp .env.example .env.local
# Edit .env.local — at minimum, set AUTH_SECRET (openssl rand -base64 32)

# Create your user
npx tsx scripts/create-user.ts admin changeme admin@localhost America/New_York

# Build and start
npm run build
npm run start

For development: npm run dev starts a hot-reloading server on port 3000.