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
Steps to use an Appium server config file:
- Open a terminal in the project root that should own the server settings.
- Create an Appium config file.
$ vi .appiumrc.json
- Add the server settings under the server key.
- .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.
- Validate the JSON before starting the server.
$ python3 -m json.tool .appiumrc.json { "server": { "address": "127.0.0.1", "port": 4725, "log-level": "info", "log-no-colors": true } }Tool: JSON Validator
- Start Appium with the config file.
$ 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.
- Query the configured status endpoint from another terminal.
$ 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"}}} - Stop the verification server in the original terminal with Ctrl-C.
- Commit or document the config file with the project launch instructions.
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.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.