Long Appium server commands are easy to drift between local terminals, launch scripts, and CI jobs. A project config file keeps the server bind address, port, logging style, and startup-only options in one file before the server process starts.
Appium can read JSON, YAML, JavaScript, and CommonJS config files. The recommended auto-discovered filename is .appiumrc.json, and --config points Appium at an explicit file when the server is launched from another directory.
Server configuration belongs under the top-level server key, and option names use the same kebab-case spelling as the command line. Capabilities still belong in the client or Inspector session request, not in the server config file; command-line options override the same file values for one run.
Related: How to install Appium
Related: How to start the Appium server
Related: How to use APPIUM_HOME for Appium extensions
$ vi .appiumrc.json
{
"server": {
"address": "127.0.0.1",
"port": 4725,
"log-level": "info",
"log-no-colors": true
}
}
The same option names work in YAML or JavaScript config files. JSON is a good project default because Appium searches for .appiumrc.json automatically.
$ python3 -m json.tool .appiumrc.json
{
"server": {
"address": "127.0.0.1",
"port": 4725,
"log-level": "info",
"log-no-colors": true
}
}
Tool: JSON Validator
$ appium --config .appiumrc.json
[Appium] Welcome to Appium v3.5.0
[Appium] Non-default server args:
[Appium] { address: '127.0.0.1', loglevel: 'info', logNoColors: true, port: 4725 }
[Appium] Appium REST http interface listener started on http://127.0.0.1:4725
[Appium] No drivers have been installed in ~/.appium. Use the "appium driver" command to install the one(s) you want to use.
[Appium] No plugins have been installed. Use the "appium plugin" command to install the one(s) you want to use.
The no-drivers and no-plugins lines are expected when this check uses a server-only Appium install. They do not prevent the server status endpoint from responding.
A command-line option such as --port overrides the same key in the file for that one server run.
$ curl --silent http://127.0.0.1:4725/status
{"value":{"ready":true,"message":"The server is ready to accept new connections","build":{"version":"3.5.0"}}}
Do not store access tokens, signing credentials, or service-account secrets in the Appium server config file. Keep secrets in the CI secret store or a local environment file that is excluded from source control.