Logo
← Back to blog

How to password-protect a public link from your own bucket

Cover image

You already have a public link. You want a password on it.

file.rocks is the UI. The object stays in the bucket. Password is optional on an enabled public link.

This is password only. It is not a remake of how to share a file from your own bucket, how to share a folder from your own bucket, how to copy a file link from your own bucket, or how to turn off a public link from your own bucket. Those create, copy, or revoke. This locks the live link.

1. No bucket yet

You need S3-compatible object storage. Not another Drive clone.

If you do not have a bucket hooked up, follow how to connect a Backblaze B2 bucket and come back. For the price table, see the cheapest cloud object storage comparison.

2. Set the password

Sign in at file.rocks. Open Files. Pick a bucket you own.

Open a file or folder that already has a public link, or turn one on first. Row menu Share file... or Share folder... (or the ShareStatus globe).

The modal title is Share File or Share Folder. The toggle should say Public link enabled (or Create public link if you are enabling now).

Password field label is Password (optional) when none is set, or Password (set) when one is. Placeholder is Leave blank for no password, or Enter a new password to change when one is set.

Type a password. Click Save expiry / password.

The toast is Updating share… then Share updated. A fail toasts Failed to update share.

Expiry lives on the same Save control: Never, In 1 day, In 7 days, In 30 days, or Custom date. Keep that for another day. This post is the password path.

Works the same for file shares and folder shares.

3. What the visitor sees

They open the link. SharePasswordGate shows Password required and Enter the password to view this shared file or folder.

Field label is Password. Button is Unlock (Unlocking… while it checks).

Wrong password stays on the gate. Correct password unlocks the shared file or folder view.

4. Clear the password

Open the same Share modal. Check Remove password. Click Save expiry / password again.

Same update toasts. The label flips back to Password (optional). The link still works. It just no longer asks for a password.

5. Then stop

Need the share first? That is how to share a file from your own bucket or how to share a folder from your own bucket.

Need the URL on the clipboard? That is how to copy a file link from your own bucket.

Need the link dead? That is how to turn off a public link from your own bucket.

How to password-protect a public link from your own bucket | file.rocks Blog