Smos Logo Smos

A comprehensive self-management system

The Smos Server

Documentation for the Smos Server, for hosting your own Smos API

You can set up your own Smos server to host your own syncing.

A community sync-server has been set up at api.smos.online in case do not want to do that.

Reference

Arguments

Usage: smos-server [--config-file FILE_PATH] [--log-level ARG] 
                   [--uuid-file FILEPATH] [--database-file FILEPATH] 
                   [--signing-key-file FILEPATH] [--port PORT] 
                   [--max-backup-size-per-user BYTES] 
                   [--(enable|disable)-auto-backup] 
                   [--auto-backup-phase SECONDS] [--auto-backup-period SECONDS] 
                   [--(enable|disable)-backup-garbage-collector] 
                   [--backup-garbage-collector-phase SECONDS] 
                   [--backup-garbage-collector-period SECONDS] 
                   [--(enable|disable)-file-migrator] 
                   [--file-migrator-phase SECONDS] 
                   [--file-migrator-period SECONDS] [--admin USERNAME] 
                   [--booking-email-address EMAIL_ADDRESS] 
                   [--stripe-secret-key SECRET_KEY] 
                   [--stripe-publishable-key PUBLISHABLE_KEY] 
                   [--stripe-price PRICE_ID] [--freeloader USERNAME]

  
  Smos API Server version: 0.12.1
  
  Server API version: 0.4.0
  
  Oldest parseable Smos data format version: 0.0.0
  Newest parseable Smos data format version: 2.0.0

Available options:
  -h,--help                Show this help text
  --config-file FILE_PATH  The config file to use
  --log-level ARG          The log level to use, options:
                           ["Debug","Info","Warn","Error"]
  --uuid-file FILEPATH     The file to use for the server uuid
  --database-file FILEPATH The file to use for the server database
  --signing-key-file FILEPATH
                           The file to use for the JWT signing key database
  --port PORT              The port to serve on
  --max-backup-size-per-user BYTES
                           The maximum number of bytes that backups can take up
                           per user
  --(enable|disable)-auto-backup
                           Enable/disable enable the auto-backup looper
                           (default: True)
  --auto-backup-phase SECONDS
                           the phase for the auto-backup looper in seconsd
  --auto-backup-period SECONDS
                           the period for the auto-backup looper in seconds
  --(enable|disable)-backup-garbage-collector
                           Enable/disable enable the backup-garbage-collector
                           looper (default: True)
  --backup-garbage-collector-phase SECONDS
                           the phase for the backup-garbage-collector looper in
                           seconsd
  --backup-garbage-collector-period SECONDS
                           the period for the backup-garbage-collector looper in
                           seconds
  --(enable|disable)-file-migrator
                           Enable/disable enable the file-migrator looper
                           (default: True)
  --file-migrator-phase SECONDS
                           the phase for the file-migrator looper in seconsd
  --file-migrator-period SECONDS
                           the period for the file-migrator looper in seconds
  --admin USERNAME         The user that will have admin rights
  --booking-email-address EMAIL_ADDRESS
                           Email address to send booking emails from
  --stripe-secret-key SECRET_KEY
                           The stripe api secret key
  --stripe-publishable-key PUBLISHABLE_KEY
                           The stripe api publishable key
  --stripe-price PRICE_ID  The stripe price id
  --freeloader USERNAME    The username of a user that will not have to pay

Environment

