Self-hosting
Give your install a friendly address
Move from http://localhost:3000 to https://tasks.yourcompany.com: DNS records (GoDaddy, Cloudflare, Route 53), HTTPS with Caddy, nginx and certbot, a Helm ingress or Docker Compose, APP_URL and APP_BASE_DOMAIN (restart or rebuild), Settings → Workspace DNS checks, per-workspace addresses and friendly form links, and what to update afterwards.
On this page
- 1. Before you start
- 2. Pick your address
- 3. Point DNS at your server
- 4. Put HTTPS in front
- Caddy (automatic HTTPS)
- nginx and certbot
- Kubernetes (Helm)
- Docker Compose
- 5. Tell UserTasks its address
- Restart or rebuild?
- 6. Check it in Settings → Workspace DNS
- 7. Optional: set the workspace address
- 8. Update things that remember the old address
- 9. Troubleshooting
- The browser warns about the certificate
- The page keeps redirecting
- Signing in sends me back to the login page
- The DNS check stays red
- The page loads, but live updates don't
- Next
Out of the box, UserTasks answers at http://localhost:3000. That's fine on your own computer, but your team needs a proper address, such as https://tasks.yourcompany.com. This page walks you through it: DNS, HTTPS, telling UserTasks its new address, and the things that remember the old one.
Optionally, each workspace can also get its own address, such as acme.tasks.yourcompany.com, with friendly form links like acme.tasks.yourcompany.com/form/employee-onboarding.
The examples use tasks.yourcompany.com and the server address 203.0.113.10. Replace them with your own.
1. Before you start#
You need:
- A server other people can reach: a VM or machine with a public IP address (or an address on your company network), where UserTasks is already running. See Install step by step.
- A domain you own, such as
yourcompany.com. - Access to the domain's DNS settings, at GoDaddy, Cloudflare, Route 53 or wherever the domain is managed. Ask your IT team if you're not sure.
2. Pick your address#
| Option | Looks like | What it needs |
|---|---|---|
| One address (most installs) | https://tasks.yourcompany.com | One DNS record, one certificate, and APP_URL |
| Per-workspace addresses (optional, on top) | https://acme.tasks.yourcompany.com | Also APP_BASE_DOMAIN, a wildcard DNS record (*.tasks.yourcompany.com) and a wildcard certificate |
Start with one address. You can add per-workspace addresses later.
Use a subdomain that serves only UserTasks, such as tasks.yourcompany.com. With per-workspace addresses on, the sign-in cookie is shared with every name under it, so nothing else (a blog, a status page) should live under that name.
3. Point DNS at your server#
In your DNS provider, add a record for your address:
| Type | Name (host) | Value | When |
|---|---|---|---|
A | tasks | 203.0.113.10 | Your server has an IPv4 address |
AAAA | tasks | your server's IPv6 address | Optional, if it also has IPv6 |
CNAME | tasks | lb-1234.example.com | Instead of A / AAAA, when you have a load balancer with a hostname |
For per-workspace addresses, add a wildcard record next to it, pointing at the same place:
| Type | Name (host) | Value |
|---|---|---|
A (or CNAME) | *.tasks | the same value as tasks |
Most providers want the name without your domain (tasks, *.tasks). Some want the full name (tasks.yourcompany.com).
GoDaddy: My Products → your domain → DNS → DNS Records → Add New Record. Type A, Name tasks, Value your server's IP address. Add a second record with Name *.tasks for per-workspace addresses. GoDaddy's DNS API isn't open to every account, so check before you rely on it for a wildcard certificate (step 4).
Cloudflare: DNS → Records → Add record. Set Proxy status to DNS only (grey cloud) to start:
- With DNS only, browsers connect straight to your server, and your server's own certificate (from Caddy or certbot below) is the one they see.
- With the proxy on (orange cloud), Cloudflare shows its own certificate. Set SSL/TLS to Full (strict); Flexible talks to your server over plain http, which causes redirect loops. Cloudflare's free certificate covers
yourcompany.comand*.yourcompany.com, but not a name two levels down such asacme.tasks.yourcompany.com, so keep the wildcard record on DNS only. Live updates work through the proxy: the app sends a keep-alive every 15 seconds, well inside Cloudflare's idle timeout.
Route 53: Hosted zones → your domain → Create record. Record name tasks, type A, value your server's IP address (or Alias to your load balancer). For per-workspace addresses, add record name *.tasks with the same value.
Check it. DNS changes usually show up within minutes, but can take up to 48 hours. In a terminal:
nslookup tasks.yourcompany.com
dig +short tasks.yourcompany.comBoth should print your server's address. For the wildcard, try any name under it:
dig +short test.tasks.yourcompany.comdig comes with macOS and most Linux systems; on Windows, use nslookup.
4. Put HTTPS in front#
UserTasks itself speaks plain http on port 3000. Put a reverse proxy in front of it: a small web server that holds the certificate, answers on https:// (port 443) and passes each request on to the app. Whichever you use, it must:
- pass the original
Hostheader (the app reads the address, and the workspace, from it, and sign-in forms check it); - send
X-Forwarded-ProtoandX-Forwarded-For(appending, as the examples do). The app takes the client address from the right end ofX-Forwarded-For, one hop per proxy: with more than one proxy in front (a CDN and nginx, say) setTRUSTED_PROXY_HOPSto their number, or rate limits see the inner proxy's address for everyone; - not buffer streamed responses (live updates and run progress are Server-Sent Events) and allow long reads;
- accept uploads of at least 50 MB, the app's default limit (
FORM_UPLOAD_MAX_BODY_MB; see file upload limits).
Pick one of the examples below. Open ports 80 and 443 in your server's firewall: certificate authorities check port 80 when they issue a certificate.
Caddy (automatic HTTPS)#
Caddy gets and renews a free Let's Encrypt certificate by itself. Its reverse_proxy passes Host and sets the X-Forwarded-* headers, and it streams Server-Sent Events without buffering. Install it, then put this in /etc/caddy/Caddyfile:
tasks.yourcompany.com {
request_body {
max_size 64MB
}
reverse_proxy 127.0.0.1:3000
}Then reload Caddy:
sudo systemctl reload caddyPer-workspace addresses need a wildcard certificate. Let's Encrypt only issues those through a DNS challenge, so Caddy needs your DNS provider's plugin and an API token. Stock Caddy doesn't include these plugins: download a build with yours from caddyserver.com/download (for example caddy-dns/cloudflare or caddy-dns/route53), or build one with xcaddy. With the Cloudflare plugin, and the token in CF_API_TOKEN:
tasks.yourcompany.com, *.tasks.yourcompany.com {
tls {
dns cloudflare {env.CF_API_TOKEN}
}
request_body {
max_size 64MB
}
reverse_proxy 127.0.0.1:3000
}nginx and certbot#
- Install nginx and certbot. On Ubuntu or Debian:
sudo apt install nginx certbot python3-certbot-nginx- Save this as
/etc/nginx/sites-available/usertasks:
server {
listen 80;
server_name tasks.yourcompany.com;
# Match the app's upload limit (FORM_UPLOAD_MAX_BODY_MB, 50 MB by default).
client_max_body_size 64m;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Connection "";
# Live updates are Server-Sent Events: pass them through as they come.
proxy_buffering off;
proxy_read_timeout 3600s;
}
}- Turn it on, check it, and reload:
sudo ln -s /etc/nginx/sites-available/usertasks /etc/nginx/sites-enabled/usertasks
sudo nginx -t
sudo systemctl reload nginx- Get the certificate. certbot adds the
listen 443 ssllines and an http-to-https redirect to the file, and renews the certificate by itself:
sudo certbot --nginx -d tasks.yourcompany.comPer-workspace addresses: add *.tasks.yourcompany.com to server_name. The wildcard certificate needs certbot's DNS plugin for your provider (for example python3-certbot-dns-cloudflare or python3-certbot-dns-route53) instead of --nginx, then point ssl_certificate and ssl_certificate_key at the files it writes:
sudo certbot certonly --dns-cloudflare --dns-cloudflare-credentials /root/.secrets/cloudflare.ini -d tasks.yourcompany.com -d '*.tasks.yourcompany.com'Kubernetes (Helm)#
The chart has an Ingress. Turn it on in your values file, with cert-manager for the certificate. Its host defaults to the host of appUrl:
appUrl: "https://tasks.yourcompany.com"
ingress:
enabled: true
className: nginx
maxBodySize: "64m"
certManager:
clusterIssuer: letsencrypt-prod
tls:
enabled: true
annotations:
nginx.ingress.kubernetes.io/proxy-buffering: "off"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"Then helm upgrade (step 5). letsencrypt-prod is the name of a cert-manager ClusterIssuer you've already created. The certificate goes in the Secret <release>-tls unless you set ingress.tls.secretName.
Per-workspace addresses: the chart's Ingress has one host. Either use the chart's Gateway API route, which takes wildcard names (gateway.enabled: true, gateway.parentRefs, and gateway.hostnames with tasks.yourcompany.com and *.tasks.yourcompany.com), or add a second Ingress of your own for *.tasks.yourcompany.com pointing at the same Service (usertasks, port http). Either way, the wildcard certificate needs a cert-manager issuer with a DNS-01 solver:
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: usertasks-wildcard
namespace: usertasks
spec:
secretName: usertasks-wildcard-tls
issuerRef:
name: letsencrypt-dns01
kind: ClusterIssuer
dnsNames:
- "tasks.yourcompany.com"
- "*.tasks.yourcompany.com"Docker Compose#
docker-compose.yml publishes the app on port APP_PORT (3000 by default) of the server. Put the proxy in front of it:
- Keep the app off the network, so only the proxy reaches it. In
.env:
APP_PORT=127.0.0.1:3000(Compose then publishes 127.0.0.1:3000:3000: reachable from the server itself, not from outside.)
- Install Caddy or nginx on the server and use the Caddy or nginx example above. Both point at
127.0.0.1:3000.
If you'd rather run the proxy in Docker as well, add a Caddy container next to the app. Save this as docker-compose.override.yml next to docker-compose.yml, which docker compose reads automatically, and change the Caddyfile's last line to reverse_proxy app:3000:
services:
caddy:
image: caddy:2
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
depends_on:
- app
volumes:
caddy_data:npm run stack names its Compose files itself and doesn't read the override: use docker compose --profile standalone up -d with it instead.
5. Tell UserTasks its address#
UserTasks builds links, redirects and cookies from the address you give it. Set:
| Variable | Set it to | What it does |
|---|---|---|
APP_URL | https://tasks.yourcompany.com | The address people open: scheme, host and port if any, no trailing slash. Used for links in emails (invitations, password resets, notifications), sign-in and SSO redirects, OAuth redirect URIs and the SCIM URL. An https:// address also makes the sign-in cookies Secure |
NEXT_PUBLIC_APP_URL | the same address | The older name for the same setting (APP_URL wins when both are set). It's also the address the build sees: a few pages are generated during the build, and for Docker it's a build argument. Keep the two equal |
APP_BASE_DOMAIN | tasks.yourcompany.com | Optional. Turns on per-workspace addresses, <workspace>.tasks.yourcompany.com. Leave it unset for one address |
With only APP_URL set, UserTasks has one address. Everything happens on it, the sign-in cookie belongs to that one host, and Settings → General → Workspace address says "Workspace addresses are off on this instance". On a self-hosted install, APP_URL alone never turns on per-workspace addresses. Friendly form links still work on the one address (https://tasks.yourcompany.com/form/<system name>), in the signed-in person's current workspace.
With APP_BASE_DOMAIN set, every name one level under it is a workspace address, and www. and app. in front of it count as the main address. Two things to get right:
- Set it to the host of
APP_URL(tasks.yourcompany.comforhttps://tasks.yourcompany.com). If you setAPP_BASE_DOMAIN=yourcompany.comwhileAPP_URLishttps://tasks.yourcompany.com, thentasksitself is read as a workspace address and the main page says "No workspace at this address". - Sharing one sign-in across the workspace addresses needs HTTPS. The cookie is shared (
Domain=tasks.yourcompany.com) only whenAPP_URLishttps://and the base domain has a dot in it. People then sign in on the main address and come back to the workspace address they asked for, so SSO settings need no wildcard entries. On plain http, each address keeps its own sign-in.
APP_BASE_DOMAIN=off turns per-workspace addresses off again.
Put the values where your install keeps its settings:
| You run | Settings file |
|---|---|
From source (npm run build, npm start) | .env.local |
Docker Compose (and npm run stack) | .env |
| Kubernetes | appUrl in your values file (the chart sets APP_URL and NEXT_PUBLIC_APP_URL from it); APP_BASE_DOMAIN under env |
For example, in .env.local or .env:
APP_URL=https://tasks.yourcompany.com
NEXT_PUBLIC_APP_URL=https://tasks.yourcompany.com
APP_BASE_DOMAIN=tasks.yourcompany.comand in a Helm values file:
appUrl: "https://tasks.yourcompany.com"
env:
APP_BASE_DOMAIN: "tasks.yourcompany.com"Restart or rebuild?#
The server reads APP_URL and APP_BASE_DOMAIN from its environment while it runs, so a restart puts them into effect: links, redirects, cookies, workspace addresses. NEXT_PUBLIC_APP_URL is also read when the app is built, for the few pages generated ahead of time, so rebuild too to keep those links right. Do both:
| You run | Then |
|---|---|
| From source | npm run build, then stop npm start (Ctrl+C) and start it again |
npm run dev | Stop it and start it again |
| Docker Compose | docker compose up -d --build (add --profile standalone if you use it). Plain docker compose up -d restarts with the new settings but keeps the old build argument |
npm run stack | npm run stack -- up (it rebuilds) |
| Kubernetes | helm upgrade usertasks deploy/helm/usertasks -n usertasks -f my-values.yaml --wait. The pods restart by themselves when the settings change. The image's own build-time address only affects the pages generated during the build: build it with --build-arg NEXT_PUBLIC_APP_URL=https://tasks.yourcompany.com to set it |
For example, with Docker Compose and the standalone profile:
docker compose --profile standalone up -d --build --waitThen open https://tasks.yourcompany.com. Everyone signs in once on the new address: sign-in cookies belong to one host name, so the old address's sign-in doesn't carry over.
6. Check it in Settings → Workspace DNS#
For per-workspace addresses, Settings → Workspace DNS shows the records to add for your base domain and checks them live. Only instance admins see it: people whose verified email address is in INSTANCE_ADMIN_EMAILS or was added with usertasks-admin instance-admins add <email> (see Instance administrators). Workspace roles, even owner, don't grant it; everyone else gets a "not found" page.
On a self-hosted install, it lists:
- The base domain to set (
APP_BASE_DOMAIN). - The wildcard record:
*.tasks.yourcompany.com, anA/AAAArecord at the same addresses astasks.yourcompany.comresolves to now (or aCNAMEto your load balancer), with copy buttons. - Certificate examples for cert-manager, Caddy and Traefik, and a reminder to forward the
Hostheader.
Check again runs the checks against a random name no workspace has (such as ut-check-1a2b3c4d.tasks.yourcompany.com), so it tests the wildcard and not a cached name. Results are kept for a minute; Check again skips the wait.
| Check | OK means |
|---|---|
| Base domain | APP_BASE_DOMAIN is set. "Not working" here means it isn't (with only APP_URL set, that's expected) |
| Wildcard DNS | The random name resolves, so every *.tasks.yourcompany.com name does |
| Apex DNS | tasks.yourcompany.com itself resolves |
| Nameservers | Which DNS provider hosts the zone. Information only |
| _acme-challenge delegation | Information only on a self-hosted install: fine when your certificate tool has API access to the DNS zone |
| Wildcard certificate | The certificate your proxy shows for the random name is valid and trusted. Skipped while the wildcard doesn't resolve, or when APP_URL is plain http |
| App answers | The random name reaches UserTasks. It answers 404, "No workspace at this address", and that's the app working |
Run Check again until Wildcard DNS, Wildcard certificate and App answers are all OK.
7. Optional: set the workspace address#
With APP_BASE_DOMAIN set, open Settings → General → Workspace address. Changing it needs Edit settings (owners and admins).
- Rules: lowercase letters a–z, numbers and hyphens, 3–40 characters, not starting or ending with a hyphen, no two hyphens in a row. Reserved names such as
www,app,api,docs,adminandmailcan't be used. Availability is checked as you type. - A head start: workspaces whose organisation slug fits the rules already have it as their address.
- Friendly form links: every reusable form then opens at
https://acme.tasks.yourcompany.com/form/<system name>. - Changing it later: links to the old address redirect to the new one for a year, and no other workspace can take the old address in that time. After that the old links stop working. Removing the address breaks them at once.
The address isn't the organisation name people type when they sign in. That stays the same. See Workspace address.
8. Update things that remember the old address#
UserTasks doesn't redirect from the old address to the new one. Requests to another host name are served as they are, so anything that still uses http://localhost:3000 or the server's IP address needs updating:
- Single sign-on. Callback URLs are built from
APP_URL, so update them in your identity provider:- Built-in auth with OIDC (
AUTH_SSO_PROVIDERS): redirect URIhttps://tasks.yourcompany.com/auth/sso/<id>/callback. - Built-in auth with SAML: ACS URL
https://tasks.yourcompany.com/auth/saml/<id>/acs. The SP entity ID defaults tohttps://tasks.yourcompany.com/auth/saml/<id>/metadata, so it changes too: update it in the identity provider, or setspEntityIdto the old value. - Supabase Auth (Google, Microsoft): the identity provider's callback is your Supabase project's URL, which doesn't change. In Supabase, Authentication → URL Configuration, set Site URL to the new address and add
https://tasks.yourcompany.com/auth/callbackto Redirect URLs.
- Built-in auth with OIDC (
- OAuth connections (DocuSign, Adobe Acrobat Sign, Dropbox Sign, PandaDoc, SignNow and other OAuth connectors): register the redirect URI
https://tasks.yourcompany.com/api/connectors/oauth/callbackin each provider's app settings. - The CLI. Log in again with the new address. Scripts and CI that set
USERTASKS_URLneed the new value too:
usertasks login --url https://tasks.yourcompany.com- Webhooks and integrations that call in, such as inbound workflow webhooks (
/api/webhooks/inbound), e-signature callbacks and SCIM provisioning (/scim/v2): change the URL in each sending system. - Scheduled jobs on Supabase (pg_cron). If the database calls the app at the old public address, store the new one in Vault (
app_base_url). From the UserTasks folder, withDATABASE_URLandCRON_SECRETset in the environment:
npm run scheduler -- install-pg-cron --base-url https://tasks.yourcompany.com- Bookmarks, shared form links and QR codes that point at the old address.
To keep old links working, have your proxy redirect the old name to the new one, as long as the old name still reaches the server (an IP address or an internal name, for example).
9. Troubleshooting#
The browser warns about the certificate#
- The certificate doesn't cover the name you opened. For a workspace address, you need the wildcard certificate (
*.tasks.yourcompany.com), which only a DNS challenge can issue. - The certificate wasn't issued yet. Check the proxy's log (
journalctl -u caddy, or certbot's output): port 80 must be open, and DNS must already point at the server. - Cloudflare's proxy is on for a name two levels down (
acme.tasks.yourcompany.com). Switch that record to DNS only.
The page keeps redirecting#
Usually Cloudflare's Flexible SSL mode, or a proxy that talks plain http to another proxy that redirects to https. Use Full (strict) in Cloudflare, and make sure the proxy in front of the app sends X-Forwarded-Proto with the scheme the browser used.
Signing in sends me back to the login page#
- The address in the browser isn't
APP_URL. Sign-in redirects go toAPP_URL, and cookies belong to one host. Open exactly that address, and checkAPP_URLhas no typo (scheme included, no trailing slash). APP_URLishttps://but you reached the app overhttp://. Browsers drop Secure cookies on plain http. Open the https address.- The proxy changes the host. It must pass the original
Hostheader. - Per-workspace addresses: set
APP_BASE_DOMAINto the host ofAPP_URL, and serve every address over https so the cookie can be shared. - Old cookies: after the change, sign out, or clear the site's cookies, then sign in again.
More causes: Signing in sends me back to the login page.
The DNS check stays red#
- Propagation: new records can take from minutes to 48 hours to show up everywhere. Run
dig +short test.tasks.yourcompany.comto see what your computer gets, then Check again later. - The wildcard name is wrong: it's
*.tasks(or*.tasks.yourcompany.com), next to thetasksrecord, not*alone, which would be*.yourcompany.com. - Base domain says "Not working":
APP_BASE_DOMAINisn't set where the app runs. Set it and restart. - App answers warns "without the app's headers": the name reaches some other web server. Point the record at the same server as
tasks.yourcompany.com, and add the wildcard name to the proxy.
The page loads, but live updates don't#
Lists and run progress update through Server-Sent Events, long-lived responses that the proxy must pass through as they arrive.
- nginx:
proxy_buffering off;and a longproxy_read_timeout(the example uses 3600s). - ingress-nginx: the
proxy-buffering: "off"andproxy-read-timeoutannotations in the Helm example. - Caddy streams them already.
- A load balancer in between (AWS ALB, Azure, Google Cloud): raise its idle timeout to a few minutes.