SeaweedFS Setup
SeaweedFS → is an Apache-licensed open-source object storage backend with an S3-compatible API. It offers good performance, scalability, and an easy setup process. It can be deployed via Kubernetes, Docker, or directly on Linux, FreeBSD, macOS, or Windows.
This guide explains how to deploy SeaweedFS alongside Relution using Docker Compose on Linux.
SeaweedFS has been thoroughly tested, but it is third-party software. No security or reliability guarantees can therefore be given for it. Managed hosting is available via our Sales Team →. More info: Relution Cloud →
This guide uses SeaweedFS in mini mode, which bundles all components with defaults appropriate for single-node deployments of moderate size. For more information: SeaweedFS Wiki →.
Prerequisites
- A working Relution installation with Docker Compose
- Access to edit the
compose.yamlfile
Prepare the compose.yaml
Generate a 24-character alphanumeric password using a password manager, or from the Linux command line:
pwgen -snc 24 1
In the Relution compose.yaml (on older installations: docker-compose.yml), add the following service under services::
services:
seaweedfs:
image: chrislusf/seaweedfs:4.05 # Check for newer versions: https://github.com/seaweedfs/seaweedfs/releases
restart: unless-stopped
ports:
- "127.0.0.1:23646:23646" # Web UI, reachable only on the server itself
expose:
- 8333 # S3 API, reachable only within the Docker network
command: ["mini", "-dir=/data", "-admin.dataDir=/data/admin", "-admin.password=%YOUR-GENERATED-PASSWORD%"]
networks:
- object-storage # also add this network to the relution service
volumes:
- seaweedfs-data:/data
The S3 API (port 8333) is not published on the host, because Relution accesses it via http://seaweedfs:8333 within the Docker network. The web UI is only reachable on the server itself. On a remote server without a browser, it is opened through an SSH tunnel, e.g. with ssh -L 23646:localhost:23646 <server>.
Relution and SeaweedFS must share a network, otherwise the endpoint http://seaweedfs:8333 is not reachable for Relution. In the relution service, add the object-storage network to the existing networks:
services:
relution:
networks:
- reverse-proxy
- database
- object-storage
In the networks: section, create the object-storage network:
networks:
reverse-proxy: {}
database:
internal: true
object-storage: {}
The object-storage network is not created as internal, because the web UI would otherwise not be reachable via the published port.
Add the seaweedfs-data volume under the volumes: section:
volumes:
postgresql: {}
seaweedfs-data: {}
seaweedfs-data volume in the backup routine. Without this data, server operation and device management cannot be ensured.Start SeaweedFS
Pull the image and start the service:
docker compose pull
docker compose up -d seaweedfs
SeaweedFS will be ready within a few seconds.
Create User and Bucket
SeaweedFS provides a web UI for administration.
- Navigate to
http://localhost:23646/in a browser - Log in with the password generated earlier
- In the sidebar, go to
Object Store→Users - Click Create User (top-right), enter
relutionas the username, and confirm - Note down the Access Key and Secret Key shown (they can be retrieved later via the 🔑 icon under Actions)
- In the sidebar, go to
Object Store→Buckets - Click Create Bucket, enter
relutionas the name, selectrelutionas the bucket owner, and confirm
Relution does not create the bucket itself. It must therefore exist before Relution is switched to object storage.
Note the Configuration Values
These values are needed to configure Relution:
| Setting | Value |
|---|---|
| Endpoint | http://seaweedfs:8333 |
| Access Key | (from Step 5) |
| Secret Key | (from Step 5) |
| Bucket Name | relution |
No region needs to be specified for SeaweedFS. Relution accesses object storage using path-style requests and uses the region eu-west-1 if none is set.
Next Steps
Now configure Relution to use the new object storage: