SerpBear
  • Introduction
  • Getting Started
  • How SerpBear works
  • Integrations
  • deployment
    • Running SerpBear Locally
    • Running Locally with Docker
    • Deploying SerpBear on a Server
    • Deploying to Fly.io (Free)
    • Deploying to PikaPods (1-click)
    • Deploying to Elestio (1-Click)
  • Miscellaneous
    • Environment Variables
    • API Documentation
    • Integrate Google Search Console
    • Integrate Google Ads
    • Tutorials
Powered by GitBook
On this page
  1. deployment

Deploying to Fly.io (Free)

PreviousDeploying SerpBear on a ServerNextDeploying to PikaPods (1-click)

Last updated 1 year ago

The easiest way to deploy your own instance of SerpBear online is to use Fly.io . Follow the steps below to install the app locally, build it, and then deploy it to fly.io

Step 1:

Make sure and are installed on your computer. Then install

Step 2:

Clone the repo by running:

git clone git@github.com:towfiqi/serpbear.git
cd serpbear

Step 3:

Then Create your Fly.io app by running this command. Replace johndoeserp with an app name that is unique in fly.io Note that this unique name will be used to create your app domain. eg: https://johndoeserp.fly.dev

fly launch --name johndoeserp --region lax

Step 4:

Since Fly.io container data is not persistent, you will have to save the database file in a fly.io volume and then connect that volume to your app. So First Create a volume in your Fly account.

fly volumes create serpbear_data --size 1 --region lax

Step 5:

Open the newly created fly.toml file in your serpbear directory and add this to the very bottom to connect the newly created volume to your app.

[mounts]
    source="serpbear_data"
    destination="/app/data"

Step 6:

From the same fly.toml file, replace internal_port = 8080 with internal_port = 3000

Step 7:

You will also need to set the secret Environment variables for your Fly.io app instance. From the following command, replace johndoeserp with the app name you set in step 4. Then run the following command:

fly secrets set --app johndoeserp USER=admin PASSWORD=999999 NEXT_PUBLIC_APP_URL=https://johndoeserp.fly.dev/ SESSION_DURATION=24 APIKEY=5saedXklbylhnatihe2pihp3pih4fdnakljwq9 SECRET=4715aed3216f7b0a38e6b234a958362654e56d10fbc04700770d472af3dce43625jd

Step 8:

Finally, Deploy the app to fly.io with the following command:

fly deploy

Updating the App

When there is a new release, you can simply run these commands to update the app & re-deploy it:

git pull
fly deploy

The details of the required environment variables can be found .

git
nodejs
flyctl
SerpBear
here