filebrowser icon indicating copy to clipboard operation
filebrowser copied to clipboard

OnlyOffice integration does not work behind proxy authentication

Open baur opened this issue 2 months ago • 22 comments

The OnlyOffice integration fails when the application is running behind a proxy with authentication.

I’ve tried configuring the internalUrl using both the proxy address and the original internal address — both give the same result.

It only works if I first open a document directly (bypassing the proxy) and open some office file and then later open document through the proxy — in that case, it opens successfully.

It seems like some authentication or session information is missing or not passed correctly through the proxy, but I’m not sure what exactly is happening.

I can see success information in the debug logs, but the file still doesn’t open.

Image
server:
  port: 80
  baseURL: "/filebrowser"
  database: "./data/database.db"
  disablePreviews: true
  disablePreviewResize: true
  disableTypeDetectionByHeader: true
  sources:
    - path: "/folder"
      name: "Файлы"
      config:
        defaultEnabled: true
        denyByDefault: false
#  externalUrl: "http://xx.xx.xx.xx:9999/filebrowser #proxy
  externalUrl: "http://xx.xx.xx.xx:8686/filebrowser"  #direct
  internalUrl: "http://filebrowser-dev:80/filebrowser"
auth:
  adminUsername: admin
  tokenExpirationHours: 2
  methods:
    noauth: false
    password:
      enabled: true
    proxy:
      enabled: true
      header: "X-Forwarded-User"
      createUser: true      
frontend:
  name: ""
  disableDefaultLinks: true
  disableUsedPercentage: true
userDefaults:
  hideSidebarFileActions: false
  stickySidebar: true
  disableSearchOptions: true
  disableQuickToggles: true
  darkMode: false
  locale: ru
  viewMode: list
  singleClick: false
  showHidden: false
  dateFormat: false
  gallerySize: 3
  themeColor: var(--blue)
  quickDownload: true
  lockPassword: true
  disableSettings: false
  permissions:
    download: true
integrations:
  office:
    url: "http://xx.xx.xx.xx:8585"
    internalUrl: "http://onlyoffice:80"
    secret: "***"
    viewOnly: true

baur avatar Oct 23 '25 12:10 baur

I have a similar setup behind reverse proxy that works, I use internalUrl as well so it doesn't need to go through the reverse proxy authentication and it works for me.

What I can see from your debug output (which is only half the story):

  1. your only office server is reachable
  2. you have configured your internal urls so that they use DNS names that appear to be local docker network names http://onlyoffice:80 and http://filebrowser-dev/filebrowser , if the filebrowser container can curl http://onlyoffice and the only office container can curl http://filebrowser-dev/filebrowser then this should be correct.

Because of this configuration, the reverse proxy should not be involved on document download -- onlyoffice reaches out to http://filebrowser-dev:80/filebrowser/api/raw directly.

So the next steps:

check the logs for your only office server and the filebrowser logs, both should explain the issue. Your onlyoffice server should have the reason for the error -- regardless of whether it was able to reach filebrowser.

If it was able to reach filebrowser -- then filebrowser should have errors in the logs as well during this time.

see the troubleshooting doc

gtsteffaniak avatar Oct 23 '25 20:10 gtsteffaniak

is this happening when saving a file from a share? I see an issue on the backend for it. Looks like saving onlyoffice documents on shares won't work

gtsteffaniak avatar Oct 23 '25 20:10 gtsteffaniak

Can you try the dev version v0.8.11 and see if it resolves the issue (if its from a share), and otherwise it should provide much better logging and might help understand whats happening.

gtsteffaniak avatar Oct 23 '25 21:10 gtsteffaniak

It's not related with share

FileBrowser Logs:

2025/10/24 08:23:22 GET     | 200 | PROXY_IP:57765 | USER | 0ms          | "/filebrowser/api/resources?path=%252F&source=%25D0%25A4%25D0%25B0%25D0%25B9%25D0%25BB%25D1%258B"
2025/10/24 08:23:22 GET     | 200 | PROXY_IP:57766 | USER  | 0ms          | "/filebrowser/api/resources?path=%252Fslide.pptx&source=%25D0%25A4%25D0%25B0%25D0%25B9%25D0%25BB%25D1%258B&content=true"
2025/10/24 08:23:22 GET     | 200 | PROXY_IP:57768 | USER  | 0ms          | "/filebrowser/api/onlyoffice/config?path=%2Fslide.pptx&source=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B"
2025/10/24 08:23:22 GET     | 401 | 172.20.0.5:49734 | N/A          | 0ms          | "/filebrowser/api/raw?files=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B%3A%3A%2Fslide.pptx&auth="
2025/10/24 08:23:23 GET     | 401 | 172.20.0.5:56024 | N/A          | 0ms          | "/filebrowser/api/raw?files=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B%3A%3A%2Fslide.pptx&auth="
2025/10/24 08:23:24 GET     | 401 | 172.20.0.5:56030 | N/A          | 0ms          | "/filebrowser/api/raw?files=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B%3A%3A%2Fslide.pptx&auth="

