Skip to content

Commit 920648f

Browse files
committed
Review fixes on private bucket storage
1 parent 3c655fd commit 920648f

File tree

1 file changed

+37
-31
lines changed

1 file changed

+37
-31
lines changed

self-hosting/govern/private-bucket.mdx

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,41 @@
11
---
2-
title: Migrate from public to private bucket
3-
sidebarTitle: Migrate to private bucket
2+
title: Switch from public to private buckets
3+
sidebarTitle: Private storage buckets
44
---
55

66
<Warning>
77
Starting with v1.4.0 of the Commercial edition Plane will use private storage buckets for any file uploaded to your Plane instance.
88
</Warning>
99

10-
We highly recommend that you migrate to private bucket storage which ensures greater security and gives you more control over how files are accessed.
10+
<Note>
11+
New installations with default storage, which is MiniO, don't need to change anything. For S3 or S3-compatible storage, please see [this](https://developers.plane.so/self-hosting/govern/database-and-storage).
12+
</Note>
1113

12-
You can continue using the public bucket or switch to private bucket storage. Follow the instructions below based on whether you're using the default MinIO or an external S3-compatible storage.
14+
While you can use the current public storage paradigm that Plane has followed so far, we highly recommend you migrate to private storage buckets which ensure greater security and give you more control over how files are accessed.
15+
16+
<Note>
17+
To keep public storage on external S3 compatible services, you still have to update your CORS policy.
18+
</Note>
19+
20+
See the instructions to switch to private storage by the provider you use below.
1321

1422
## For default MinIO storage
1523

16-
If you prefer to keep using the public bucket, no configuration changes are needed.
24+
Simply run the command ↓.
1725

18-
To migrate from public to private storage, simply run the migration script using this command:
1926
```bash
2027
docker exec -it <api_container> python manage.py update_bucket
2128
```
22-
This process updates your bucket while keeping any public objects you already have accessible.
23-
24-
## For external storage (S3 compatible)
29+
A successful run keeps any public files you already have accessible while moving you to private storage.
2530

26-
Here’s how you can make the switch or adjust your current setup:
31+
## For external storage • S3 or S3 compatible
2732

28-
- If you'd prefer to continue using the public bucket, that's fine—but you'll need to update your bucket’s CORS policy to include your hosted origin. This ensures that the new pre-signed uploads work correctly. See the [Update bucket's CORS policy](#update-buckets-cors-policy) section below.
29-
30-
- To migrate from public to private bucket storage, you must update your bucket's CORS policy and follow the instructions in the [Switch to private storage](#switch-to-private-storage) section below.
33+
There are two parts to this—updating your CORS policy and then switching to private storage.
3134

3235
### Update bucket's CORS policy
3336

3437
<Warning>
35-
This update is critical if you are using external storage to ensure continued functionality.
38+
This step is critical if you are using external storage to ensure continued functionality.
3639
</Warning>
3740

3841
Here’s a sample CORS policy for your reference. Just replace `<YOUR_DOMAIN>` with your actual domain and apply the policy to your bucket.
@@ -64,37 +67,33 @@ Here’s a sample CORS policy for your reference. Just replace `<YOUR_DOMAIN>` w
6467
```
6568

6669
### Switch to private storage
67-
Before migrating to a private bucket, make sure your CORS policy is up to date. If you haven’t done so already, see the [Update bucket's CORS policy](#update-buckets-cors-policy) section above.
70+
71+
<Warning>
72+
Don't start from here if you haven't updated your CORS policy.
73+
</Warning>
6874

6975
To migrate from public to private bucket storage, follow the instructions below:
7076

71-
1. Ensure you have the following permissions on your S3 bucket before running the script.
77+
1. First, make sure you have the following permissions on your S3 bucket. If you don't, make changes to get those permissions on your bucket first.
7278
- **s3:GetObject**
73-
To access existing objects publicly.
79+
So you can access your public files so far To access existing objects publicly
7480

7581
- **s3:ListBucket**
76-
To list and create a policy for public access.
82+
So you can apply policies to your bucket for public access
7783

7884
- **s3:PutObject**
79-
To create new objects.
85+
So you can create new files
8086

8187
- **s3:PutBucketPolicy**
82-
To update the bucket policy
88+
So you can update your buckets' policy
8389

84-
2. Once permissions are provided, run this script to update the bucket:
90+
2. Now, run the command ↓.
8591
```bash
8692
docker exec -it <api_container> python manage.py update_bucket
8793
```
88-
<Note>
89-
If the required permissions are missing, the script will generate a `permissions.json` file, which you can copy and use to update your bucket policy manually.
90-
91-
To copy the `permissions.json` file to the local machine, run this command:
92-
93-
```bash
94-
docker cp <api_container>:/code/permissions.json .
95-
```
94+
<Tip>
95+
1. If the command finds the necessary permissions missing, it will generate a `permissions.json` file which you can use to update your bucket policy manually. Here’s how the `permissions.json` file should look.
9696

97-
Here’s a sample `permission.json` file for reference:
9897
```bash
9998
{
10099
"Version": "2012-10-17",
@@ -111,4 +110,11 @@ To migrate from public to private bucket storage, follow the instructions below:
111110
]
112111
}
113112
```
114-
</Note>
113+
114+
2. To copy the `permissions.json` file to the local machine, run the command ↓.
115+
116+
```bash
117+
docker cp <api_container>:/code/permissions.json .
118+
```
119+
120+
</Tip>

0 commit comments

Comments
 (0)