diff --git a/daemon/table/strategy-choice.cpp b/daemon/table/strategy-choice.cpp
index c3d02e3..81de636 100644
--- a/daemon/table/strategy-choice.cpp
+++ b/daemon/table/strategy-choice.cpp
@@ -24,10 +24,10 @@
  */
 
 #include "strategy-choice.hpp"
+#include "measurements-entry.hpp"
+#include "pit-entry.hpp"
 #include "core/logger.hpp"
 #include "fw/strategy.hpp"
-#include "pit-entry.hpp"
-#include "measurements-entry.hpp"
 
 namespace nfd {
 namespace strategy_choice {
@@ -42,11 +42,48 @@
   return nte.getStrategyChoiceEntry() != nullptr;
 }
 
-StrategyChoice::StrategyChoice(NameTree& nameTree, unique_ptr<Strategy> defaultStrategy)
-  : m_nameTree(nameTree)
+StrategyChoice::StrategyChoice(Forwarder& forwarder)
+  : m_forwarder(forwarder)
+  , m_nameTree(m_forwarder.getNameTree())
   , m_nItems(0)
 {
-  this->setDefaultStrategy(std::move(defaultStrategy));
+}
+
+void
+StrategyChoice::setDefaultStrategy(const Name& strategyName)
+{
+  unique_ptr<Strategy> strategy = Strategy::create(strategyName, m_forwarder);
+
+  bool isInstalled = false;
+  Strategy* instance = nullptr;
+  std::tie(isInstalled, instance) = this->install(std::move(strategy));
+  BOOST_ASSERT(isInstalled);
+
+  auto entry = make_unique<Entry>(Name());
+  entry->setStrategy(*instance);
+
+  // don't use .insert here, because it will invoke findEffectiveStrategy
+  // which expects an existing root entry
+  name_tree::Entry& nte = m_nameTree.lookup(Name());
+  nte.setStrategyChoiceEntry(std::move(entry));
+  ++m_nItems;
+  NFD_LOG_INFO("setDefaultStrategy " << instance->getName());
+}
+
+void
+StrategyChoice::installFromRegistry()
+{
+  /// \todo #3868
+  /// * Give every StrategyChoice entry its own Strategy instance.
+  ///    Don't share Strategy instances.
+  /// * Create Strategy instance with Strategy::create.
+  /// * Eliminate install, installFromRegistry, getStrategy functions.
+
+  // This is temporary code until the above is done.
+
+  for (const Name& strategyName : Strategy::listRegistered()) {
+    this->install(Strategy::create(strategyName, m_forwarder));
+  }
 }
 
 bool
@@ -198,25 +235,6 @@
   return this->findEffectiveStrategyImpl(measurementsEntry);
 }
 
-void
-StrategyChoice::setDefaultStrategy(unique_ptr<Strategy> strategy)
-{
-  bool isInstalled = false;
-  Strategy* instance = nullptr;
-  std::tie(isInstalled, instance) = this->install(std::move(strategy));
-  BOOST_ASSERT(isInstalled);
-
-  auto entry = make_unique<Entry>(Name());
-  entry->setStrategy(*instance);
-
-  // don't use .insert here, because it will invoke findEffectiveStrategy
-  // which expects an existing root entry
-  name_tree::Entry& nte = m_nameTree.lookup(Name());
-  nte.setStrategyChoiceEntry(std::move(entry));
-  ++m_nItems;
-  NFD_LOG_INFO("setDefaultStrategy " << instance->getName());
-}
-
 static inline void
 clearStrategyInfo(const name_tree::Entry& nte)
 {
diff --git a/daemon/table/strategy-choice.hpp b/daemon/table/strategy-choice.hpp
index 1038cfb..f2410e2 100644
--- a/daemon/table/strategy-choice.hpp
+++ b/daemon/table/strategy-choice.hpp
@@ -32,6 +32,9 @@
 #include <boost/range/adaptor/transformed.hpp>
 
 namespace nfd {
+
+class Forwarder;
+
 namespace strategy_choice {
 
 /** \brief represents the Strategy Choice table
@@ -48,7 +51,8 @@
 class StrategyChoice : noncopyable
 {
 public:
-  StrategyChoice(NameTree& nameTree, unique_ptr<fw::Strategy> defaultStrategy);
+  explicit
+  StrategyChoice(Forwarder& forwarder);
 
   size_t
   size() const
@@ -56,7 +60,18 @@
     return m_nItems;
   }
 
-public: // available Strategy types
+  /** \brief set the default strategy
+   *
+   *  This must be called by forwarder constructor.
+   */
+  void
+  setDefaultStrategy(const Name& strategyName);
+
+  /** \brief install all strategies from registry
+   */
+  void
+  installFromRegistry();
+
   /** \brief determines if a strategy is installed
    *  \param strategyName name of the strategy
    *  \param isExact true to require exact match, false to permit unversioned strategyName
@@ -152,9 +167,6 @@
   getStrategy(const Name& strategyName) const;
 
   void
-  setDefaultStrategy(unique_ptr<fw::Strategy> strategy);
-
-  void
   changeStrategy(Entry& entry,
                  fw::Strategy& oldStrategy,
                  fw::Strategy& newStrategy);
@@ -169,6 +181,7 @@
   getRange() const;
 
 private:
+  Forwarder& m_forwarder;
   NameTree& m_nameTree;
   size_t m_nItems;
 