OnlyOffice logs:

[2025-10-24T03:23:24.644] [ERROR] [localhost] [e00901da840198842bbd04f71301c4e85e83489d8257335ce8e1e5e5ee9251cf] [3] nodeJS - error downloadFile:url=http://filebrowser-dev:80/filebrowser/api/raw?files=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B%3A%3A%2Fslide.pptx&auth=;attempt=3;code:ERR_BAD_REQUEST;connect:undefined AxiosError: Request failed with status code 401
    at settle (/snapshot/server/Common/node_modules/axios/dist/node/axios.cjs)
    at RedirectableRequest.handleResponse (/snapshot/server/Common/node_modules/axios/dist/node/axios.cjs)
    at RedirectableRequest.emit (node:events:536:35)
    at RedirectableRequest._processResponse (/snapshot/server/Common/node_modules/follow-redirects/index.js:409:10)
    at ClientRequest.<anonymous> (/snapshot/server/Common/node_modules/follow-redirects/index.js:102:12)
    at Object.onceWrapper (node:events:639:26)
    at ClientRequest.emit (node:events:524:28)
    at HTTPParser.parserOnIncomingClient (node:_http_client:702:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:118:17)
    at Socket.socketOnData (node:_http_client:544:22)
    at Axios.request (/snapshot/server/Common/node_modules/axios/dist/node/axios.cjs)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.downloadUrlPromise (/snapshot/server/Common/sources/utils.js)   

baur avatar Oct 24 '25 03:10 baur

The error disappears if I log in once using the direct link and open any Office document — after that, I can work with OfficeDocs through the proxy link without any problems. However, the error returns after the container is recreated.

baur avatar Oct 24 '25 03:10 baur

DEBUG log:

2025/10/24 09:03:51 [INFO ] write.go:261: GET     | 301 | [::1]:39218     | N/A          | 0ms          | "/health"
2025/10/24 09:04:17 [DEBUG] indexingSchedule.go:142: Starting quick scan for [Файлы]
2025/10/24 09:04:17 [DEBUG] indexingSchedule.go:170: Time spent indexing [Файлы]: 0 seconds
2025/10/24 09:04:17 [DEBUG] indexingSchedule.go:40: Next scan in 6m0s
2025/10/24 09:04:18 [INFO ] write.go:261: GET     | 200 | PROXY_IP:64897 | USER  | 0ms          | "/filebrowser/api/resources?path=%252Fslide.pptx&source=%25D0%25A4%25D0%25B0%25D0%25B9%25D0%25BB%25D1%258B"
2025/10/24 09:04:18 [INFO ] write.go:261: GET     | 200 | PROXY_IP:64900 | USER  | 0ms          | "/filebrowser/api/resources?path=%252F&source=%25D0%25A4%25D0%25B0%25D0%25B9%25D0%25BB%25D1%258B"
2025/10/24 09:04:18 [INFO ] write.go:261: GET     | 200 | PROXY_IP:64901 | USER  | 0ms          | "/filebrowser/api/resources?path=%252Fslide.pptx&source=%25D0%25A4%25D0%25B0%25D0%25B9%25D0%25BB%25D1%258B&content=true"
2025/10/24 09:04:18 [DEBUG] onlyOffice.go:92: OnlyOffice user request: resolved path=/slide.pptx
2025/10/24 09:04:18 [INFO ] write.go:261: GET     | 200 | 10.28.129.44:64903 | BAUYRZHANES  | 0ms          | "/filebrowser/api/onlyoffice/config?path=%2Fslide.pptx&source=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B"
2025/10/24 09:04:18 [WARN ] write.go:261: GET     | 401 | 172.20.0.5:58450 | N/A          | 0ms          | "/filebrowser/api/raw?files=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B%3A%3A%2Fslide.pptx&auth="
2025/10/24 09:04:19 [WARN ] write.go:261: GET     | 401 | 172.20.0.5:58454 | N/A          | 0ms          | "/filebrowser/api/raw?files=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B%3A%3A%2Fslide.pptx&auth="
2025/10/24 09:04:20 [WARN ] write.go:261: GET     | 401 | 172.20.0.5:58462 | N/A          | 0ms          | "/filebrowser/api/raw?files=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B%3A%3A%2Fslide.pptx&auth="
2025/10/24 09:04:21 [INFO ] write.go:261: GET     | 301 | [::1]:39034     | N/A          | 0ms          | "/health"

