# Static Party Id

**URL:** <https://forum.canton.network/t/static-party-id/4712>\
**Category:** App Development\
**Created:** [June 12, 2022, 1:25pm UTC](https://forum.canton.network/t/static-party-id/4712 "2022-06-12T13:25:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bernardo](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@Bernardo](https://forum.canton.network/u/Bernardo)\
**Post date:** [June 12, 2022, 1:25pm UTC](https://forum.canton.network/t/static-party-id/4712/1 "2022-06-12T13:25:00Z")

</div>

Hello Daml Community,

I have a question about party ids.

I have read this [article](https://blog.digitalasset.com/developers/parties-users-daml-2?_ga=2.181168743.1964587598.1654595600-1159469453.1654595600), and i came to the conclusion that it is not possible to have static id parties.

I have a canton network, 2 remote participants and 1 remote domain. I create my party id with this command:

> daml script --dar .daml/dist/Project-0.0.1.dar --ledger-host 192.168.61.128 --ledger-port 5011 --output-file party\_bob.json --script-name Lights:initializeUser

and my script to allocate the Party:

> ```
> data LedgerParties = LedgerParties with
> bob : Party
> 
> ```

> ```
> initializeUser : Script LedgerParties
> initializeUser = do 
> partyBob <- allocatePartyWithHint "bob" (PartyIdHint "bob") 
> bob <- validateUserId "bob"  
> _ <- createUser (User bob (Some partyBob)) [CanActAs partyBob]
> pure (LedgerParties partyBob)
> 
> ```

If the system goes down, when I reload it, i need to create new party ids with command above.

Is it possible to upload the old party id stored in the json file i created?

I ask this because I have persistence with postgres in the domain. When i reboot the system to test the persistence i came to the conclusion that the contracts of the partyA (participant1) created earlier, will no longer be seen by partyA2.0 (participant1 reboot), because they will have a different id.

Is there any solution to this? If so, can you point me to the documentation.

Thank you

---

<div class="post-metadata">

**Author:** ![Mate\_Varga](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/mate_varga/32/2308_2.png) [@Mate\_Varga](https://forum.canton.network/u/Mate_Varga)\
**Post date:** [June 12, 2022, 1:38pm UTC](https://forum.canton.network/t/static-party-id/4712/2 "2022-06-12T13:38:33Z")

</div>

HI @Bernardo ,

If you use persistence across all your nodes, your parties should be persisted between failures/restarts. You should not run in-memory participants other than for testing. Are you saying that your parties are lost even with persistence enabled?

---

<div class="post-metadata">

**Author:** ![Bernardo](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@Bernardo](https://forum.canton.network/u/Bernardo)\
**Post date:** [June 12, 2022, 1:44pm UTC](https://forum.canton.network/t/static-party-id/4712/3 "2022-06-12T13:44:13Z")

</div>

Hello Mate,

I will try to use persistence on all nodes and give feedback, i was only trying in domain node.

Thank you

---

<div class="post-metadata">

**Author:** ![Bernardo](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@Bernardo](https://forum.canton.network/u/Bernardo)\
**Post date:** [June 13, 2022, 11:14pm UTC](https://forum.canton.network/t/static-party-id/4712/4 "2022-06-13T23:14:54Z")

</div>

It works, with persistence across all nodes,

Thank you.
