---
layout: default
navsection: installguide
title: Install Keep-balance
...
{% comment %}
Copyright (C) The Arvados Authors. All rights reserved.
SPDX-License-Identifier: CC-BY-SA-3.0
{% endcomment %}
# "Introduction":#introduction
# "Update config.yml":#update-config
# "Install keep-balance package":#install-packages
# "Start the service":#start-service
h2(#introduction). Introduction
Keep-balance deletes unreferenced and overreplicated blocks from Keep servers, makes additional copies of underreplicated blocks, and moves blocks into optimal locations as needed (e.g., after adding new servers). See "Balancing Keep servers":{{site.baseurl}}/admin/keep-balance.html for usage details.
Keep-balance can be installed anywhere with network access to Keep services. Typically it runs on the same host as keepproxy.
*A cluster should have only one instance of keep-balance running at a time.*
{% include 'notebox_begin' %}
If you are installing keep-balance on an existing system with valuable data, you can run keep-balance in "dry run" mode first and review its logs as a precaution. To do this, edit your keep-balance startup script to use the flags @-commit-pulls=false -commit-trash=false@.
{% include 'notebox_end' %}
h2(#update-config). Update the cluster config
Edit the cluster config at @config.yml@ and set @Services.Keepbalance.InternalURLs@. This port is only used to publish metrics.
If BlobTrash is false, unneeded blocks will be counted and logged by keep-balance, but they will not be deleted.
{% assign arvados_component = 'keep-balance' %}
{% include 'install_packages' %}
{% include 'start_service' %}