Skip to content

Command Line Usage

Brian Aldridge edited this page Feb 8, 2019 · 3 revisions

Usage

atlasmanager [Global Options] <command> [Command Options] [Command Args] [Instances]

Global Options

--help

Prints some help on using the command

--version

Prints the atlasmanager version

Common Options

--verbose

Exposes the output of SteamCMD

--dots

Prints dots for progress

--spinner

Uses a spinner for progress

Instanceless commands

upgrade-tools

Upgrades the ATLAS server tools to the latest version

uninstall-tools

Uninstalls the ATLAS server tools

redis

Options to start, stop, restart, backup, or check status of Redis

--start

Start the Redis server

--stop

Stop the Redis server

--restart

Restart the Redis server

--status

Shows if Redis is online or offline along with the pid file

--backup

Backup current Redis database to the ATLAS backup directory

run

Runs the server without putting it into the background

list-instances

Lists the available instances

--brief

prints a single line with just the instance names

useconfig

Legacy command for specifying an instance for the following command(s)

remove-mods

Remove the specified mods from the steamcmd workshop directory

Commands acting on instances

All of the following commands take @instancename arguments to specify one or more instances, with the special @all instance selecting all instances.

run

Runs the server without putting it into the background

start

Runs the server and puts it into the background

--noautoupdate

Disables automatic updating on startup if it is enabled

--alwaysrestart

Enable automatically restarting the server even if it crashes without becoming ready for player connections.

stop

Stops the server if it is running

--warn

Warns any connected players that the server is going down

--warnreason

Gives a reason for the shutdown. Defaults to maintenance

--saveworld

Saves the world using saveworld - usually not necessary, as server usually saves the world on a graceful shutdown

restart

Runs the stop command followed by the restart command. Accepts and passes the options for those commands

--warnreason

Gives a reason for the restart. Defaults to a restart

install

Downloads and installs (or validates an existing install) of the ATLAS server

update

Updates an install of the ATLAS server (or installs it if it’s not already installed)

--force

Bypasses the check for if an update is available

--safe

Only shuts down the server when the server has saved in the past minute

--warn

Warns any connected players that the server is going down for an update

--ifempty

Only updates the server when nobody is connected

--validate

Re-validates the ATLAS server install

--saveworld

Saves the world using saveworld - usually not necessary, as server usually saves the world on a graceful shutdown

--update-mods

Updates any installed mods

--backup

Backs up the saved world and game config before updating

--stagingdir=<dir>

Sets the staging directory in order to download the update before shutting down the server

--downloadonly

Downloads the update but does not apply it. Only has effect if a staging directory is set.

--beta=<betaname>