Available environment variables:

  SMOS_SERVER_ADMIN
                         The user that will have admin
                         rights
  SMOS_SERVER_AUTO_BACKUP_ENABLED
                         Whether to enable this looper
  SMOS_SERVER_AUTO_BACKUP_PERIOD
                         The amount of time to wait between
                         runs of the looper, in seconds
  SMOS_SERVER_AUTO_BACKUP_PHASE
                         The amount of time to wait before
                         starting the looper the first
                         time, in seconds
  SMOS_SERVER_BACKUP_GARBAGE_COLLECTOR_ENABLED
                         Whether to enable this looper
  SMOS_SERVER_BACKUP_GARBAGE_COLLECTOR_PERIOD
                         The amount of time to wait between
                         runs of the looper, in seconds
  SMOS_SERVER_BACKUP_GARBAGE_COLLECTOR_PHASE
                         The amount of time to wait before
                         starting the looper the first
                         time, in seconds
  SMOS_SERVER_BOOKING_EMAIL_ADDRESS
                         Email address to send booking
                         emails from
  SMOS_SERVER_CONFIG_FILE
                         Workflow directory
  SMOS_SERVER_DATABASE_FILE
                         The file to store the server
                         database in
  SMOS_SERVER_FILE_MIGRATOR_ENABLED
                         Whether to enable this looper
  SMOS_SERVER_FILE_MIGRATOR_PERIOD
                         The amount of time to wait between
                         runs of the looper, in seconds
  SMOS_SERVER_FILE_MIGRATOR_PHASE
                         The amount of time to wait before
                         starting the looper the first
                         time, in seconds
  SMOS_SERVER_FREELOADERS
                         The usernames of users that will
                         not have to pay, comma separated
  SMOS_SERVER_LOG_LEVEL
                         The minimal severity of log
                         messages
  SMOS_SERVER_MAX_BACKUP_SIZE_PER_USER
                         The maximum number of bytes that
                         backups can take up per user
  SMOS_SERVER_PORT
                         The port to serve web requests on
  SMOS_SERVER_SIGNING_KEY_FILE
                         The file to store the JWT signing
                         key in
  SMOS_SERVER_STRIPE_PRICE
                         The stripe price id
  SMOS_SERVER_STRIPE_PUBLISHABLE_KEY
                         The stripe api publishable key
  SMOS_SERVER_STRIPE_SECRET_KEY
                         The stripe api secret key
  SMOS_SERVER_UUID_FILE
                         The file to store the server uuid in

Configuration

# Configuration
log-level: # optional
  # The minimal severity for log messages
  # or null
  def: LogLevel
  # The log level to use, options:
  # ["Debug","Info","Warn","Error"]
  <string>
uuid-file: # optional
  # The file in which to store the server uuid
  # or null
  <string>
database-file: # optional
  # The file in which to store the database
  # or null
  <string>
signing-key-file: # optional
  # The file in which to store signing key for JWT tokens
  # or null
  <string>
port: # optional
  # The port on which to serve api requests
  # or null
  <number> # between -9223372036854775808 and 9223372036854775807
max-backups-per-user-per-period: # optional
  # The maximum number of backups per user per period
  # any of
  [ null
  , # Period
    period: # required
      # period, in seconds
      <number>
    max-backups: # required
      # maximum backups in this period
      <number> # between 0 and 18446744073709551615
  , - # Period
      period: # required
        # period, in seconds
        <number>
      max-backups: # required
        # maximum backups in this period
        <number> # between 0 and 18446744073709551615
  ]
max-backup-size-per-user: # optional
  # The maximum number of bytes that backups can take up per user
  # or null
  <number> # between 0 and 18446744073709551615
auto-backup: # optional
  # The configuration for the automatic backup looper
  # or null
  def: LooperConfiguration
  # LooperConfiguration
  # any of
  [ enable: # optional
      # Enable this looper
      # or null
      <boolean>
  , enabled: # optional
      # Enable this looper
      # or null
      <boolean>
  ]
  phase: # optional
    # The amount of time to wait before starting the looper the first time, in seconds
    # or null
    <number> # between 0 and 18446744073709551615
  period: # optional
    # The amount of time to wait between runs of the looper, in seconds
    # or null
    <number> # between 0 and 18446744073709551615
backup-garbage-collector: # optional
  # The configuration for the automatic backup garbage collection looper
  # or null
  ref: LooperConfiguration
file-migrator: # optional
  # The configuration for the automatic file format migrator looper
  # or null
  ref: LooperConfiguration
admin: # optional
  # The username of the user who will have admin rights
  # or null
  <string>
booking-email-address: # optional
  # Email address to send booking emails from
  # or null
  <string>
monetisation: # optional
  # Monetisation configuration. If this is not configured then the server is run entirely for free.
  # or null
  # MonetisationConfiguration
  stripe-secret-key: # optional
    # The secret key for calling the stripe api
    # or null
    <string>
  stripe-publishable-key: # optional
    # The publishable key for calling the stripe api
    # or null
    <string>
  stripe-price: # optional
    # The stripe identifier of the stripe price used to checkout a subscription
    # or null
    <string>
  freeloaders: # optional
    # default: []
    # The usernames of users that will not have to pay
    # or null
    - <string>