write.go?

integrations: office: viewOnly: true

PS: 404 - https://filebrowserquantum.com/en/docs/troubleshooting/debug-logging

baur avatar Oct 24 '25 04:10 baur

log with dev-v0.8.11

2025/10/24 10:36:27 [INFO ] root.go:93: Initializing FileBrowser Quantum (dev-v0.8.11)
2025/10/24 10:36:27 [INFO ] root.go:94: Using Config file        : data/config.yaml
2025/10/24 10:36:27 [INFO ] root.go:95: Auth Methods             : [password proxy]
2025/10/24 10:36:27 [INFO ] root.go:96: Using existing database  : ./data/database.db
2025/10/24 10:36:27 [INFO ] root.go:97: Sources                  : [Файлы: /folder]
2025/10/24 10:36:27 [DEBUG] root.go:98: Using Embedded FS        : false
2025/10/24 10:36:27 [INFO ] user.go:41: Resetting admin user to default username and password.
2025/10/24 10:36:27 [DEBUG] users.go:161: Saving user [admin] changepass: true
2025/10/24 10:36:27 [INFO ] access.go:19: Validating and migrating access rules to new format...
2025/10/24 10:36:27 [INFO ] access.go:78: Access rules validation completed
2025/10/24 10:36:27 [DEBUG] preview.go:90: Media Enabled            : true
2025/10/24 10:36:27 [DEBUG] preview.go:91: FFmpeg Concurrency Limit : 2
2025/10/24 10:36:27 [DEBUG] preview.go:93: MuPDF Enabled            : true
2025/10/24 10:36:27 [INFO ] httpRouter.go:243: Running at               : http://localhost/filebrowser/
2025/10/24 10:36:28 [INFO ] root.go:124: Received shutdown signal. Shutting down gracefully...
2025/10/24 10:36:28 [INFO ] httpRouter.go:254: Shutting down HTTP server...
2025/10/24 10:36:28 [INFO ] httpRouter.go:279: HTTP server shut down gracefully.
2025/10/24 10:36:28 [INFO ] root.go:133: Shutdown complete.
2025/10/24 10:36:29 [DEBUG] styling.go:111: Loaded custom CSS from: reduce-rounded-corners.css (1098 bytes)
2025/10/24 10:36:29 [DEBUG] config.go:680: No custom favicon configured, using default
2025/10/24 10:36:29 [INFO] Using admin password from FILEBROWSER_ADMIN_PASSWORD environment variable
2025/10/24 10:36:29 [INFO ] root.go:93: Initializing FileBrowser Quantum (dev-v0.8.11)
2025/10/24 10:36:29 [INFO ] root.go:94: Using Config file        : data/config.yaml
2025/10/24 10:36:29 [INFO ] root.go:95: Auth Methods             : [password proxy]
2025/10/24 10:36:29 [INFO ] root.go:96: Using existing database  : ./data/database.db
2025/10/24 10:36:29 [INFO ] root.go:97: Sources                  : [Файлы: /folder]
2025/10/24 10:36:29 [DEBUG] root.go:98: Using Embedded FS        : false
2025/10/24 10:36:29 [INFO ] user.go:41: Resetting admin user to default username and password.
2025/10/24 10:36:29 [DEBUG] users.go:161: Saving user [admin] changepass: true
2025/10/24 10:36:29 [INFO ] access.go:19: Validating and migrating access rules to new format...
2025/10/24 10:36:29 [INFO ] access.go:78: Access rules validation completed
2025/10/24 10:36:29 [DEBUG] preview.go:90: Media Enabled            : true
2025/10/24 10:36:29 [DEBUG] preview.go:91: FFmpeg Concurrency Limit : 2
2025/10/24 10:36:29 [DEBUG] preview.go:93: MuPDF Enabled            : true
2025/10/24 10:36:29 [INFO ] httpRouter.go:243: Running at               : http://localhost/filebrowser/
2025/10/24 10:36:30 [INFO ] indexingFiles.go:108: initializing index: [Файлы]
2025/10/24 10:36:30 [DEBUG] indexingSchedule.go:144: Starting full scan for [Файлы]
2025/10/24 10:36:30 [INFO ] indexingSchedule.go:185: Index assessment         : [Файлы] complexity=simple directories=7 files=12
2025/10/24 10:36:30 [DEBUG] indexingSchedule.go:192: Time spent indexing [Файлы]: 0 seconds
2025/10/24 10:36:30 [DEBUG] indexingSchedule.go:40: Next scan in 1m0s
2025/10/24 10:36:34 [INFO ] write.go:261: GET     | 301 | [::1]:34228     | N/A          | 0ms          | "/health"
2025/10/24 10:37:04 [INFO ] write.go:261: GET     | 301 | [::1]:40870     | N/A          | 0ms          | "/health"
2025/10/24 10:37:30 [DEBUG] indexingSchedule.go:142: Starting quick scan for [Файлы]
2025/10/24 10:37:30 [DEBUG] indexingSchedule.go:170: Time spent indexing [Файлы]: 0 seconds
2025/10/24 10:37:30 [DEBUG] indexingSchedule.go:40: Next scan in 6m0s
2025/10/24 10:37:34 [INFO ] write.go:261: GET     | 301 | [::1]:52292     | N/A          | 0ms          | "/health"
2025/10/24 10:37:36 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59383 | USER.. | 0ms          | "/filebrowser/files/"
2025/10/24 10:37:36 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59390 | N/A          | 0ms          | "/filebrowser/public/static/fonts/roboto-normal-latin.woff2"
2025/10/24 10:37:36 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59391 | N/A          | 0ms          | "/filebrowser/public/static/fonts/roboto-medium-latin.woff2"
2025/10/24 10:37:36 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59393 | N/A          | 0ms          | "/filebrowser/public/static/fonts/roboto-bold-latin.woff2"
2025/10/24 10:37:36 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59397 | N/A          | 0ms          | "/filebrowser/public/static/assets/index-CcVyIdpg.css"
2025/10/24 10:37:36 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59405 | N/A          | 0ms          | "/filebrowser/public/static/fonts/material-icons.woff2"
2025/10/24 10:37:36 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59404 | N/A          | 2ms          | "/filebrowser/public/static/assets/index-DGV3OuAQ.js"
2025/10/24 10:37:36 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59406 | N/A          | 0ms          | "/filebrowser/public/static/assets/i18n-naXViSN5.js"
2025/10/24 10:37:37 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59415 | USER.. | 0ms          | "/filebrowser/public/api/users?id=self"
2025/10/24 10:37:37 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59416 | N/A          | 0ms          | "/filebrowser/public/static/img/icons/favicon-256x256.png"
2025/10/24 10:37:37 [INFO ] write.go:261: POST    | 200 | PROXY_IP:59419 | N/A          | 0ms          | "/filebrowser/api/auth/login"
2025/10/24 10:37:37 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59424 | USER.. | 0ms          | "/filebrowser/api/resources?path=%252F&source=%25D0%25A4%25D0%25B0%25D0%25B9%25D0%25BB%25D1%258B"
2025/10/24 10:37:37 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59428 | USER.. | 0ms          | "/filebrowser/api/jobs/status/sources"
2025/10/24 10:37:37 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59432 | USER.. | 3ms          | "/filebrowser/api/events?sessionId=fPYQfXEg"
2025/10/24 10:37:37 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59438 | USER.. | 0ms          | "/filebrowser/api/jobs/status/sources"
2025/10/24 10:37:42 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59541 | USER.. | 0ms          | "/filebrowser/files/"
2025/10/24 10:37:42 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59435 | USER.. | 4674ms       | "/filebrowser/api/events?sessionId=fPYQfXEg"
2025/10/24 10:37:42 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59545 | USER.. | 0ms          | "/filebrowser/public/api/users?id=self"
2025/10/24 10:37:42 [INFO ] write.go:261: POST    | 200 | PROXY_IP:59550 | N/A          | 0ms          | "/filebrowser/api/auth/login"
2025/10/24 10:37:42 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59553 | USER.. | 0ms          | "/filebrowser/api/resources?path=%252F&source=%25D0%25A4%25D0%25B0%25D0%25B9%25D0%25BB%25D1%258B"
2025/10/24 10:37:42 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59556 | USER.. | 0ms          | "/filebrowser/api/jobs/status/sources"
2025/10/24 10:37:42 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59559 | USER.. | 3ms          | "/filebrowser/api/events?sessionId=aS06yzNF"
2025/10/24 10:37:42 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59565 | USER.. | 0ms          | "/filebrowser/api/jobs/status/sources"
2025/10/24 10:37:45 [INFO ] write.go:261: GET     | 200 | PROXY_IP:59562 | USER.. | 3548ms       | "/filebrowser/api/events?sessionId=aS06yzNF"
2025/10/24 10:38:04 [INFO ] write.go:261: GET     | 301 | [::1]:40124     | N/A          | 0ms          | "/health"
2025/10/24 10:38:15 [INFO ] write.go:261: GET     | 200 | PROXY_IP:60445 | USER.. | 0ms          | "/filebrowser/files/"
2025/10/24 10:38:15 [INFO ] write.go:261: GET     | 200 | PROXY_IP:60463 | USER.. | 0ms          | "/filebrowser/public/api/users?id=self"
2025/10/24 10:38:15 [INFO ] write.go:261: POST    | 200 | PROXY_IP:60466 | N/A          | 0ms          | "/filebrowser/api/auth/login"
2025/10/24 10:38:15 [INFO ] write.go:261: GET     | 200 | PROXY_IP:60471 | USER.. | 0ms          | "/filebrowser/api/resources?path=%252F&source=%25D0%25A4%25D0%25B0%25D0%25B9%25D0%25BB%25D1%258B"
2025/10/24 10:38:15 [INFO ] write.go:261: GET     | 200 | PROXY_IP:60474 | USER.. | 0ms          | "/filebrowser/api/jobs/status/sources"
2025/10/24 10:38:15 [INFO ] write.go:261: GET     | 200 | PROXY_IP:60478 | USER.. | 3ms          | "/filebrowser/api/events?sessionId=W8kfaGwL"
2025/10/24 10:38:15 [INFO ] write.go:261: GET     | 200 | PROXY_IP:60484 | USER.. | 0ms          | "/filebrowser/api/jobs/status/sources"
2025/10/24 10:38:17 [INFO ] write.go:261: GET     | 200 | PROXY_IP:60528 | USER.. | 0ms          | "/filebrowser/api/resources?path=%252Fslide.pptx&source=%25D0%25A4%25D0%25B0%25D0%25B9%25D0%25BB%25D1%258B"
2025/10/24 10:38:17 [INFO ] write.go:261: GET     | 200 | PROXY_IP:60534 | USER.. | 0ms          | "/filebrowser/api/resources?path=%252F&source=%25D0%25A4%25D0%25B0%25D0%25B9%25D0%25BB%25D1%258B"
2025/10/24 10:38:17 [INFO ] write.go:261: GET     | 200 | PROXY_IP:60535 | USER.. | 0ms          | "/filebrowser/api/resources?path=%252Fslide.pptx&source=%25D0%25A4%25D0%25B0%25D0%25B9%25D0%25BB%25D1%258B&content=true"
2025/10/24 10:38:17 [DEBUG] onlyOffice.go:110: OnlyOffice user request: resolved path=/slide.pptx
2025/10/24 10:38:17 [INFO ] write.go:261: GET     | 200 | PROXY_IP:60538 | USER.. | 0ms          | "/filebrowser/api/onlyoffice/config?path=%2Fslide.pptx&source=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B"
2025/10/24 10:38:17 [WARN ] write.go:261: GET     | 401 | 172.20.0.5:54438 | N/A          | 0ms          | "/filebrowser/api/raw?files=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B%3A%3A%2Fslide.pptx&auth="
2025/10/24 10:38:18 [WARN ] write.go:261: GET     | 401 | 172.20.0.5:54442 | N/A          | 0ms          | "/filebrowser/api/raw?files=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B%3A%3A%2Fslide.pptx&auth="
2025/10/24 10:38:19 [WARN ] write.go:261: GET     | 401 | 172.20.0.5:54456 | N/A          | 0ms          | "/filebrowser/api/raw?files=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B%3A%3A%2Fslide.pptx&auth="
2025/10/24 10:38:34 [INFO ] write.go:261: GET     | 301 | [::1]:37178     | N/A          | 0ms          | "/health"

