2.5 KiB
Minio Guide for HedgeDoc
Note: This guide was written before the renaming. Just replace HackMD with HedgeDoc in your mind 😃 thanks!
-
First of all you need to setup Minio itself.
Please refer to the official Minio docs for an production setup.
For checking it out and development purposes a non-persistent setup is enough:
docker run --name test-minio --rm -d -p 9000:9000 minio/minio server /dataPlease notice this is not for productive use as all your data gets lost when you stop this container
-
Next step is to get the credentials form the container:
docker logs test-minio -
Open http://localhost:9000 and login with the shown credentials.
-
Create a bucket for HedgeDoc
-
Add a policy for the prefix
uploadsand make it read-only. -
Set credentials and configs for Minio in HedgeDoc's
config.json"minio": { "accessKey": "888MXJ7EP4XXXXXXXXX", "secretKey": "yQS2EbM1Y6IJrp/1BUKWq2/XXXXXXXXXXXXXXX", "endPoint": "localhost", "port": 9000, "secure": false }You have to use different values for
endpointandportfor a production setup. Keep in mind theendpoint-address has to be public accessible from your browser. -
Set bucket name
"s3bucket": "hedgedoc" -
Set upload type.
"imageuploadtype": "minio" -
Review your config.
{ // all your other config… "minio": { "accessKey": "888MXJ7EP4XXXXXXXXX", "secretKey": "yQS2EbM1Y6IJrp/1BUKWq2/XXXXXXXXXXXXXXX", "endPoint": "localhost", "port": 9000, "secure": false }, "s3bucket": "hedgedoc", "imageuploadtype": "minio" } -
If you were using filesystem before
and you want to migrate assets to minio.
You could use a convenience script located in bin/migrate_from_fs_to_minio.
Be careful, read carefully what it does, it was not tested in all environments.
Take it as an inspiration to make your own migration script.




