You can self-host Trigger.dev on your own infrastructure using Docker.
Please consider these additional warnings
docker-provider
does not currently enforce any resource limits. This means your tasks can consume up to the total machine CPU and RAM. Having no limits may be preferable when self-hosting, but can impact the performance of other services.On a Debian server, you can run these commands
.env
file.env
file with the generated ones
1234-42-42-42-42.ngrok-free.app
TRIGGER_PROTOCOL
and TRIGGER_DOMAIN
lines in the .env
file. Set it to the domain you copied.
.env
file and add the registry details
docker-provider
container so it can pull deployment images to run your tasks.webapp
argument.env
file from the webapp to the worker machine:worker
argumentv3
tag. You can override this by specifying a different tag in your .env
file. For example:
EMAIL_TRANSPORT
env var is not set, the magic links will be logged by the webapp container and not sent via email.
Depending on your choice of mail provider/transport, you will want to configure a set of variables like one of the following:
SMTP_SECURE=false
does not mean the email is sent insecurely.
This simply means that the connection is secured using the modern STARTTLS protocol command instead of implicit TLS.
You should only set this to true when the SMTP server host directs you to do so (generally when using port 465)
AWS_REGION
, AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
or, when running on AWS, use credentials supplied by the EC2 IMDS.
WHITELISTED_EMAILS
env var. For example:
https://<your_domain>/auth/github/callback
and you will have to set the following env vars:
/etc/docker/daemon.json
FORCE_CHECKPOINT_SIMULATION=0
in your .env
file. Alternatively, run this:.env
file, but we will try to keep these changes to a minimum. Check the .env.example
file for new variables.
git stash
.git checkout main
in your docker repo.git pull
to get the latest updates.git stash pop
../update.sh
to pull them../stop.sh && ./start.sh
and you’re good to go.deploy
needs registry access:docker-provider
needs registry access:--api-url
or -a
flag. For example:
list-profiles
command:
whoami
command, which will also show the API URL:
--self-hosted
and --push
flags. For example:
TRIGGER_API_URL
and TRIGGER_ACCESS_TOKEN
environment
variables to point at your self-hosted instance and authenticate.
For more detailed instructions, see the GitHub Actions guide.
TRIGGER_TELEMETRY_DISABLED
environment variable in your .env
file. The value doesn’t matter, it just can’t be empty. For example: