!CHAPTER Details about the ArangoDB Server The ArangoDB database server has two modes of operation: As a server, where it will answer to client requests and as an emergency console, in which you can access the database directly. The latter - as the name suggests - should only be used in case of an emergency, for example, a corrupted collection. Using the emergency console allows you to issue all commands normally available in actions and transactions. When starting the server in emergency console mode, the server cannot handle any client requests. You should never start more than one server using the same database directory, independent from the mode of operation. Normally ArangoDB will prevent you from doing this by placing a lockfile in the database directory and not allowing a second ArangoDB instance to use the same database directory if a lockfile is already present. The following command starts the ArangoDB database in server mode. You will be able to access the server using HTTP requests on port 8529. Look [here](#frequently_used_options) for a list of frequently used options – see [here](../CommandLineOptions/README.md) for a complete list. ``` unix> /usr/local/sbin/arangod /tmp/vocbase 20ZZ-XX-YYT12:37:08Z [8145] INFO using built-in JavaScript startup files 20ZZ-XX-YYT12:37:08Z [8145] INFO ArangoDB (version 1.x.y) is ready for business 20ZZ-XX-YYT12:37:08Z [8145] INFO Have Fun! ``` After starting the server, point your favorite browser to: http://localhost:8529/ to access the administration front-end. !SECTION Linux To start the server at system boot time you should use one of the pre-rolled packages that will install the necessary start / stop scripts for ArangoDB. You can use the start script as follows: unix> /etc/init.d/arangod start To stop the server you can use the following command: unix> /etc/init.d/arangod stop You may require root privileges to execute these commands. If you compiled ArangoDB from source and did not use any installation package – or using non-default locations and/or multiple ArangoDB instances on the same host – you may want to start the server process manually. You can do so by invoking the arangod binary from the command line as shown before. To stop the database server gracefully, you can either press CTRL-C or by send the SIGINT signal to the server process. On many systems this can be achieved with the following command: unix> kill -2 `pidof arangod` !SECTION Frequently Used Options The following command-line options are frequently used. For a full list of options see [here](../CommandLineOptions/README.md). `database-directory` Uses the "database-directory" as base directory. There is an alternative version available for use in configuration files, see [here](../CommandLineOptions/Arangod.md). `--help`
`-h` Prints a list of the most common options available and then exists. In order to see all options use `--help-all`. `--log level` Allows the user to choose the level of information which is logged by the server. The "level" is specified as a string and can be one of the following values: fatal, error, warning, info, debug or trace. For more information see [here](../CommandLineOptions/Logging.md). `--server.endpoint endpoint` Specifies an endpoint for HTTP requests by clients. Endpoints have the following pattern: * tcp://ipv4-address:port - TCP/IP endpoint, using IPv4 * tcp://[ipv6-address]:port - TCP/IP endpoint, using IPv6 * ssl://ipv4-address:port - TCP/IP endpoint, using IPv4, SSL encryption * ssl://[ipv6-address]:port - TCP/IP endpoint, using IPv6, SSL encryption * unix:///path/to/socket - Unix domain socket endpoint If a TCP/IP endpoint is specified without a port number, then the default port (8529) will be used. If multiple endpoints need to be used, the option can be repeated multiple times. !SUBSUBSECTION Examples unix> ./arangod --server.endpoint tcp://127.0.0.1:8529 --server.endpoint ssl://127.0.0.1:8530 --server.keyfile server.pem /tmp/vocbase 2012-07-26T07:07:47Z [8161] INFO using SSL protocol version 'TLSv1' 2012-07-26T07:07:48Z [8161] INFO using endpoint 'ssl://127.0.0.1:8530' for http ssl requests 2012-07-26T07:07:48Z [8161] INFO using endpoint 'tcp://127.0.0.1:8529' for http tcp requests 2012-07-26T07:07:49Z [8161] INFO ArangoDB (version 1.1.alpha) is ready for business 2012-07-26T07:07:49Z [8161] INFO Have Fun! Note that if you are using SSL-encrypted endpoints, you must also supply the path to a server certificate using the --server.keyfile option. Endpoints can also be changed at runtime. Please refer to HTTP Interface for Endpoints for more details. @startDocuBlock server_authentication @startDocuBlock keep_alive_timeout `--daemon` Runs the server as a "daemon" (as a background process).