Skip to main content

Command Palette

Search for a command to run...

How to Set Up thirdweb Engine Quickly On Your Local Machine

You'll learn how to set up thirdweb Engine instantly on your local machine.

Updated
โ€ข3 min read
How to Set Up thirdweb Engine Quickly On Your Local Machine
W

A Filipino self-taught software engineer, open-source maintainer, cybersecurity researcher, tech community builder, Web3 enthusiast, and technopreneur from the Philippines. ๐Ÿ’ป๐Ÿ’–โ˜•

Previously, we learned how to deploy the thirdweb Engine in less than 3 minutes on the Railway platform using the template we created for the community.

In this blog, you'll learn how to deploy it on your local machine so you can explore and experiment with the thirdweb Engine for your next or current Web3 project.

Requirements

๐Ÿ’ก
Are you looking for a managed thirdweb Engine? Try Cloud-Hosted!

Steps

  1. Open your terminal on your local machine and execute the command below. It will clone my scripts into a new folder called engine.

     git clone https://github.com/warengonzaga/thirdweb-engine-deploy-locally engine
    

    A screenshot of a command line interface where a user clones a GitHub repository named "thirdweb-engine-deploy-locally" into a local directory, lists files in a directory, and navigates between directories.

  2. Navigate to the engine folder and open the file named .env.example. Fill out the required information. I prefer to use the Nano text editor in this guide because it is straightforward.

    A screenshot of a computer terminal showing the GNU nano text editor open with a file named ".env.example" containing environment variable settings for thirdweb engine.

    ADMIN_WALLET_ADDRESS โ†’ The wallet address that can manage your engine.
    THIRDWEB_API_SECRET_KEY โ†’ The thirdweb API secret key; get yours here.
    ENCRYPTION_PASSWORD โ†’ The string to encrypt sensitive data stored in DB.

    ๐Ÿ’ก
    To save your changes in the Nano text editor, press CTRL+X. It will then ask you to confirm the save. Simply press Y and then hit ENTER to complete the process.
  3. After that, start Docker on your local machine and ensure it is running.

    Screenshot of Docker Desktop interface showing an empty state for running containers with informational tooltips about containers and how to run them.

  4. Now, return to your terminal and run npm run start, and it will handle everything for you. Watch your terminal pull the thirdweb engine docker image and set up your container. If you see the message below, your engine has been successfully deployed and is ready to use.

    A screenshot of a computer terminal displaying logs and warnings from a Node.js application, including messages about starting a PostgreSQL connection and listening on port 3005.

  5. Lastly, visit your endpoint URL at http://localhost:3005 , and you should see something like the example below. That's it! โœจ

    A screenshot of a computer screen displaying a JSON response message that reads "Engine is set up successfully. Manage your Engine from https://thirdweb.com/dashboard/engine." in a code editor with a dark background.

Now that you have the endpoint URL, let's import your instance to the thirdweb Engine dashboard. Follow the steps here.

Try Engine Examples

To explore and experience the capabilities of thirdweb Engine, try some of our templates. Here are some of the best templates we have today for building with thirdweb Engine.

Mintcaster

Screenshot of Mintcaster template

Bootstrap your own client on Farcaster, complete with a feed, cast functionality, and Sign-in with Farcaster auth, and add NFT minting functionality using the thirdweb Engine.

Phygital Experience

Screenshot of Phygital Experience template

Users can scan a QR code on a physical product to mint an NFT using the thirdweb engine. Perfect for buying and selling digital items physically.

Speed Racer

Screenshot of Speed Racers template

Try this template with the thirdweb Engine and Unreal game engine to build your own racing game powered by the blockchain.

That's all! Enjoy, and keep building! ๐Ÿซถ

L
Lix T1y ago

I keep getting an loop error: thirdweb-1 | โŒ Invalid environment variables: { REDIS_URL: [ 'Required' ] }

in the console... using node v20.10.0 (npm v10.8.1)

1
W

Hey there, I'm sorry, but the guide here is kind of outdated. Kindly use this repository instead: https://github.com/thirdweb-example/engine-deploy-local

I'll update the guide as soon as I have time.

L
Lix T1y ago

Waren Gonzaga Thanks for the reply the problem still persists.. I'm trying something on top of this...

W

Lix T I see, can you reach out directly to our support site? https://thirdweb.com/support and submit a ticket. Thanks! I'm currently OOO. ๐Ÿฅฒ