Skip to content

Installing Surmai

Surmai is only available as a self hosted application at this time. It can be deployed as a Docker container on your server and accessed via a browser.

TIP

If you would rather use a managed service, check out Surmai Go.

Using a docker compose file

yaml
volumes:
  surmai_data:

services:
  surmai_server:
    container_name: surmai_server
    # latest images point to released versions
    # For the yet unreleased updates, use the main tag i.e.
    # image: ghcr.io/rohitkumbhar/surmai:main
    image: ghcr.io/rohitkumbhar/surmai:latest
    volumes:
      - surmai_data:/pb_data
    ports:
      - "9090:8080"
    restart: always
    environment:
      SURMAI_ADMIN_EMAIL: admin@surmai.app # Add your default administrator email
      SURMAI_ADMIN_PASSWORD: ChangeMe123#@! # Admin password. Minimum 9 characters with mixed case, numbers, and special characters
      PB_DATA_DIRECTORY: /pb_data # Must match volume directory above

Environment Variables

KeyDescriptionDefault Value
SURMAI_ADMIN_EMAILREQUIRED: E-Mail address for the administrative user
SURMAI_ADMIN_PASSWORDREQUIRED: Password for the administrative user
PB_DATA_DIRECTORYREQUIRED: Data directory set in the volume mapping

Deploying with backup using Litestream Replication

TIP

This is completely optional. Pocketbase offers a built-in backup solution that snapshots your database on a given schedule.

Surmai uses SQLite as its database which can be replicated using Litestream to an S3 compatible storage. The following environment variables are required for enabling continuous replication via litestream replicate.

KeyDescriptionDefault Value
SURMAI_DB_BKP_ENABLEDSet to true to enable backupunset
SURMAI_DB_BKP_BUCKET_NAMEREQUIRED: Name of the bucket
SURMAI_DB_BKP_BUCKET_PATHOPTIONAL: Path inside the bucket
SURMAI_DB_BKP_ENDPOINT_URLREQUIRED: Bucket endpoint URL
SURMAI_DB_BKP_REGIONREQUIRED: Region for the endpoint
SURMAI_DB_BKP_ACCESS_KEY_IDREQUIRED: Access key with write access to the bucket
SURMAI_DB_BKP_ACCESS_KEY_SECRETREQUIRED: Secret associated with the access key

Released under the MIT License.