Skip to content
Try for Free

Self-host Worklenz

Worklenz is fully open-source and can be hosted on your own servers, giving you complete control over your data and infrastructure. This guide covers everything you need to get Worklenz running on your own machine or production server.

Prerequisites

Before you begin, make sure you have the following installed:

RequirementVersion
Node.jsv18 or newer
PostgreSQLv15 or newer
Docker and Docker ComposeLatest stable
GitAny recent version

Docker is the fastest and most reliable way to get Worklenz running. The automated setup script handles configuration, secrets, and SSL for you.

Automated setup

Terminal window
git clone https://github.com/Worklenz/worklenz.git
cd worklenz
./quick-setup.sh

The script automatically:

  • Creates a .env file with generated security secrets
  • Configures URLs for your domain
  • Sets up SSL certificates (self-signed for local, Let’s Encrypt for production)
  • Starts all services

Access points after setup:

ServiceURL
Worklenz apphttps://localhost or http://localhost
MinIO consolehttp://localhost:9001

Manual Docker setup

If you prefer to configure things yourself:

Terminal window
cp .env.example .env
# Edit .env with your required values
docker compose --profile express up -d

Manual installation (development)

Use this approach if you want to run Worklenz locally for development or testing without Docker.

1. Clone the repository:

Terminal window
git clone https://github.com/Worklenz/worklenz.git
cd worklenz

2. Configure the environment:

Terminal window
cp worklenz-backend/.env.template worklenz-backend/.env

3. Install dependencies:

Terminal window
cd worklenz-backend && npm install
cd ../worklenz-frontend && npm install

4. Initialize the database:

Run the following SQL files in order against your PostgreSQL database:

Terminal window
psql -U your_username -d worklenz_db -f database/sql/0_extensions.sql
psql -U your_username -d worklenz_db -f database/sql/1_tables.sql
psql -U your_username -d worklenz_db -f database/sql/indexes.sql
psql -U your_username -d worklenz_db -f database/sql/4_functions.sql
psql -U your_username -d worklenz_db -f database/sql/triggers.sql
psql -U your_username -d worklenz_db -f database/sql/3_views.sql
psql -U your_username -d worklenz_db -f database/sql/2_dml.sql
psql -U your_username -d worklenz_db -f database/sql/5_database_user.sql

5. Start the services:

Open two terminal windows and run:

Terminal window
# Terminal 1 - Backend
cd worklenz-backend
npm run dev:all
# Terminal 2 - Frontend
cd worklenz-frontend
npm run dev

Access the app at http://localhost:5000.


Production deployment

Quick production setup

Terminal window
git clone https://github.com/Worklenz/worklenz.git
cd worklenz
./quick-setup.sh
# Enter your production domain when prompted (e.g., worklenz.example.com)

Manual production configuration

1. Configure the environment file:

Terminal window
cp .env.example .env

Edit .env and set the following key values:

DOMAIN=your-domain.com
VITE_API_URL=https://your-domain.com
VITE_SOCKET_URL=wss://your-domain.com
ENABLE_SSL=true
LETSENCRYPT_EMAIL=your-email@domain.com

Also generate secure secrets for DB_PASSWORD, SESSION_SECRET, and other sensitive variables:

Terminal window
openssl rand -hex 32

2. Point your DNS A record to your server IP.

3. Start with SSL:

Terminal window
docker compose --profile express --profile ssl up -d

Access your instance at https://your-domain.com.


Configuration

Key environment variables

VariablePurpose
DOMAINYour domain (use localhost for local testing)
DEPLOYMENT_MODEexpress (bundled services) or advanced (external services)
STORAGE_PROVIDERs3 (MinIO or AWS) or azure
ENABLE_SSLtrue or false for SSL/TLS
BACKUP_RETENTION_DAYSNumber of days to retain backups (default: 30)
DB_PASSWORDPostgreSQL password
SESSION_SECRETSession encryption key

Deployment modes

Express mode (default) - includes PostgreSQL, Redis, and MinIO bundled together:

Terminal window
docker compose --profile express up -d

Advanced mode - use external services such as AWS S3, Azure Blob Storage, or an external PostgreSQL instance:

Set DEPLOYMENT_MODE=advanced in your .env file before starting.


Storage configuration

Worklenz uses MinIO by default for file storage, but supports multiple storage backends.

ProviderDetails
MinIO (default)S3-compatible, included in Docker setup. Console at http://localhost:9001 (credentials: minioadmin / minioadmin). Default bucket: worklenz-bucket (created automatically).
AWS S3Set STORAGE_PROVIDER=s3 and configure AWS credentials in .env.
Azure Blob StorageSet STORAGE_PROVIDER=azure and configure Azure credentials in .env.

Management commands

Use the manage.sh script to manage your Worklenz instance:

Terminal window
./manage.sh status # View service status
./manage.sh logs # View logs
./manage.sh backup # Create a database backup
./manage.sh restore # Restore from a backup
./manage.sh stop # Stop all services
./manage.sh start # Start all services
./manage.sh ssl # Manage SSL certificates
./manage.sh upgrade # Upgrade to the latest version
./manage.sh auto-configure # Auto-generate secrets

Backups

Enable automated backups

Terminal window
docker compose --profile express --profile backup up -d

Manual backup and restore

Terminal window
./manage.sh backup # Create a backup
./manage.sh restore # Restore from a backup

Set BACKUP_RETENTION_DAYS in your .env file to control how long backups are kept.


Security best practices

Worklenz includes several security features out of the box:

  • Non-root containers (all services run as non-privileged users)
  • Network isolation (backend network is internal-only)
  • SSL/TLS support (Let’s Encrypt for production, self-signed for localhost)
  • Rate limiting on API and login endpoints
  • Security headers (HSTS, CSP, X-Frame-Options)
  • Auto-generated secure secrets

Video guides

Step-by-step video walkthroughs are available if you prefer a visual guide:


License

Worklenz is released under the GNU Affero General Public License v3 (AGPLv3).

For detailed Docker deployment documentation, see the DOCKER_SETUP.md file in the repository. For security vulnerability reports, contact info@worklenz.com.