baur avatar Oct 24 '25 05:10 baur

server:
  port: 80
  baseURL: "/filebrowser"
  database: "./data/database.db"
  disablePreviews: true
  disablePreviewResize: true
  disableTypeDetectionByHeader: true
  sources:
    - path: "/folder"
      name: "Файлы"
      config:
        defaultEnabled: true
        denyByDefault: false
  externalUrl: "http://filebrowser_SERVER_IP:8686/filebrowser"
  internalUrl: "http://filebrowser-dev:80/filebrowser"
  logging:
    - output: stdout
      levels: "info|warning|error|debug"
auth:
  adminUsername: admin
  tokenExpirationHours: 2
  methods:
    noauth: false
    password:
      enabled: true
    proxy:
      enabled: true
      header: "X-Forwarded-User"
      createUser: true      
frontend:
  name: ""
  disableDefaultLinks: true
  disableUsedPercentage: true
userDefaults:
  hideSidebarFileActions: false
  stickySidebar: true
  disableSearchOptions: true
  disableQuickToggles: true
  darkMode: false
  locale: ru
  viewMode: list
  singleClick: false
  showHidden: false
  dateFormat: false
  gallerySize: 3
  themeColor: var(--blue)
  quickDownload: true
  lockPassword: true
  disableSettings: false
  permissions:
    download: true
