A step-by-step tutorial for creating a secure multi-signature account on the Sui blockchain

## Introduction

Multisig accounts enhance blockchain security by requiring multiple signatures to authorize transactions, reducing single points of failure. In this guide, we’ll set up a 2-of-3 multisig account on Sui — three owners with weighted signatures, requiring combined weight of 3 to execute transactions.

## Why Use Multisig Accounts?

- **More Secure**: One compromised key won’t risk funds

- **Shared Control**: No single point of failure

- **Great for Teams**: Ideal for DAO and corporate treasuries

- **Fewer Mistakes**: Multiple signers catch errors

## Prerequisites

- [Sui CLI](https://docs.sui.io/guides/developer/getting-started/sui-install) installed

- Basic blockchain knowledge

- Some SUI tokens ([use faucet for testnet](https://faucet.sui.io/))

## Step 1: Creating Owner Accounts

First, we need to create the accounts that will share control of our multisig account.

Open your terminal and run these commands:

```bash
sui client new-address ed25519 owner1 
sui client new-address secp256k1 owner2 
sui client new-address secp256k1 owner3
```

After running these, you’ll get output like this:

```bash
╭────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Created new keypair and saved it to keystore.                                                      │
├────────────────┬───────────────────────────────────────────────────────────────────────────────────┤
│ alias          │ owner1                                                                             │
│ address        │ 0x16a4a0747294891f39f8aea795ed9252d25eb7a19ccbdc45059184d08cb298e0                │
│ keyScheme      │ ed25519                                                                           │
│ recoveryPhrase │ mistake empty village thrive predict maze twist define brand repeat craft swallow │
╰────────────────┴───────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────────────────────────────────────────────────────────╮
│ Created new keypair and saved it to keystore.                                               │
├────────────────┬────────────────────────────────────────────────────────────────────────────┤
│ alias          │ owner2                                                                      │
│ address        │ 0xf950e5560f31e0815dad9c4b96e0af94d1528b96aa4324f42887ea9ef03e1fa9         │
│ keyScheme      │ secp256k1                                                                  │
│ recoveryPhrase │ muscle morning tiger trust rail chair invest throw crisp critic photo deal │
╰────────────────┴────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────────────────────────────────────────────────────────────────────────────╮
│ Created new keypair and saved it to keystore.                                                 │
├────────────────┬──────────────────────────────────────────────────────────────────────────────┤
│ alias          │ owner3                                                                        │
│ address        │ 0x4779377e48802c2f2e21950b230d9f4ba1589a9effd4024377161e0463b2cc96           │
│ keyScheme      │ secp256k1                                                                    │
│ recoveryPhrase │ toilet lawn rural wonder taste sight table shrimp pistol capital caught dune │
╰────────────────┴──────────────────────────────────────────────────────────────────────────────╯
```

Save these addresses in environment variables for easy reference:

```bash
owner1_addr=0x16a4a0747294891f39f8aea795ed9252d25eb7a19ccbdc45059184d08cb298e0
owner2_addr=0xf950e5560f31e0815dad9c4b96e0af94d1528b96aa4324f42887ea9ef03e1fa9
owner3_addr=0x4779377e48802c2f2e21950b230d9f4ba1589a9effd4024377161e0463b2cc96
```

## Step 2: Getting Public Keys

We need the public keys for each owner to create the multisig account:

```bash
sui keytool list
```

This shows all your keys with their public keys. Copy the publicBase64Key for each owner:

```bash
owner1_pubkey=<OWNER1-PUBLIC-KEY>
owner2_pubkey=<OWNER2-PUBLIC-KEY>
owner3_pubkey=<OWNER3-PUBLIC-KEY>
```

## Step 3: Creating the Multisig Account

Now let’s create our multisig account with weighted signatures:

```bash
sui keytool multi-sig-address \
  --pks $owner1_pubkey $owner2_pubkey $owner3_pubkey \ 
  --weights 1 2 2 \ 
  --threshold 3
```

This creates a 2-of-3 setup where:

- Owner 1 has weight 1

- Owner 2 has weight 2

- Owner 3 has weight 2

- Need combined weight ≥ 3 to execute transactions

The command will output your new multisig address:

```bash
multisig_addr=<YOUR-MULTISIG-ADDRESS>
```

## Step 4: Funding the Multisig Account

The multisig account needs some SUI to execute transactions. Visit [https://faucet.sui.io](https://faucet.sui.io) to fund your multisig account, then verify:

```bash
sui client gas $multisig_addr
```

## Step 5: Creating a Transaction

Let’s create our first transaction using the multisig account. We’ll transfer some SUI to another address.

Define the recipient and amount:

```bash
RECIPIENT_ADDRESS=0xfe65fb1d1df439982c0e5191151ad3a6dec85d44870435a3380fc65cda6700bb
coin=<GAS-COIN-ID>  # Get this from the gas command above
```

Create an unsigned transaction:

```bash
sui client transfer \
  --to $RECIPIENT_ADDRESS \
  --object-id $coin \
  --serialize-unsigned-transaction
```

Save the transaction bytes:

```bash
txbytes=<YOUR-TX-BYTES>
```

## Step 6: Collecting Signatures

Now we need to collect signatures. Since we need combined weight of 3, let’s get signatures from Owner 1 and Owner 2:

```bash
sui keytool sign --address $owner1_addr --data $txbytes
sui keytool sign --address $owner2_addr --data $txbytes
```

Save both signatures:

```bash
sig_1=<OWNER1-SIGNATURE>
sig_2=<OWNER2-SIGNATURE>
```

## Step 7: Combining Signatures

Combine the individual signatures into a multisig signature:

```bash
sui keytool multi-sig-combine-partial-sig \
  --pks $owner1_pubkey $owner2_pubkey $owner3_pubkey 
  --weights 1 2 2 
  --threshold 3 
  --sigs $sig_1 $sig_2
```

Save the combined signature:

```bash
multisig_hash=<COMBINED-MULTISIG-SIGNATURE>
```

## Step 8: Executing the Transaction

Finally, execute the multisig transaction:

```bash
sui client execute-signed-tx \
  --tx-bytes $txbytes \
  --signatures $multisig_hash
```

## Advanced Features

### Different Signature Combinations

With our weighted setup, these combinations work:

- Owner 2 + Owner 3 = Weight 4 (✅ Exceeds threshold)

- Owner 1 + Owner 2 = Weight 3 (✅ Meets threshold)

- Owner 1 + Owner 3 = Weight 3 (✅ Meets threshold)

- Any single owner alone = Insufficient weight (❌)

## Future Developments

The Sui multisig implementation continues to evolve. Potential improvements include:

- **Dynamic member management**: Add/remove signers without migrating funds

- **Better UI tools**: Graphical interfaces for easier multisig management

## Conclusion

Multisig accounts provide essential security for serious blockchain operations. Sui’s implementation with weighted signatures offers flexibility while maintaining security.

Whether you’re protecting personal assets, managing team funds, or securing a DAO treasury, multisig accounts add crucial protection. The setup complexity is a small trade-off for the significant security benefits.

---

*Originally published on [Medium](https://medium.com/@gunaon2509/setting-up-an-sui-multisig-account-a-step-by-step-guide-fbb71185a79d).*