On-premise install with Docker

This section describes how to complete the installation steps, started here, using Docker.

You must have Docker installed before proceeding with these installation steps.
  1. Pull the latest Docker container:

    docker pull fauna/faunadb:latest
  2. Verify that the container executes correctly:

    docker run fauna/faunadb --help
    FaunaDB Enterprise Docker Image
    
    Options:
     --help               Print this message and exit.
     --init               Initialize the node (default action).
     --no-init            Doesn't initialize the node.
     --join host[:port]   Join a cluster through an active node specified in host and port.
     --config <path>      Specify a custom config file. Should be accessible inside the docker image.
  3. Start a node:

    There are several approaches to running FaunaDB with Docker:

    1. As a single developer node, with ephemeral data:

      docker run --rm --name faunadb -p 8443:8443 fauna/faunadb

      This command starts a FaunaDB node and initializes the single-node cluster. However, when the Docker container is stopped/killed, all of the data it contains is lost. This can be very useful for testing, where the database starts with a known state.

    2. As a single developer node, with persisted data:

      docker run --rm --name faunadb -p 8443:8443 \
        -v <host-directory or named-volume>:/var/lib/faunadb \
        fauna/faunadb

      This command starts FaunaDB with a specified folder or volume bound to the Docker container data folder. When the Docker container is stopped/killed, all of your data is maintained in the specified folder/volume.

    3. As a single developer node, with persisted data and logs:

      docker run --rm --name faunadb -p 8443:8443 \
        -v <host-directory or named-volume>:/var/lib/faunadb \
        -v <host-directory>:/var/log/faunadb \
        fauna/faunadb

      This command starts FaunaDB, binding a local folder/volume to the Docker container’s data folder, and another local folder/volume to the Docker container’s log folder. When the Docker container is stopped/killed, all of your data and logs are maintainer in the specified folders/volumes.

    4. With managed configuration:

      docker run --rm --name faunadb -p 8443:8443 \
        -v <host-directory or named-volume>:/var/lib/faunadb \
        -v <host-directory>:/var/log/faunadb \
        -v <path-to-config-file>:/etc/faunadb.yml \
        fauna/faunadb
        --config /etc/faunadb.yml

      This command starts FaunaDB with path binds for the data, log, and configuration file, as well as specifying that the non-default configuration should be used.

      Here is an example configuration file. Adjust the configuration as appropriate:

      ---
      auth_root_key: secret
      cluster_name: fauna
      replica_name: replica
      storage_data_path: /var/lib/faunadb
      log_path: /var/log/faunadb
      shutdown_grace_period_seconds: 0
      network_listen_address: 172.17.0.2
      network_broadcast_address: 172.17.0.2
      network_admin_http_address: 172.17.0.2
      network_coordinator_http_address: 172.17.0.2
  4. Confirm that the node is running:

    curl http://172.17.0.2:8443/ping
    { "resource": "Scope write is OK" }
Single nodes, for development or testing, are free to use indefinitely. Clusters involving 2 or more nodes are free to use for 90 days. For more information, see our Pricing page.

Was this article helpful?

We're sorry to hear that.
Tell us how we can improve! documentation@fauna.com

Thank you for your feedback!