Skip to content

Self-hosting

Troubleshooting

Fixes for common self-hosting problems: the Docker build is Killed (memory), zsh: bad pattern: #, npm EBADENGINE warnings, Docker not running, the local Supabase won't start, no sign-up page, a lost setup code, the CLI can't reach the server or says "No server URL", port 3000 in use, and sign-in that loops back to the login page.

Last updated 8 min read Edit this page on GitHub
On this page

The Docker build was Killed, or says "cannot allocate memory"#

npm run stack -- up (building locally because no published image could be pulled, or with --build) or docker compose up --build stops during Creating an optimized production build with Killed, ResourceExhausted or cannot allocate memory, then docker up -d --wait… exited with 1.

Docker ran out of memory while compiling UserTasks. The build needs about 10 GB of memory for Docker:

  1. In Docker Desktop: Settings → Resources → Memory, set it to 10 GB or more, then Apply & restart. (Windows with WSL 2: set memory= in %UserProfile%\.wslconfig, then run wsl --shutdown.)
  2. Stop other containers you don't need while it builds; a local Supabase, for example, uses 2 to 4 GB.
  3. Run the same command again. Packages already downloaded are reused.

If a published image exists for your version, npm run stack -- up downloads it instead of building. It builds when the pull failed: check the line it printed before building (No published image … could be pulled), your network, and that you didn't pass --build.

Can't give Docker that much? Run from source with npm run setup:local instead: nothing is compiled inside Docker. Requirements has the details.

zsh: bad pattern: #, or zsh: command not found:#

You pasted several commands with # comments into the macOS Terminal. An interactive zsh, the Mac's default shell, doesn't treat # as the start of a comment, so it tries to run the comment.

  • Paste one command at a time, and leave out anything after a #.
  • Or turn comments on for this terminal window first, then paste again:
Bash
setopt interactive_comments

To keep it on, add that line to ~/.zshrc. The snippets on usertasks.com and in these docs have no comments, so they paste as they are.

npm warn EBADENGINE … required: { node: '>=22' }#

A warning, not an error: one of UserTasks' packages (unpdf, which reads PDFs) asks for Node.js 22, and your computer has an older version. npm install still finishes and UserTasks runs on Node.js 20.9 or later, but Node.js 20 is past its end of life: install the 22 LTS (or later) from nodejs.org, open a new terminal, and check with node --version. If you use nvm: nvm install 22, then nvm use 22.

I can't find the sign-up page#

There isn't one on a self-hosted install. That's on purpose: nobody can create an account on your server unless you let them.

The Create a free workspace link on the login page only exists in the cloud edition at usertasks.com.

If someone without an invitation tries to sign in, they see "Invalid email or password. If you're new, ask an admin to invite you first."

/setup sends me to the login page#

Setup is already done: a workspace or a user exists. Perhaps someone ran npm run bootstrap, used npm run stack -- up --email …, or the Helm chart's bootstrap Job ran.

  • Sign in with that account at /login.
  • If nobody knows its password, use Forgot password? on the login page. This needs email to be working.
  • To find out whether setup is still needed, run usertasks-admin setup-code status.

I lost the setup code, or it doesn't work#

  • Make a new one:
    • from a source checkout: npm run setup-code
    • with Docker Compose: docker compose exec app node admin.cjs setup-code
    • on Kubernetes: kubectl -n usertasks exec deploy/usertasks -- node admin.cjs setup-code The previous code stops working when you do.
  • The server restarted: it printed a new code, and the old one no longer works. Look at the newest log line.
  • Several replicas: the code may be in another pod's log. See Kubernetes.
  • USERTASKS_SETUP_CODE is set: the code is that variable's value, and the log doesn't print it. Case, dashes and spaces don't matter.
  • Refused after several wrong tries: wrong codes are rate-limited per IP address. Wait a few minutes, then try again.

The CLI says it can't reach UserTasks#

error: can't reach UserTasks at http://localhost:3000. Is it running?

The CLI knows the address but nothing answered there (CLI 0.1.3 or later).

  • Start UserTasks on that machine: npm run dev (or npm run start after a build) from the UserTasks folder, or docker compose up -d. Wait until it's ready, then try again.
  • A different port or host: pass it with --url, for example usertasks login --url https://yourtenant.usertasks.com or --url http://localhost:3100.
  • From another machine or a container: localhost means the machine the CLI runs on. Use the server's real address.

The CLI says "No server URL" (older CLIs)#

No server URL for profile "default". Pass --url <server>, set USERTASKS_URL, or run `usertasks login --url <server>`.

The CLI doesn't know which server to talk to.

  • CLI 0.1.2 or later: a bare usertasks login uses http://localhost:3000 when nothing else is set. For a server anywhere else, log in once with its address.
  • Older CLIs have no default, so always pass --url (or update with npm install -g @user-tasks/cli).
Bash
usertasks login --url https://yourtenant.usertasks.com
usertasks login

The first is for any other server (replace the address with yours), the second for the server on this machine (port 3000).

