How to deploy thirdweb Engine to your local machine
In this support article, you'll learn how to deploy thirdweb Engine quickly to your local machine. No extra configuration or setup is needed. Without further ado, let’s get started!
Requirements
- Docker
- Git
- NodeJS
- thirdweb API secret key
- Admin wallet address
Getting Started
- Create a new folder in your local machine and name it “local-engine” or any name you prefer.
- Navigate to the folder you created, and then open your terminal.
- In your terminal, run
https://github.com/thirdweb-example/engine-deploy-local
(yes, include a dot at the end to specify that you want to use the current directory as your project folder.)
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Ff6d1ff84-8c0e-4bcb-8dd6-edab3b3c175b%2Ff6fa59fb-a22a-4629-a500-fb1416b788a4%2Fimage_720.png?table=block&id=8d68e770-2aae-4fc3-8ae8-6e940ebff6a7&cache=v2)
- Once you have cloned it, check the repo's contents by doing
ls -la
if you're on a Linux-based machine (you can use GitBash if you're Windows) anddir
if you're on a Windows machine if you are using CMD.
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Ff6d1ff84-8c0e-4bcb-8dd6-edab3b3c175b%2F8e952fef-97c6-4777-b967-a6a022de9454%2Fimage_(5).png?table=block&id=6db2acd6-16d8-4472-b8ee-b19bed6292a7&cache=v2)
- Fill out the required information to run your Engine locally by opening the
.env.example
file usingnano
orvscode
. You can docode .env.example
to open the file on VS Code and you can donano .env.example
to edit the file within the terminal immediately. DoCTRL+X
, pressY
, and thenEnter
to exit and save the Nano mode.
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Ff6d1ff84-8c0e-4bcb-8dd6-edab3b3c175b%2F39edfbea-88a0-4a7f-908a-933f308a59ba%2FUntitled.png?table=block&id=bf7deae9-5e82-4c5a-a96a-af44623b06b4&cache=v2)
ADMIN_WALLET_ADDRESS
= The wallet address you want to use as an admin for your engine.
THIRDWEB_API_SECRET_KEY
= You can get this from your thirdweb dashboard account.
ENCRYPTION_PASSWORD
= Your password for your Engine; this can be anything you want.
- Start Docker on your local machine. Don't skip this step, or else it will not work.
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Ff6d1ff84-8c0e-4bcb-8dd6-edab3b3c175b%2Fd8819876-be4b-4081-95de-d7abf821c72c%2FUntitled.png?table=block&id=f5747581-93b5-45cb-9686-019764bbf096&cache=v2)
- Lastly, run
npm run start
, and the repo script will install and configure everything for you.
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Ff6d1ff84-8c0e-4bcb-8dd6-edab3b3c175b%2Fa5fe14a3-ce74-4b17-ad40-d41c36d2c0d7%2FUntitled.png?table=block&id=e1fd5243-0409-4afa-89d7-b234d3482c47&cache=v2)
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Ff6d1ff84-8c0e-4bcb-8dd6-edab3b3c175b%2Fe6a7a9a8-2a14-4a67-9007-62694fbe2a33%2FUntitled.png?table=block&id=04f0161e-f85f-473b-8ca9-b41270bbd0d7&cache=v2)
- That's it! All you have to do is copy the
http://localhost:3005
and import it to your thirdweb Engine dashboard.
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Ff6d1ff84-8c0e-4bcb-8dd6-edab3b3c175b%2F575fd7a0-d849-4d97-b135-bc2671ff0198%2FUntitled.png?table=block&id=f347a3f7-2963-4528-9aaa-504aba8e5454&cache=v2)
If you decide to use Engine in production, we recommend using our cloud-hosted version, managed by the thirdweb team. Alternatively, you can choose to manage and self-host your own Engine. Learn more about the difference between cloud-hosted and self-hosted here.
Can’t get this working? If you’ve followed the above and still have issues, contact our support team for help.