plom-server

usage: plom-server [-h] [--version] {init,users,launch} ...

options

--version

show program’s version number and exit

subcommands

Perform various server-related tasks.

command

Possible choices: init, users, launch

Sub-commands:

init

Initialises a directory in preparation for starting a Plom server. Creates sub-directories, config files, and various other things.

plom-server init [-h] [--port PORT] [--server-name NAME] [--no-self-signed] [--manager-pw STR]
                 [--db-name DB_NAME]
                 [dir]

Positional Arguments

dir

The directory to use. If omitted, use the current directory.

options

--port

Use alternative port (defaults to 41984 if omitted)

--server-name

The server name such as “plom.example.com” or an IP address. Defaults to something like “localhost” if omitted, but you may, e.g., want to match your SSL certificate.

--no-self-signed

Do not build self-signed SSL cert and key. You will need to provide plom-custom.key and plom-custom.cert in this case.

Default: True

--manager-pw

An initial password for the manager account. You can also use the “users” command or even omit altogether and the server will autogenerate a password.

--db-name

The name for the database, omit for a default autogen choice.

users

Manipulate users accounts, but you may want “plom-create users” instead. With no arguments, produce a template file for you to edit, with passwords displayed in plain text. Given a filename, parses a plain-text user list, performs some simple sanity checks and then hashes the passwords to a file for the server. If you prefer, you can ignore user accounts for now and create them after the server is running.

plom-server users [-h] [--demo | --auto N] [--numbered] [--server-dir DIR] [userlist]

Positional Arguments

userlist

Process the given userlist file OR if none given then produce a template.

options

--demo

Use fixed prepopulated demo userlist and passwords. DO NOT USE THIS ON REAL SERVER

Default: False

--auto

Auto-generate a random user list of N users with real-ish usernames.

--numbered

Use numbered usernames, e.g. “user17”, for the autogeneration.

Default: False

--server-dir

The server directory. If omitted, assume server files are in the current directory.

launch

Start the Plom server.

plom-server launch [-h] [--mastertoken HEX] [--logfile LOGFILE] [--no-logconsole] [dir]

Positional Arguments

dir
The directory containing the filespace to be used by this server.

If omitted the current directory will be used.

options

--mastertoken
A 32 hex-digit string used to encrypt tokens in the database.

If you do not supply one then the server will create one. If you record the token somewhere you can hot-restart the server (i.e., restart the server without requiring users to log-off and log-in again).

--logfile
A filename to save the logs. If its a bare filename it will

be relative to DIR above, or you can specify a path relative to the current working directory.

--no-logconsole
By default the server echos the logs to stderr. This disables

that. You can still see the logs in the logfile.

Default: True

Use ‘%(prog)s <subcommand> -h’ for detailed help.

Overview of running the Plom server:

  1. Make a new directory and change into it.

  2. Run ‘%(prog)s init’ - creates sub-directories and config files.

  3. Optionally use ‘%(prog)s users’ to create an initial set of users. (you can configure users later, after starting the server.)

  4. Launch the server with ‘%(prog)s launch’. If you did not create a “manager” user, note the autogenerated manager password.

  5. Configure your server: ‘plom-create’ can do this.