Skip to content

erii server

Manage the erii backend service (a Java-based Ktor server).

erii server [start]

Without a subcommand, start is used by default.

Subcommands

Subcommand Description
start Start the service (default) as a detached background process
stop Stop the running service
status Show the service status
restart Restart the service

Foreground mode

The service runs as a detached background process by default. Background mode only detaches the process from the current terminal: the CLI does not monitor it or restart it after a crash. Use an external process manager such as Supervisor, runit, or a container restart policy when automatic recovery is required.

Add -f / --foreground on start to run in the foreground, streaming logs to the current terminal; stop with Ctrl+C:

erii server start -f

Useful for debugging or container environments (containers usually need a long-running foreground process).

restart does not support foreground mode. It performs one manual restart into detached background mode; it does not enable an automatic restart policy.

Passing arguments to Java

start and restart forward extra arguments to the underlying Java process: arguments starting with -D become JVM system properties, the rest become program arguments.

erii server start -Dsome.prop=value

Common examples

erii server            # start (detached background process; no auto-restart)
erii server start -f   # start in the foreground
erii server status     # show status
erii server restart    # restart
erii server stop       # stop