Loading custom css, javascript and images on shiny server

Hi all,
I'm setting up a self-managed shiny server, and have got my app running but it doesn't recognise the custom CSS and javascript files. I have it set up as recommended here I.e.

        - ui.R
        - server.R
        - www/
             - custom.css
             - some_functions.js
             - logo.jpg
        - auth/
             - sign-in.R

In my ui.R I source them as follows:

dashboardHeaderPlus(title = tagList(
        span(class = "logo-lg", "App Title", style = "padding: 0;"), 
        img(src = "logo.jpg"))),


        useShinyjs(),  # Include shinyjs
        useShinyalert(),  # Include shinyalert
                tags$link(rel = "stylesheet", href = "custom.css"),

        source("auth/sign-in.R", local = TRUE)$value,

And nothing under the top level directory (shiny-project) gets loaded. If I move sign-in.R to the top level it will be sourced, but still not styled. Note that all this works without issue locally as written above.

What's going on? Why aren't my style files, images and JS files loading?

Fixed. Was a permissions error on the server.
For anyone looking at this later, www folder needs to have 755 permissions.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.