integrations:
  office:
    url: "http://onlyoffice_SERVER_IP:8585"
    internalUrl: "http://onlyoffice:80"
    secret: "TevrjpRNMmKC0JxAwY7iZ2VXLrvG1gue"
    viewOnly: true

baur avatar Oct 24 '25 05:10 baur

services:
  filebrowser:
    image: filebrowser:0.8.11-dev
    container_name: filebrowser-dev
    restart: unless-stopped
    environment:
      FILEBROWSER_CONFIG: "data/config.yaml"
      FILEBROWSER_ADMIN_PASSWORD: *****
    volumes:
      - '/srv/filebrowser/data:/folder'
      - './data:/home/filebrowser/data'
    ports:
      - '8686:80'
    networks:
      - common_network
networks:
  common_network:
    external: true
services:
  onlyoffice:
    image: onlyoffice/documentserver:latest
    container_name: onlyoffice
    environment:
      JWT_SECRET: ***
    ports:
      - '8585:80'
    networks:
      - common_network

networks:
  common_network:
    external: true

baur avatar Oct 24 '25 05:10 baur

const express = require('express');
const { createProxyMiddleware } = require('http-proxy-middleware');
const ntlm = require('express-ntlm');
const app = express();
const fileDataProxy = createProxyMiddleware({
  target: 'http://filebrowser_SERVER_IP:8686',
  changeOrigin: true,
});
app.use(ntlm({
  debug: function () {
    var args = Array.prototype.slice.apply(arguments);
  },
  domain: "***",
  domaincontroller: "ldap://***",
}));
app.use((req, res, next) => {
  if (req.ntlm) {
    req.headers['X-Forwarded-User'] = req.ntlm.UserName.toUpperCase();
  }
  next();
});
app.use('/', fileDataProxy);
app.listen(9999, () => console.log('Reverse proxy started on port 9999'));

