diff --git a/docs/source/pre_application/running_a_node.rst b/docs/source/pre_application/running_a_node.rst index 91e92301e..6190ff1d4 100644 --- a/docs/source/pre_application/running_a_node.rst +++ b/docs/source/pre_application/running_a_node.rst @@ -222,6 +222,7 @@ This step starts the PRE node. $ docker run -d --rm \ --name ursula \ + --restart unless-stopped \ -v ~/.local/share/nucypher:/root/.local/share/nucypher \ -v ~/.ethereum/:/root/.ethereum \ -p 9151:9151 \ @@ -230,6 +231,14 @@ This step starts the PRE node. nucypher/nucypher:latest \ nucypher ursula run + +.. note:: + + Setting the ``--restart`` parameter to ``unless-stopped`` ensures that the Docker + container will be automatically restarted if it exited, except if the container was + stopped using the ``docker stop`` command. See `Docker Restart Policies `_ + for more information. + View Node Logs ++++++++++++++ @@ -307,6 +316,7 @@ Create a file named ``ursula.service`` in ``/etc/systemd/system``, and add this [Service] User= Type=simple + Restart=on-failure Environment="NUCYPHER_OPERATOR_ETH_PASSWORD=" Environment="NUCYPHER_KEYSTORE_PASSWORD=" ExecStart=/bin/nucypher ursula run @@ -324,6 +334,15 @@ Replace the following values with your own: Run ``pipenv –venv`` within the virtual environment to get the virtual environment path. +.. note:: + + Setting the ``Restart`` option to ``on-failure``, ensures that the systemd service + will be automatically restarted if it exited with a non-zero exit code, except if + the container was stopped using the ``systemctl stop`` command. See + `Systemd Restart `_ + for more information. + + Enable Node Service ~~~~~~~~~~~~~~~~~~~