The address is saved in the profile, so later commands don't need it. For one-off commands, add --url <server>. In CI, set USERTASKS_URL (and USERTASKS_API_KEY). If you use several profiles, check that you're on the right one with usertasks profiles list. See Use the CLI with your server.

"Not logged in to …" means the server is known but there's no credential for it. Run usertasks login (or usertasks login --api-key), or set USERTASKS_API_KEY.

npm says "ENOENT … package.json"#

npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '…\package.json'

You ran npm run … outside the UserTasks folder, so npm stops before any UserTasks code runs. cd into the folder you cloned (the one with package.json) and run the command again. To check you're in the right place: ls package.json in bash or zsh, Test-Path package.json in PowerShell, dir package.json in cmd.

"Missing environment variables"#

Missing environment variables: NEXT_PUBLIC_SUPABASE_URL, SUPABASE_SERVICE_ROLE_KEY.

npm run bootstrap or setup-code couldn't find the settings it needs to reach the database. It reads .env.local, then .env, from the current folder; variables set in your shell win. The lines under the message say what it found:

  • "Run this from the UserTasks folder (the one with package.json)": you're in another folder. cd into the UserTasks folder.
  • "No .env.local in …": create it. Copy .env.example to .env.local in that folder and fill in the Supabase URL and service-role key.
  • Not using Supabase? Set DB_PROVIDER=postgres, DATABASE_URL and AUTH_PROVIDER=builtin instead. With DB_PROVIDER=postgres, the message names DATABASE_URL.

Still stuck? Run the script with Node's --env-file flag, or run the command inside the Docker container, as described in On Windows.

Docker isn't running#

npm run setup:local and npx supabase start need Docker:

  • "Docker isn't installed": install Docker Desktop, restart if it asks, then open a new terminal.
  • "Docker is installed but not running" (or "Cannot connect to the Docker daemon", "error during connect"): open Docker Desktop and wait until it says Engine running, then run the command again.
  • Windows: Docker Desktop needs WSL 2. If it asks to turn it on or update it, say yes; or run wsl --install (or wsl --update) in PowerShell opened with Run as administrator, then restart.

The local Supabase won't start#

  • Ports in use ("port is already allocated"): another Supabase project is running. Stop it with npx supabase stop in that project's folder, or docker ps to see what's using 54321–54324.
  • Out of memory or disk: in Docker Desktop, open Settings → Resources and give it at least 4 GB of memory, or free up disk space.
  • "[inbucket] … is no longer supported": your checkout is older than the Supabase CLI. Update it (git pull), or run an older CLI with npx supabase@2 start.
  • A container stays unhealthy on Windows: run npx supabase stop, then npx supabase start again. If the logging container (vector) is the one failing, npx supabase start -x vector starts without it.

To start the database from scratch (this deletes everything in it): npm run setup:local -- --reset.

Port 3000 is already in use#

Run the app on another port, and change the app's address to match:

You runDo this
npm run dev / npm startPORT=3001 npm run dev (or npm start); in PowerShell or cmd, npm run dev -- -p 3001. Set APP_URL and NEXT_PUBLIC_APP_URL to http://localhost:3001 in .env.local
Laptop trial, first timenpm run stack -- up --port 3001
Docker ComposeIn .env, set APP_PORT=3001 and change APP_URL and NEXT_PUBLIC_APP_URL to http://localhost:3001. Then docker compose up -d --build (add --profile standalone if you use it). The address is baked into the image, so rebuild

To see what's using the port: lsof -i :3000 on macOS and Linux, netstat -ano | findstr :3000 on Windows. Often it's an npm run dev left running in another terminal window: close it.

Signing in sends me back to the login page#

This almost always means the browser didn't keep the sign-in cookie. Check these in order:

  1. The address in the browser doesn't match APP_URL. Sign-in redirects go to APP_URL (or NEXT_PUBLIC_APP_URL), and cookies belong to one host. If you open http://192.168.1.20:3000 but APP_URL says http://localhost:3000, you're bounced between the two.
    • Set APP_URL and NEXT_PUBLIC_APP_URL to the exact address people use, including the scheme and port.
    • Moved to a domain name? See Give your install a friendly address.
    • Restart the app. For Docker, rebuild the image, because the address is a build argument.
  2. APP_URL is https://… but you opened the app over http://. An https address makes the sign-in cookies Secure, and browsers never store Secure cookies from a plain-http page.
    • Open the app through your HTTPS address.
    • For a trial on plain http, set APP_URL to the http address. AUTH_COOKIE_SECURE=false also works, but never use it on a server people really use.
  3. A proxy changes the host. Your reverse proxy must pass the original Host header to the app.
  4. Workspace addresses on localhost. With APP_BASE_DOMAIN=localhost, sign in on the address you use (for example http://acme.localhost:3000). Browsers don't share cookies between localhost and its subdomains.

If the login page says "Invalid email or password", check the Organisation field. It takes the workspace slug (for example acme-inc), not the display name.

Still stuck#

Run usertasks-admin doctor (docker compose exec app node admin.cjs doctor in Docker). It checks every provider: database, sign-in, storage, email, the scheduler and more. Then compare your settings with Environment variables.

Was this page helpful?