Select the beta to install (use --beta=public to reset to the public branch. Note that --validate is required when switching branches.

--betapassword=<password>

Use password to unlock beta (for password-locked betas).

cancelshutdown

Cancels a pending update / shutdown / restart that was run with the --warn option

checkupdate

Checks if an ATLAS server update is available

Exit status
  • 0: No update is available

  • 1: An update is available

checkmodupdate

Checks if any mods need updating on the server

--revstatus

Reverses the exit code, and adds extra codes for failures

Exit status
  • 0: An update is available, or workshop files are missing

  • 1: No update is available

  • 2: One or more mods is missing from the workshop

Reversed status codes (--revstatus)
  • 0: No update is available

  • 1: An update is available

  • 2: One or more mods is missing from the workshop

  • 3: appworkshop_346110.acf is missing

  • 4: SteamCMD workshop dir does not exist

installmods

Installs all mods specified in the instance config into the ShooterGame/Content/Mods directory

uninstallmods

Deletes all mods from the ShooterGame/Content/Mods directory

installmod <modnum>[,<modnum>[,…​]]

Installs the specified mods into the ShooterGame/Content/Mods directory

uninstallmod <modnum>[,<modnum>[,…​]]

Deletes the specified mods from the ShooterGame/Content/Mods directory

removemod <modnum>[,<modnum>[,…​]]

Deletes the specified mods from the SteamCMD workshop directory

reinstallmod <modnum>[,<modnum>[,…​]]

Runs the uninstallmod command followed by the installmod command

enablemod <modnum>
enablemod <modnum>=<modtype>

Enables the atlasmod_<modnum> setting in the instance config. modtype defaults to game. Mod types:

game

A mod in GameModIds

map

The MapModId mod

tc
totalconversion

The TotalConversionMod mod

backup

Backs up the saved world and game config files to a compressed tar file in the backups directory specified in the config

broadcast "message"

Broadcasts a message to players connected to the server using the RCON broadcast command

saveworld

Saves the world using the RCON saveworld command

rconcmd "command"

Sends the specified RCON command to the server and prints its response

notify "message"

Sends the specified message using the configured Discord webhook

status

Prints the status of the ATLAS server

install-cronjob <command>

Installs a cron job that executes the specified command. This accepts any of the options the specified command accepts, as well as the following options. In order to specify an argument to the command (e.g. to the broadcast command), use the --arg=<arg> option. Please read your man 5 crontab manpage to determine what minute and hour values are valid, as some implementations may not accept e.g. the */n minute / hour specification.

--daily

The command should be executed daily

--hourly

The command should be executed hourly

--hour=<hour>

Specifies one or more hours when the command should execute. This is the hour field of the cron job. If you want to have the command execute every n hours, then use --hour='/n' Default: (i.e. all hours)

--minute=<minute>

Specifies one or more minutes of the hour when the command should execute. This is the minute field of the cron job. If you want to have the command execute every n minutes, then use --minute='*/n' Default: 0 (i.e. the first minute of the hour)

--enable-output

Enables the output from the command - the cron daemon usually emails this to the user specified in the cron configuration

--arg=<arg>

Specifies an argument to pass to the command

remove-cronjob <command>

Removes a cron job previously installed by install-cronjob

Configuration files

Global configuration

Global configuration is stored in /etc/atlasmanager/atlasmanager.cfg and/or ~/.atlasmanager.cfg.

The following options cannot be overridden in the instance config files:

atlasstChannel

Specifies the release channel (git branch) to use when upgrading the ATLAS server tools

install_bindir
install_libexecdir
install_datadir

Set by the installer to specify where to install the executable and data files

configfile_<name>

Paths to the specified instance config files

defaultinstance

The default instance to use if no instance is specified

steamcmd_user

The user under which the tools should be run. Set to --me in ~/.atlasmanager.cfg in the case of a user-install

The following options can be overridden on a per-instance basis:

steamcmdroot

The directory in which SteamCMD is installed

steamcmdexec

The steamcmd.sh executable

steamcmd_appinfocache

The path to the Steam appinfo cache file. Most systems will have this in $HOME/Steam/appcache/appinfo.vdf, but some systems have this instead in $HOME/.steam/appcache/appinfo.vdf. You will need to modify this setting if this is the case.

steamcmd_workshoplog

The path to the Steam workshop log file. Most systems will have this in $HOME/Steam/logs/workshop_log.txt, but some systems have this instead in $HOME/.steam/logs/workshop_log.txt. You will need to modify this setting if this is the case.

steamdataroot

   The path to the SteamCMD data.    Defaults to $steamcmdroot    Some SteamCMD installations store downloaded files (workshop    files, etc.) in /home/.steam instead of in the steamcmd    directory.

steamworkshopdir

The path to the SteamCMD workshop directory. Defaults to $steamdataroot/steamapps/workshop Some SteamCMD installations use SteamApps as the steamapps directory instead of steamapps

atlasserverexec

The relative path within an ATLAS server install where the ATLAS server executable can be found. For the standard ATLAS server, this should be ShooterGame/Binaries/Linux/ShooterGameServer

atlasbackupdir

The directory in which to store backups. Can be overridden in the instance config.

atlaswarnminutes

The number of minutes over which the shutdown and update warnings should be run

atlasautorestartfile

The relative path within an ATLAS server install to place the autorestart lock file

atlasAlwaysRestartOnCrash

Set to true to enable automatically restarting even when the server has not become ready for player connections. Be aware that this may cause the server to enter an endless crash-restart loop if the cause of the crash is not resolved.

atlasAutoUpdateOnStart

Set to true to enable updating before server startup

atlasBackupPreUpdate

Set to true to enable automatic backups before updating

atlasStagingDir

Sets the staging directory in order to download updates before shutting down the server

atlasMaxBackupSizeMB

Limits the size of the stored backups

atlasPriorityBoost

Attempts to boost the priority of the ATLAS server. Negative values give a higher priority, and positive values give a lower priority. Requires sudo and renice

atlasCpuAffinity

Attempts to set the CPU affinity of the ATLAS server. Setting is a comma-delimited list of processor indices on which the server should run. Requires sudo and taskset

msgWarnUpdateMinutes
msgWarnUpdateSeconds
msgWarnRestartMinutes
msgWarnRestartSeconds
msgWarnShutdownMinutes
msgWarnShutdownSeconds

Templated messages for warnings, where %d is replaced with the number of minutes / seconds before the update / restart / shutdown

msgWarnReason
msgTimeMinutes
msgTimeSeconds
msgReasonUpdateApp
msgReasonUpdateMod
msgReasonUpdateAppMod
msgReasonRestart
msgReasonShutdown

Alternative templated messages for warnings with the following replacement parameters:

{reason}

Valid in msgWarnReason, replaced at runtime with the appropriate msgReason* template

{time}

Valid in msgWarnReason and msgReason*, replaced at runtime with the appropriate msgTime* template

{modnamesupdated}

Valid in msgReason*Mod, replaced at runtime with a comma-delimited list of updated mod names

{minutes}

Valid in msgTimeMinutes, replaced at runtime with minutes remaining until shutdown

{seconds}

Valid in msgTimeSeconds, replaced at runtime with seconds remaining until shutdown

discordWebhookURL

Discord Webhook URL - server status messages and update warning messages will be sent through this if specified

notifyTemplate

Template to use for sending messages through Discord webhook, with the following replacement parameters:

{instance}

Instance name

{server}

Server hostname

{msg}

Message

notifyMsgShuttingDown

Message to be sent when shutting down. Use - to disable.

notifyMsgStarting

Message to be sent when starting. Use - to disable.

notifyMsgServerUp

Message to be sent when server starts listening. Use - to disable.

notifyMsgStoppedListening

Message to be sent when server has stopped listening for more than 1 minute. Use - to disable.

notifyMsgServerTerminated

Message to be sent when server has crashed and is being restarted. Use - to disable.

noNotifyWarn

Disable notification at start of shutdown warning period

logdir

Specifies where to store log files

appid

The Steam AppID of the ATLAS server

mod_appid

The Steam AppID of the ATLAS client (used for downloading mods)

mod_branch

The Mod branch (Windows or Linux) to use. Virtually all mods use the Windows branch for the ATLAS server, and the Linux branch almost always crashes the server

ATLAS server options:

serverMap

The map the server should use

serverMapModId

Uses the -MapModID=<modid>?…​ option to specify the server map mod ID

atlas_<optname>="<optval>"

Specifies the options to use in the Map?Option=Val?…​ option string passed to the server

atlas_<optname>=""

Specifies an option without a value - Map?Option?…​

atlasflag_<optname>=<anything>

Specifies a dash-option without a value (i.e. flag) - e.g. atlasflag_DisableDeathSpectator=true adds the -DisableDeathSpectator flag

atlasopt_<optname>="<optval>"

Specifies a dash-option with a value - e.g. atlasopt_StructureDestructionTag=DestroySwampSnowStructures adds the -StructureDestructionTag=DestroySwampSnowStructures option.

Instance config files

Instance config files are stored under /etc/atlasmanager/instances/<instancename>.cfg, ~/.config/atlasmanager/instances/<instancename>.cfg or as specified in the configfile_<instancename> options in the global config.

atlasserverroot

The directory under which the ATLAS server is installed

serverMap

The map the server should use

serverMapModId

Uses the -MapModID=<modid>?…​ option to specify the server map mod ID

atlas_<optname>="<optval>"

Specifies the options to use in the Map?Option=Val?…​ option string passed to the server

atlas_<optname>=""

Specifies an option without a value - Map?Option?…​

atlasflag_<optname>=<anything>

Specifies a dash-option without a value (i.e. flag) - e.g. atlasflag_DisableDeathSpectator=true adds the -DisableDeathSpectator flag

atlasopt_<optname>="<optval>"

Specifies a dash-option with a value - e.g. atlasopt_StructureDestructionTag=DestroySwampSnowStructures adds the -StructureDestructionTag=DestroySwampSnowStructures option.

atlasmod_<modnum>=<modtype>

Specifies a mod that can be enabled or disabled using enablemod and disablemod. Note that mod ids specified using these options are in addition to those specified directly in the atlas_GameModIds option, and override those specified in the atlas_MapModId, serverMapMod and atlas_TotalConversionMod options. Options are processed in the order they are specified in the instance config file, and atlasmod_* options in the common config file are not applied. Mod types:

game

A mod to be specified in GameModIds

map

The mod to be specified in MapModId

tc
totalconversion

The mod to be specified in TotalConversionMod

disabled

A disabled mod

Common ATLAS options

atlas_TotalConversionId=<modid>

Specifies the Total Conversion to use

atlas_GameModIds=<modid>,<modid>,…​

Specifies the Mod IDs to use

atlas_SessionName="<sessionname>"

The name under which the server should announce itself

atlas_RCONEnabled="True"

Enabled RCON

atlas_RCONPort=<portnum>

The port on which the server listens for RCON commands. Must be unique on the host.

atlas_Port=<portnum>

The port on which the server listens for client connections. Must be unique on the host.

atlas_QueryPort=<portnum>

The port on which the server listens for queries. Must be unique on the host.

atlas_ServerPassword="<password>"

Specifies the password needed to connect to the server

atlas_ServerAdminPassword="<password>"

Specifies the server admin password, which is also the RCON password. Use of this option is discouraged - please store the password in the GameUserSettings.ini file instead.

atlas_MaxPlayers=<numplayers>

The maximum number of players allowed to connect to the server

atlas_AltSaveDirectoryName="<dirname>"

Alternative directory under ShooterGame/Saved under which to save the world files. If multiple instances run from the same directory, this must be unique between these instances.

atlasflag_NoBattlEye=true

Disables BattlEye