Learn how to deploy an onchain app using Fleek.
Use this template
button, and create a new repository from the template. Clone your repo and open it in an editor.
Install bun if you need to, and install dependencies.
localhost:3000
and make sure that it’s working, then shut down the server. For this tutorial, you do not need to set any environment variables.
next.config.js
and update the nextConfig
.
bun run build
and confirm that a directory called out
is created.
Navigate to Fleek’s website and create an account, or log in if you already have one.
Click into First Project
. You can rename it if you want in the Settings
tab.
The best way to start is to link Fleek to your repo from the beginning. Click Add New
from the upper right corner, then select Deploy My Site
. Select your code location, log into your Git provider, and accept installing the Fleek app.
You can either give it permissions for all repos, or add them one at a time.
Select your repo, and click the Deploy
button. The Configure Site
window should automatically populate with the appropriate information, but just in case:
Deploy Site
. Your deploy will probably fail, but this is expected!
Return to your code editor.
Open a terminal and install the Fleek CLI with:
Confirm
in the web page that opens up. Once you are connected, click the Visit Dashboard
button. The site automatically creates a project called First Project
. If you’d like, you can rename it, or add a new one.
Each project can include more than one site.
Return to your terminal in the app folder, and run:
First Project
from the list
We've found existing sites. Would you like to link to one of them?
, pick: Y
Find the site you just added and select it.
TypeScript (fleek.config.ts)
in the final prompt. Select JSON (fleek.config.json)
.out
Y
build
command:
npm install && npm run build
JSON (fleek.config.json)
src/app/page.tsx
, committing your changes, and pushing to your repo.
Sites
tab. Click on the card for your new site to open it. Here, you can see information about your site in a similar presentation to other deployment providers.
Click on the <-> Deploys
tab and you’ll see the automatic deploy you triggered by pushing the commit! Open your site by clicking on the build once it shifts from Pending
to Live
. You can then click on the link to view your site.
Click on Settings
. If you’d like, you can change the slug for your site to a name that’s more related to your project.