diff --git a/inc/post_code.hpp b/inc/post_code.hpp
index 5541de4..5e2a7b9 100644
--- a/inc/post_code.hpp
+++ b/inc/post_code.hpp
@@ -34,16 +34,39 @@
 
 #define MaxPostCodeCycles 100
 
-const static constexpr char *PostCodePath =
-    "/xyz/openbmc_project/state/boot/raw";
-const static constexpr char *PropertiesIntf = "org.freedesktop.DBus.Properties";
-const static constexpr char *PostCodeListPath =
-    "/var/lib/phosphor-post-code-manager/";
 const static constexpr char *CurrentBootCycleCountName =
     "CurrentBootCycleCount";
 const static constexpr char *CurrentBootCycleIndexName =
     "CurrentBootCycleIndex";
-const static constexpr char *HostStatePath = "/xyz/openbmc_project/state/host0";
+
+// Singleton holder to store host/node and other path information
+class PostCodeDataHolder
+{
+    static PostCodeDataHolder *instance;
+
+    PostCodeDataHolder()
+    {
+    }
+
+  public:
+    static PostCodeDataHolder *getInstance()
+    {
+        if (!instance)
+            instance = new PostCodeDataHolder;
+        return instance;
+    }
+
+    int node;
+
+    const static constexpr char *PostCodePath =
+        "/xyz/openbmc_project/state/boot/raw";
+    const static constexpr char *PropertiesIntf =
+        "org.freedesktop.DBus.Properties";
+    const static constexpr char *PostCodeListPathPrefix =
+        "/var/lib/phosphor-post-code-manager/host";
+    const static constexpr char *HostStatePathPrefix =
+        "/xyz/openbmc_project/state/host";
+};
 
 struct EventDeleter
 {
@@ -63,14 +86,20 @@
 
 struct PostCode : sdbusplus::server::object_t<post_code, delete_all>
 {
+    PostCodeDataHolder *postcodeDataHolderObj =
+        postcodeDataHolderObj->getInstance();
+
     PostCode(sdbusplus::bus::bus &bus, const char *path, EventPtr &event) :
         sdbusplus::server::object_t<post_code, delete_all>(bus, path), bus(bus),
         propertiesChangedSignalRaw(
             bus,
             sdbusplus::bus::match::rules::type::signal() +
                 sdbusplus::bus::match::rules::member("PropertiesChanged") +
-                sdbusplus::bus::match::rules::path(PostCodePath) +
-                sdbusplus::bus::match::rules::interface(PropertiesIntf),
+                sdbusplus::bus::match::rules::path(
+                    postcodeDataHolderObj->PostCodePath +
+                    std::to_string(postcodeDataHolderObj->node)) +
+                sdbusplus::bus::match::rules::interface(
+                    postcodeDataHolderObj->PropertiesIntf),
             [this](sdbusplus::message::message &msg) {
                 std::string objectName;
                 std::map<std::string, std::variant<uint64_t>> msgData;
@@ -89,8 +118,11 @@
             bus,
             sdbusplus::bus::match::rules::type::signal() +
                 sdbusplus::bus::match::rules::member("PropertiesChanged") +
-                sdbusplus::bus::match::rules::path(HostStatePath) +
-                sdbusplus::bus::match::rules::interface(PropertiesIntf),
+                sdbusplus::bus::match::rules::path(
+                    postcodeDataHolderObj->HostStatePathPrefix +
+                    std::to_string(postcodeDataHolderObj->node)) +
+                sdbusplus::bus::match::rules::interface(
+                    postcodeDataHolderObj->PropertiesIntf),
             [this](sdbusplus::message::message &msg) {
                 std::string objectName;
                 std::map<std::string, std::variant<std::string>> msgData;
@@ -124,9 +156,11 @@
     {
         phosphor::logging::log<phosphor::logging::level::INFO>(
             "PostCode is created");
-        auto dir = fs::path(PostCodeListPath);
+        auto dir = fs::path(postcodeDataHolderObj->PostCodeListPathPrefix +
+                            std::to_string(postcodeDataHolderObj->node));
         fs::create_directories(dir);
-        strPostCodeListPath = PostCodeListPath;
+        strPostCodeListPath = postcodeDataHolderObj->PostCodeListPathPrefix +
+                              std::to_string(postcodeDataHolderObj->node) + "/";
         strCurrentBootCycleIndexName = CurrentBootCycleIndexName;
         uint16_t index = 0;
         deserialize(
