Deployment
Introduction
This page provides an overview of the different ways to deploy ShinyProxy. It is advised to first read the Getting Started guide in order to understand the basics of ShinyProxy first.
ShinyProxy can be deployed directly on a server, making it straightforward to run and test ShinyProxy. However, to achieve a full production ready setup, some additional steps are needed (e.g. configuring TLS certificates). The ShinyProxy Operator completely automates the deployment of ShinyProxy on both pure Docker hosts and Kubernetes.
The operator has the following advantages:
- zero-downtime updates of configuration
- zero-downtime upgrades of ShinyProxy
- uses the official ShinyProxy Docker images, which always uses the correct JDK and has optimal (memory) settings
- fully integrated with Redis, providing session and app persistence
- allows to deploy multiple ShinyProxy servers (e.g. to have a public and private ShinyProxy server or to achieve multi-tenancy)
- resource (cpu and memory) management of the ShinyProxy containers
On top of this, running the operator on a Docker host also provides:
- automatic deployment of Redis
- automatic deployment and updating of monitoring stack (including Prometheus, Loki and Grafana)
- automatic setup of TLS using Let’s encrypt (handled by Caddy).
On Kubernetes the operator can run multiple ShinyProxy replicas, achieving high availability and scaling.
See the ShinyProxy Operator docs to get started!
Besides using the operator, the following deployment options are supported:
Warning
In order to have a secure setup, make sure to follow the instructions on the Security page after you have installed ShinyProxy.Supported Docker versions
In order to use the Docker or Docker Swarm backends, Docker must be installed on the server running ShinyProxy. It’s recommended to use the Docker binaries provided by the Docker website and not by your Linux distribution. When using Ubuntu, make sure to not use the Docker snap as this can cause problems as well.
Since version 3.2.0 ShinyProxy has experimental support for Podman.
JAR file
See the Getting Started page for detailed instructions
The most simple way to run ShinyProxy is to use the JAR file. For simple testing or demonstration purposes it’s sufficient to use
java -jar shinyproxy-3.2.0.jar
which will run ShinyProxy on port 8080
.
It’s possible to use nohup
to let ShinyProxy running when you log out of a
system, but it’s advisable to use alternatives e.g. the .deb
or .rpm
packages or the containerized ShinyProxy to have it defined as a proper service.
.deb package
Use the following steps to set up and configure ShinyProxy on Debian and Ubuntu systems:
-
install or upgrade the .deb package of ShinyProxy:
wget https://www.shinyproxy.io/downloads/shinyproxy_3.2.0_amd64.deb sudo apt install ./shinyproxy_3.2.0_amd64.deb
To see whether the service is up and running, use:
sudo systemctl status shinyproxy
To check the log, use:
sudo journalctl -u shinyproxy
-
allow the ShinyProxy user to access the Docker daemon:
sudo usermod -a -G docker shinyproxy sudo systemctl restart shinyproxy
-
permanently enable the service so ShinyProxy is automatically started after a reboot:
sudo systemctl enable shinyproxy
-
adapt the default configuration to your needs:
sudo nano /etc/shinyproxy/application.yml sudo systemctl restart shinyproxy
After following these steps, you an access ShinyProxy on port 8080 of your server. The default configuration allows to login using the following credentials:
- username:
jack
and password:password
- username:
jeff
and password:password
In order to secure ShinyProxy (or put it behind a loadbalancer or reverse proxy) check the Security page.
.rpm package
Use the following steps to set up and configure ShinyProxy on Red Hat based systems (e.g. Red Hat Enterprise Linux, Alma Linux, Rocky Linux, CentOS Stream etc):
Since version 3.2.0 ShinyProxy has experimental support for Podman.
-
install or upgrade the .deb package of ShinyProxy:
curl -O https://www.shinyproxy.io/downloads/shinyproxy_3.2.0_x86_64.rpm sudo dnf install ./shinyproxy_3.2.0_x86_64.rpm
To see whether the service is up and running, use:
sudo systemctl status shinyproxy
To check the log, use:
sudo journalctl -u shinyproxy
-
allow the ShinyProxy user to access the Docker daemon:
sudo usermod -a -G docker shinyproxy sudo systemctl restart shinyproxy
-
permanently enable the service so ShinyProxy is automatically started after a reboot:
sudo systemctl enable shinyproxy sudo systemctl enable --now docker
-
open port
8080
infirewalld
:sudo firewall-cmd --add-port=8080/tcp --permanent sudo firewall-cmd --reload
-
adapt the default configuration to your needs:
sudo nano /etc/shinyproxy/application.yml sudo systemctl restart shinyproxy
After following these steps, you an access ShinyProxy on port 8080 of your server. The default configuration allows to login using the following credentials:
- username:
jack
and password:password
- username:
jeff
and password:password
In order to secure ShinyProxy (or put it behind a loadbalancer or reverse proxy) check the Security page.
Docker
As mentioned in the introduction, the best way to deploy ShinyProxy on Docker is by making use of the ShinyProxy Operator. Alternatively, ShinyProxy can be deployed directly on a Docker host.
Docker Swarm
See the complete example for running ShinyProxy on a Docker Swarm cluster.
Kubernetes
The ShinyProxy Operator should be used for deploying ShinyProxy on Kubernetes, providing scalability, zero-downtime updates, high availability, multi-tenancy and more!
AWS ECS
ShinyProxy supports running apps on AWS ECS using the ECS backend. At the same time, ShinyProxy itself can also run on ECS. This is a scalable way to run ShinyProxy, without having to maintain servers or Kubernetes clusters.
See the full Terraform deployment example.