Edit: Issue resolved, thank you!
Hi floaty and team!
On Kaia’s behest, I moved brotka.st to a different VPS with more space and migrated it to a dockerized setup following the Migrating to a Docker Installation
guide and added media.brotka.st
. I enabled the media_proxy during the migration. Previously it was switched off.
Remote new media fully works under media.brotka.st/proxy/
. However, media.brotka.st/media/
images and uploads via the FE are still broken.
The media are located in /opt/akkoma/uploads
on the host and are correctly mounted into the Docker container. Both proxy and media content is located there?
If one tries to upload via the FE, two files appear in the /opt/akkoma/uploads
, one with the actual extension, one with a 10 char scrambled one. Both cannot be accessed via the FE.
In prod.secret.exs
:
config :pleroma, :media_proxy,
enabled: true,
redirect_on_failure: true,
base_url: "https://media.brotka.st/"
# No other config here
...
config :pleroma, Pleroma.Upload,
base_url: "https://media.brotka.st/media" # Following your blog post about the update
# I also tried base_url: "https://media.brotka.st/" to no avail
# No other config here. Missing something here?
...
config :pleroma, :instance, static_dir: "/opt/akkoma/instance/static"
config :pleroma, Pleroma.Uploaders.Local, uploads: "/opt/akkoma/uploads"
In /etc/caddy/Caddyfile
reverse proxy on the host, taken from your example:
https://brotka.st:443 {
log {
output file /var/log/caddy/akkoma.log
}
encode gzip
reverse_proxy localhost:4000
# Uncomment if using a separate media subdomain
@mediaproxy path /media/* /proxy/*
handle @mediaproxy {
redir https://media.brotka.st{uri} permanent
}
}
https://media.brotka.st {
@mediaproxy path /media/* /proxy/*
reverse_proxy @mediaproxy 127.0.0.1:4000 {
transport http {
response_header_timeout 10s
read_timeout 15s
}
}
}
Thanks for your help!