Deploy SerpBear

Self-hosted search engine rank tracker with keyword alerts and an API

Deploy SerpBear

Just deployed

/app/data

Deploy and Host SerpBear on Railway

SerpBear is an open-source search engine rank tracker. You add your domains and keywords, and it checks where each keyword ranks in Google, keeps a position history with charts, and can send daily or weekly e-mail reports. It also connects to Google Search Console and offers a small REST API.

About Hosting SerpBear

SerpBear is a single Next.js application with a built-in cron worker, so this template deploys one service from the official towfiqi/serpbear image, pinned to v3.1.2 by digest. Its SQLite database and settings are stored on a Railway volume at /app/data, so they survive redeploys. The login password, the session and encryption secret, and the API key are generated for you at deploy time. Database migrations run on every start, and Railway health-checks the login page. To fetch rankings you add your own scraper (for example Serper, ScrapingAnt or SearchApi) in Settings. SMTP and Search Console are optional.

Common Use Cases

  • Track the Google positions of your own or your clients' sites for chosen keywords, by country and device
  • Get scheduled e-mail reports when keyword positions change
  • Pull ranking data into dashboards or scripts through the SerpBear API

Dependencies for SerpBear Hosting

  • A scraping service account (Serper, ScrapingAnt, ScrapingRobot, SearchApi, SerpApi, ValueSerp, Serply, SpaceSerp, HasData, Crazyserp or your own proxy), added in SerpBear's Settings
  • Optional: an SMTP account for e-mail notifications, and a Google Search Console service account

Deployment Dependencies

Implementation Details

  • Sign in at your Railway domain with the username in USER_NAME (default admin) and the generated PASSWORD, both shown in the service's Variables tab.
  • RAILWAY_RUN_UID=0 lets the app write to the Railway volume, which is mounted as root.
  • SECRET also encrypts the scraper, SMTP and Search Console keys saved in Settings. Don't change it after setup, or you'll have to enter those keys again.
  • API calls use the generated APIKEY as a bearer token, and only the read, refresh and notify routes accept it:
curl -H "Authorization: Bearer $APIKEY" https://your-serpbear.up.railway.app/api/domains
curl -H "Authorization: Bearer $APIKEY" "https://your-serpbear.up.railway.app/api/keywords?domain=example.com"

Why Deploy SerpBear on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying SerpBear on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Plausible WordPress
Cookie-free WordPress stats from your own Plausible

onepush
0
View Template
Typesense Multilingual
Locale-aware multilingual search with Typesense

onepush
0
View Template
Formbricks
Surveys, NPS and in-app feedback on your own Postgres, Hub and Cube

Two Workspaces
3