103 lines
2.2 KiB
Markdown
103 lines
2.2 KiB
Markdown
1. **Install rclone** if you don't have it already:
|
|
|
|
```bash
|
|
# On Debian/Ubuntu
|
|
sudo apt install rclone
|
|
```
|
|
|
|
1. **Configure rclone** for Linode Object Storage:
|
|
|
|
```bash
|
|
rclone config
|
|
```
|
|
|
|
Follow the interactive prompts:
|
|
|
|
- Choose `n` for a new remote
|
|
- Name it (e.g., `tlc-linode`)
|
|
- Select `S3` as the storage type (usually option number for S3 storage)
|
|
- For provider, select `Other`
|
|
- Enter `https://us-southeast-1.linodeobjects.com` for the S3 endpoint
|
|
- Enter your Access Key and Secret Key when prompted
|
|
- Access key: WTXYVS5H5OTIZBM7W3UB
|
|
- Secret key: TSrZHSTAxmM8nqmtn389weBM60vvYgImEe2B51bB
|
|
- For region, enter `us-southeast-1`
|
|
- Accept the defaults for most other options
|
|
- Choose `y` to confirm the settings when asked
|
|
|
|
1. **List your buckets** to verify the connection:
|
|
|
|
```bash
|
|
rclone lsd tlc-linode:
|
|
```
|
|
|
|
1. **List files** in your specific bucket:
|
|
|
|
```bash
|
|
rclone ls tlc-linode:linuxcast-bucket
|
|
```
|
|
|
|
---
|
|
|
|
1. **Create a systemd service file**:
|
|
|
|
```bash
|
|
sudo nano /etc/systemd/system/rclone-linode.service
|
|
```
|
|
|
|
Add the following content:
|
|
|
|
```ini
|
|
[Unit]
|
|
Description=Linode Object Storage (rclone) - Realtime Collaboration
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=drew
|
|
Group=drew
|
|
ExecStart=/usr/bin/rclone mount tlc-linode:linuxcast-bucket /home/drew/files.thelinuxcast.org \
|
|
--vfs-cache-mode full \
|
|
--buffer-size 256M \
|
|
--dir-cache-time 1m \
|
|
--poll-interval 10s \
|
|
--attr-timeout 5s \
|
|
--vfs-read-ahead 128M \
|
|
--vfs-cache-max-size 20G \
|
|
--vfs-read-chunk-size 32M \
|
|
--vfs-read-chunk-size-limit 512M \
|
|
--transfers 8 \
|
|
--checkers 16 \
|
|
--s3-chunk-size 32M \
|
|
--s3-upload-concurrency 8 \
|
|
--contimeout 30s \
|
|
--timeout 120s \
|
|
--no-modtime \
|
|
--cache-dir=/tmp/rclone-cache \
|
|
--async-read
|
|
|
|
ExecStop=/bin/fusermount -u /home/drew/files.thelinuxcast.org
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
StartLimitInterval=60s
|
|
StartLimitBurst=5
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
```
|
|
|
|
Replace `drew` with your actual username if different.
|
|
|
|
1. **Enable and start the service**:
|
|
|
|
```bash
|
|
sudo systemctl enable rclone-linode.service
|
|
sudo systemctl start rclone-linode.service
|
|
```
|
|
|
|
1. **Check the status**:
|
|
|
|
```bash
|
|
sudo systemctl status rclone-linode.service
|
|
``` |