Deploying to Coolify
Coolify is an open-source, self-hosted PaaS (Platform as a Service) that lets you deploy applications on your own server with minimal effort. You can deploy SerpBear on Coolify using Docker Compose in just a few steps.
Prerequisites
- A running Coolify instance (v4 or later) on your server.
- A server (resource) connected to Coolify.
Creating a SerpBear App
Step 1:
Log in to your Coolify dashboard and click + Add Resource (or + Create New Resource) on your project's environment page.
Step 2:
Select Docker Compose as the resource type.
Step 3:
In the Docker Compose editor, paste the following configuration:
services:
app:
image: towfiqi/serpbear:latest
# Build from source instead of pulling the image:
# build: .
restart: unless-stopped
ports:
- "${PORT:-3000}:3000"
environment:
- USER_NAME=${USER:-admin}
- PASSWORD=${PASSWORD}
- SECRET=${SECRET}
- APIKEY=${APIKEY}
- SESSION_DURATION=${SESSION_DURATION:-24}
- NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
# Optional: Google Search Console integration
- SEARCH_CONSOLE_CLIENT_EMAIL=${SEARCH_CONSOLE_CLIENT_EMAIL:-}
- SEARCH_CONSOLE_PRIVATE_KEY=${SEARCH_CONSOLE_PRIVATE_KEY:-}
volumes:
- serpbear_data:/app/data
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:3000 || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
volumes:
serpbear_data:
Step 4:
Once the Service is created, navigate to Environment Variables screen, and set the necessary environment variable values. Details of the Environment Variables can be found here.
Step 5:
Under the General settings of your new resource, configure the domain (e.g. https://serpbear.yourdomain.com). Make sure the NEXT_PUBLIC_APP_URL environment variable matches this domain.
Coolify can automatically generate an SSL certificate for your domain using Let's Encrypt. Enable this option if you want HTTPS.
Step 6:
Click Deploy to start the SerpBear container. Coolify will pull the image and start the service. You can monitor the deployment logs in the Coolify dashboard.
Once the deployment is complete, visit your configured domain to access SerpBear.
Updating SerpBear
When a new version of SerpBear is released, simply click Redeploy on the resource page in your Coolify dashboard. Coolify will pull the latest image and restart the container. Your data is persisted in the serpbear_data volume, so nothing will be lost.