baur avatar Oct 24 '25 05:10 baur

Image

baur avatar Oct 24 '25 06:10 baur

Ah! I see:

This is because of proxy! Proxy auth always was a special case where it would skip token generation. But the onlyoffice flow requires tokens to work correctly.

So, I'll update 0.8.11 so proxy auth also follows the backend jwt token process to fix this.

gtsteffaniak avatar Oct 24 '25 11:10 gtsteffaniak

ok while you are testing dev, could you re-pull and test the newer images? It should be resolved now... would love to get confirmation on that before release if you can.

gtsteffaniak avatar Oct 24 '25 17:10 gtsteffaniak

Thank you for the quick fix! Sorry to say, I'm on vacation until November 11, but I'm sure everything will be fine.

baur avatar Oct 24 '25 18:10 baur

Got the exact same situatuon, testing soon

enrvate avatar Oct 28 '25 15:10 enrvate

Image

enrvate avatar Oct 28 '25 17:10 enrvate

thanks for confirming! I will close it now

gtsteffaniak avatar Oct 28 '25 17:10 gtsteffaniak

Same problem with v0.8.11-beta and v1.0.1-stable

2025/11/11 16:16:19 [WARN ] write.go:261: GET     | 401 | 172.20.0.5:49594 | N/A          | 0ms          | "/filebrowser/api/raw?files=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B%3A%3A%2Fslide.pptx&auth="
2025/11/11 16:16:20 [WARN ] write.go:261: GET     | 401 | 172.20.0.5:49600 | N/A          | 0ms          | "/filebrowser/api/raw?files=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B%3A%3A%2Fslide.pptx&auth="
2025/11/11 16:16:21 [WARN ] write.go:261: GET     | 401 | 172.20.0.5:49606 | N/A          | 0ms          | "/filebrowser/api/raw?files=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B%3A%3A%2Fslide.pptx&auth="

baur avatar Nov 11 '25 11:11 baur

