
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@hocuspocus/extension-s3
Advanced tools
A S3-compatible persistence driver for Hocuspocus that stores Y.js documents in Amazon S3 or S3-compatible storage services like MinIO, DigitalOcean Spaces, etc.
npm install @hocuspocus/extension-s3
import { Server } from '@hocuspocus/server'
import { S3 } from '@hocuspocus/extension-s3'
const server = new Server({
extensions: [
new S3({
bucket: 'my-documents-bucket',
region: 'us-east-1',
credentials: {
accessKeyId: 'your-access-key',
secretAccessKey: 'your-secret-key'
}
}),
],
})
server.listen()
For local development with MinIO, ensure you set forcePathStyle: true:
const server = new Server({
extensions: [
new S3({
bucket: 'hocuspocus-documents',
endpoint: 'http://localhost:9000',
forcePathStyle: true,
credentials: {
accessKeyId: 'minioadmin',
secretAccessKey: 'minioadmin'
}
}),
],
})
Documents are stored as binary files in S3 with the naming convention:
{prefix}{documentName}.bin
For horizontal scaling, combine S3 with the Redis extension. Redis handles real-time synchronization while S3 provides persistent storage.
import { Server } from '@hocuspocus/server'
import { Logger } from '@hocuspocus/extension-logger'
import { Redis } from '@hocuspocus/extension-redis'
import { S3 } from '@hocuspocus/extension-s3'
// Server 1
const server1 = new Server({
name: "server-1",
port: 8001,
extensions: [
new Logger(),
new Redis({
host: "127.0.0.1",
port: 6379,
}),
new S3({
bucket: 'hocuspocus-documents',
endpoint: 'http://localhost:9000', // MinIO
forcePathStyle: true,
credentials: {
accessKeyId: 'minioadmin',
secretAccessKey: 'minioadmin'
}
}),
],
})
// Server 2 - same configuration with different name/port
const server2 = new Server({
name: "server-2",
port: 8002,
extensions: [/* same extensions */],
})
server1.listen()
server2.listen()
You can also use the S3 extension with the Hocuspocus CLI:
# Basic usage
hocuspocus --s3 --s3-bucket my-documents
# MinIO setup (forcePathStyle automatically enabled)
hocuspocus --s3 --s3-bucket hocuspocus-documents --s3-endpoint http://localhost:9000
For local development with MinIO (S3-compatible storage):
# Set up development environment
npm run dev:setup
# Test S3 configuration
npm run dev:test-s3
# Run S3 playground examples
npm run playground:s3
For detailed documentation, examples, best practices, and troubleshooting, see: 📚 S3 Extension Documentation
Your AWS credentials or IAM role needs the following permissions:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:GetObject", "s3:PutObject", "s3:HeadObject"],
"Resource": "arn:aws:s3:::your-bucket-name/*"
},
{
"Effect": "Allow",
"Action": ["s3:HeadBucket"],
"Resource": "arn:aws:s3:::your-bucket-name"
}
]
}
FAQs
a S3-compatible persistence driver for Hocuspocus
The npm package @hocuspocus/extension-s3 receives a total of 469 weekly downloads. As such, @hocuspocus/extension-s3 popularity was classified as not popular.
We found that @hocuspocus/extension-s3 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.