You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: self-hosting/govern/private-bucket.mdx
+37-31Lines changed: 37 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,38 +1,41 @@
1
1
---
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
4
4
---
5
5
6
6
<Warning>
7
7
Starting with v1.4.0 of the Commercial edition Plane will use private storage buckets for any file uploaded to your Plane instance.
8
8
</Warning>
9
9
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>
11
13
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.
13
21
14
22
## For default MinIO storage
15
23
16
-
If you prefer to keep using the public bucket, no configuration changes are needed.
24
+
Simply run the command ↓.
17
25
18
-
To migrate from public to private storage, simply run the migration script using this command:
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.
25
30
26
-
Here’s how you can make the switch or adjust your current setup:
31
+
## For external storage • S3 or S3 compatible
27
32
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.
31
34
32
35
### Update bucket's CORS policy
33
36
34
37
<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.
36
39
</Warning>
37
40
38
41
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
64
67
```
65
68
66
69
### 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>
68
74
69
75
To migrate from public to private bucket storage, follow the instructions below:
70
76
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.
72
78
-**s3:GetObject**
73
-
To access existing objects publicly.
79
+
So you can access your public files so far To access existing objects publicly
74
80
75
81
-**s3:ListBucket**
76
-
To list and create a policy for public access.
82
+
So you can apply policies to your bucket for public access
77
83
78
84
-**s3:PutObject**
79
-
To create new objects.
85
+
So you can create new files
80
86
81
87
-**s3:PutBucketPolicy**
82
-
To update the bucket policy
88
+
So you can update your buckets' policy
83
89
84
-
2.Once permissions are provided, run this script to update the bucket:
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:
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.
96
96
97
-
Here’s a sample `permission.json` file for reference:
98
97
```bash
99
98
{
100
99
"Version": "2012-10-17",
@@ -111,4 +110,11 @@ To migrate from public to private bucket storage, follow the instructions below:
111
110
]
112
111
}
113
112
```
114
-
</Note>
113
+
114
+
2. To copy the `permissions.json` file to the local machine, run the command ↓.
0 commit comments