Same with Quantum (v1.1.0-beta) :(

Error: 401

2025/11/19 08:58:12 [INFO ] write.go:261: GET     | 301 | [::1]:33150     | N/A          | 0ms          | "/health"
2025/11/19 08:58:42 [INFO ] write.go:261: GET     | 301 | [::1]:35236     | N/A          | 0ms          | "/health"
2025/11/19 08:59:12 [INFO ] write.go:261: GET     | 301 | [::1]:40802     | N/A          | 0ms          | "/health"
2025/11/19 08:59:37 [INFO ] root.go:125: Received shutdown signal. Shutting down gracefully...
2025/11/19 08:59:37 [INFO ] httpRouter.go:270: Shutting down HTTP server...
2025/11/19 08:59:37 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:62707 | USER | 116378ms     | "/filebrowser/api/events?sessionId=seEGOmd3"
2025/11/19 08:59:37 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:62696 | USER | 116450ms     | "/filebrowser/api/events?sessionId=AS4peHnV"
2025/11/19 08:59:37 [INFO ] httpRouter.go:295: HTTP server shut down gracefully.
2025/11/19 08:59:37 [INFO ] root.go:136: Shutdown complete.
2025/11/19 08:59:38 [INFO] Using admin password from FILEBROWSER_ADMIN_PASSWORD environment variable
2025/11/19 08:59:38 [DEBUG] styling.go:101: Added custom theme: default
2025/11/19 08:59:38 [DEBUG] styling.go:118: Loaded custom CSS from: reduce-rounded-corners.css (1082 bytes)
2025/11/19 08:59:38 [DEBUG] styling.go:101: Added custom theme: alternative
2025/11/19 08:59:38 [INFO ] root.go:93: Initializing FileBrowser Quantum (v1.1.0-beta)
2025/11/19 08:59:38 [INFO ] root.go:94: Using Config file        : data/config.yaml
2025/11/19 08:59:38 [INFO ] root.go:95: Auth Methods             : [password proxy]
2025/11/19 08:59:38 [INFO ] root.go:96: Using existing database  : ./data/database.db
2025/11/19 08:59:38 [INFO ] root.go:97: Sources                  : [Файлы: /folder]
2025/11/19 08:59:38 [DEBUG] root.go:98: Using Embedded FS        : false
2025/11/19 08:59:38 [INFO ] indexingFiles.go:130: initializing index: [Файлы]
2025/11/19 08:59:38 [INFO ] indexingSchedule.go:138: Setting up multi-scanner system for [Файлы]
2025/11/19 08:59:38 [INFO ] user.go:44: Resetting admin user to default username and password.
2025/11/19 08:59:38 [DEBUG] users.go:177: Saving user [admin] changepass: true
2025/11/19 08:59:38 [DEBUG] indexingSchedule.go:167: Created 7 scanners for [Файлы] (1 root + 6 children)
2025/11/19 08:59:38 [DEBUG] preview.go:73: MuPDF Enabled            : true
2025/11/19 08:59:38 [DEBUG] preview.go:74: Media Enabled            : true
2025/11/19 08:59:38 [INFO ] httpRouter.go:259: Running at               : http://localhost/filebrowser/
2025/11/19 08:59:38 [DEBUG] indexingSchedule.go:265: Time spent indexing [Файлы]: 0s seconds
2025/11/19 08:59:42 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:65093 | USER | 3ms          | "/filebrowser/api/events?sessionId=AS4peHnV"
2025/11/19 08:59:42 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:65099 | USER | 0ms          | "/filebrowser/api/jobs/status/sources"
2025/11/19 08:59:42 [INFO ] write.go:261: GET     | 301 | [::1]:59826     | N/A          | 0ms          | "/health"
2025/11/19 08:59:42 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:65115 | USER | 3ms          | "/filebrowser/api/events?sessionId=seEGOmd3"
2025/11/19 08:59:42 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:65121 | USER | 0ms          | "/filebrowser/api/jobs/status/sources"
2025/11/19 09:00:02 [WARN ] write.go:261: GET     | 404 | xx.xx.xx.xx:52649 | N/A          | 0ms          | "/filebrowser/public/static/assets/i18n-DG5t2jZG.js"
2025/11/19 09:00:02 [WARN ] write.go:261: GET     | 404 | xx.xx.xx.xx:52649 | N/A          | 0ms          | "/filebrowser/public/static/assets/index-RaBKMYf7.js"
2025/11/19 09:00:10 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49242 | USER | 0ms          | "/filebrowser/files"
2025/11/19 09:00:10 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:65096 | USER | 28258ms      | "/filebrowser/api/events?sessionId=AS4peHnV"
2025/11/19 09:00:10 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49251 | N/A          | 1ms          | "/filebrowser/public/static/assets/index-9bZmgq2i.js"
2025/11/19 09:00:10 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49252 | N/A          | 1ms          | "/filebrowser/public/static/assets/index-RifWmX-P.css"
2025/11/19 09:00:10 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49253 | N/A          | 1ms          | "/filebrowser/public/static/assets/i18n-DYm995nJ.js"
2025/11/19 09:00:11 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49261 | USER | 0ms          | "/filebrowser/public/api/users?id=self"
2025/11/19 09:00:11 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49266 | N/A          | 0ms          | "/filebrowser/public/static/favicon"
2025/11/19 09:00:11 [INFO ] write.go:261: POST    | 200 | xx.xx.xx.xx:49267 | USER | 0ms          | "/filebrowser/api/auth/login"
2025/11/19 09:00:11 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49270 | USER | 0ms          | "/filebrowser/api/jobs/status/sources"
2025/11/19 09:00:11 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49276 | USER | 0ms          | "/filebrowser/api/resources?path=%252F&source=%25D0%25A4%25D0%25B0%25D0%25B9%25D0%25BB%25D1%258B"
2025/11/19 09:00:11 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49277 | USER | 25ms         | "/filebrowser/api/events?sessionId=u57r4WtO"
2025/11/19 09:00:11 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49286 | USER | 0ms          | "/filebrowser/api/jobs/status/sources"
2025/11/19 09:00:12 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49315 | USER | 0ms          | "/filebrowser/api/resources?path=%252FRS%252F&source=%25D0%25A4%25D0%25B0%25D0%25B9%25D0%25BB%25D1%258B"
2025/11/19 09:00:12 [INFO ] write.go:261: GET     | 301 | [::1]:38096     | N/A          | 0ms          | "/health"
2025/11/19 09:00:15 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49372 | USER | 0ms          | "/filebrowser/api/resources?path=%252F&source=%25D0%25A4%25D0%25B0%25D0%25B9%25D0%25BB%25D1%258B"
2025/11/19 09:00:17 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49405 | USER | 0ms          | "/filebrowser/files/Файлы/"
2025/11/19 09:00:17 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49283 | USER | 5830ms       | "/filebrowser/api/events?sessionId=u57r4WtO"
2025/11/19 09:00:17 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49411 | USER | 0ms          | "/filebrowser/public/api/users?id=self"
2025/11/19 09:00:17 [INFO ] write.go:261: POST    | 200 | xx.xx.xx.xx:49415 | USER | 0ms          | "/filebrowser/api/auth/login"
2025/11/19 09:00:17 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49419 | USER | 0ms          | "/filebrowser/api/resources?path=%252F&source=%25D0%25A4%25D0%25B0%25D0%25B9%25D0%25BB%25D1%258B"
2025/11/19 09:00:17 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49421 | USER | 0ms          | "/filebrowser/api/jobs/status/sources"
2025/11/19 09:00:17 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49425 | USER | 4ms          | "/filebrowser/api/events?sessionId=D3upgExe"
2025/11/19 09:00:17 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49432 | USER | 0ms          | "/filebrowser/api/jobs/status/sources"
2025/11/19 09:00:19 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49480 | USER | 0ms          | "/filebrowser/api/resources?path=%252Fslide.pptx&source=%25D0%25A4%25D0%25B0%25D0%25B9%25D0%25BB%25D1%258B"
2025/11/19 09:00:19 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49487 | USER | 0ms          | "/filebrowser/api/resources?path=%252Fslide.pptx&source=%25D0%25A4%25D0%25B0%25D0%25B9%25D0%25BB%25D1%258B&content=true"
2025/11/19 09:00:19 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49488 | USER | 0ms          | "/filebrowser/api/resources?path=%252F&source=%25D0%25A4%25D0%25B0%25D0%25B9%25D0%25BB%25D1%258B"
2025/11/19 09:00:19 [DEBUG] onlyOffice.go:110: OnlyOffice user request: resolved path=/slide.pptx
2025/11/19 09:00:19 [INFO ] write.go:261: GET     | 200 | xx.xx.xx.xx:49492 | USER | 0ms          | "/filebrowser/api/onlyoffice/config?path=%2Fslide.pptx&source=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B"
2025/11/19 09:00:20 [WARN ] write.go:261: GET     | 401 | 172.20.0.5:55462 | N/A          | 0ms          | "/filebrowser/api/raw?files=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B%3A%3A%2Fslide.pptx&auth="
2025/11/19 09:00:21 [WARN ] write.go:261: GET     | 401 | 172.20.0.5:55466 | N/A          | 0ms          | "/filebrowser/api/raw?files=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B%3A%3A%2Fslide.pptx&auth="
2025/11/19 09:00:22 [WARN ] write.go:261: GET     | 401 | 172.20.0.5:55472 | N/A          | 0ms          | "/filebrowser/api/raw?files=%D0%A4%D0%B0%D0%B9%D0%BB%D1%8B%3A%3A%2Fslide.pptx&auth="
2025/11/19 09:00:42 [INFO ] write.go:261: GET     | 301 | [::1]:52334     | N/A          | 0ms          | "/health"

baur avatar Nov 19 '25 04:11 baur

Image

baur avatar Nov 19 '25 04:11 baur

@baur I can see clearly from your debug screenshot that the auth is still blank. Let me take another look at this

gtsteffaniak avatar Nov 19 '25 12:11 gtsteffaniak

can you try v1.1.1-beta ? I couldn't replicate it, but update with a fix for a scenario I saw in code that should prevent a blank auth key as you see.

gtsteffaniak avatar Nov 24 '25 22:11 gtsteffaniak