Host Shiny App within home ShinyApps directory - nothing shows

I have a set up on an EC2 server with both hosted Rstudio and Shiny Server installed. My home directory has a ShinyApps directory. I recall creating this when setting up Shiny Server. I am now able to host my shiny apps by placing them inside that directory. They then appear at: http://our_url.com:3838/rstudio-doug/my_shiny_app/

I'm currently working in a different environment and am struggling to replicate this set up.

Our dev ops team provided me access to hosted rstudio and shiny server running from the same docker image (rocker/tidyverse with ADD=shiny) on a server. Rstudio is set up fine. Shiny server appears to be too, I can access the 'welcome to shiny server!' page and see the 'It's Alive' app and 'Shiny Doc' in the right hand column.

I can also see the example application at https://our_url/sample-apps/hello/

I followed along the instructions on the quick start guide about letting users manage their own applications.

I have run the following commands as sudo:

sudo /opt/shiny-server/bin/deploy-example user-dirs
mkdir ~/ShinyApps
sudo cp -R /opt/shiny-server/samples/sample-apps/hello ~/ShinyApps/

The user-dirs config is all setup now. Enjoy!

Done.

" By default, Shiny Server listens on port 3838, so your new application will be available at http://<server-address>:3838/<your_username>/hello where <your_username> is your Linux username."

Directory ShinyApps is indeed in my home directory. My linux username is rstudio. In ~/ShinyApps is the example app 'hello'.

When I visit this url I do see the app: https://our_url/sample-apps/hello/

However, when I visit:
https://our_url/users/rstudio/hello/

Page not found

In case it's relevant, when our developers handed this off to me I reach the Shiny Server by not typing a port in my url bar. I asked them to clarify:

" We are running the containers in kubernetes, Single Container, with Volume Claim. Traffic from shiny.oururl.dev:443 is routed to the container on port 3838 and traffic from rs.oururl.dev:443 is routed to port 8787 on the same container running shiny. The different front ends are just a way of mapping the backend port."

In case relevant, here is shiny-server.conf:

# Tell Shiny Server that we want to run as the user whose
# home directory we find the application in.
run_as :HOME_USER:;

# Define a server that listens of port 3838.
server {
  listen 3838;

  # Define a location at the base URL
  location / {

    # Allow users to host their own apps in ~/ShinyApps
    user_dirs;

    # Optionally, you can restrict the privilege of hosting Shiny applications
    # only to members of a particular Linux group.
    # members_of shinyUsers;
  }
}

How can I access the Shiny App in user rstudio's home directory ~/ShinyApps/hello?

[Edit]
After playing around with the conf file I tried to restart:

sudo systemctl restart shiny-server
sudo: systemctl: command not found

Also tried:

status shiny-server
bash: status: command not found

Also tried:

sudo stop shiny-server
sudo: stop: command not found

Since I'm running Shiny server in the rocker/tidyverse image my linux environment is Ubuntu. It's odd because I can see shiny running as a process and I can also see the example app running fine at the welcome page.

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