Deploy SerpBear
Self-hosted search engine rank tracker with keyword alerts and an API
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
- SerpBear source and documentation: https://github.com/towfiqi/serpbear and https://docs.serpbear.com/
- Release used by this template: https://github.com/towfiqi/serpbear/releases/tag/v3.1.2
- Official Docker image: https://hub.docker.com/r/towfiqi/serpbear
Implementation Details
- Sign in at your Railway domain with the username in
USER_NAME(defaultadmin) and the generatedPASSWORD, both shown in the service's Variables tab. RAILWAY_RUN_UID=0lets the app write to the Railway volume, which is mounted as root.SECRETalso 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
APIKEYas 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
SerpBear
towfiqi/serpbear:3.1.2
