Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk11 min

How to Self-Host Shiny Server on a Linux VPS

A complete guide to installing R and Shiny Server on a supported Linux VPS, deploying apps, configuring port 3838, adding HTTPS, and securing open-source hosting.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can self-host Shiny applications on an x86-64 Linux VPS by installing R, the Shiny R package, and the separate Shiny Server package, then placing each app under /srv/shiny-server/. The open-source server listens on port 3838 by default and can publish multiple apps at paths such as https://shiny.example.com/sales/. For a production deployment, put the listener behind HTTPS, restrict the firewall, run the service as its dedicated shiny account, and use an external identity layer or a paid Posit product if users must log in.

What Shiny Server does

Shiny Server is the web server component for R Shiny applications. It accepts browser connections, starts and manages Shiny app sessions, and maps URL paths to application directories. A single VPS can therefore host several independent apps, for example /forecast/, /dashboard/, and /survey/.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The open-source edition is free software under the AGPLv3 license. It is a good fit when you are comfortable administering Linux, patching R packages, securing a public server, and operating your own backups and monitoring. It is not a complete identity-management or enterprise operations platform.

Choose a supported VPS before installing

Supported operating systems and architecture

The current Posit administrator guide supports x86-64 systems running:

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
  • RHEL 8 or later
  • Ubuntu 22.04 LTS or later LTS releases
  • SUSE Linux Enterprise Server 15 SP7

Older README files and blog posts can list historical platforms. Treat the current administrator guide as authoritative when you provision a new machine. Ubuntu 24.04 is also used in the official cloud deployment example, so an Ubuntu 24.04 VPS is a reasonable current choice.

VPS preparation checklist

  • Create a non-root administrator account with sudo access. Use root only for package installation and system changes.
  • Apply all operating-system updates and reboot if the kernel requires it.
  • Set a stable host name and confirm the server clock is correct.
  • Reserve a DNS name, such as shiny.example.com, and plan whether the service will be public or reachable only through a private network.
  • Decide which inbound ports are needed. A typical public setup exposes SSH and HTTPS, while keeping Shiny’s port 3838 private.
  • Choose disk and memory based on your apps. Large data sets, model fitting, image processing, and many concurrent sessions need more resources than a small demonstration app.

A VPS provider’s price, region, backup policy, and network limits vary, so select those independently of the Shiny software decision. The Shiny Server package itself does not include a VPS, R, or the Shiny R package.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Understand the deployment architecture

A reliable layout separates the public edge from the application listener:

  1. A DNS record points your hostname to the VPS.
  2. An HTTPS endpoint (Nginx, Apache, Caddy, or a cloud load balancer) handles certificates and encrypted browser traffic.
  3. The proxy forwards requests to Shiny Server on 127.0.0.1:3838, or to another private address.
  4. Shiny Server reads its configuration from /etc/shiny-server/shiny-server.conf and serves applications from /srv/shiny-server/ unless you configure another location.
  5. The service runs under the system account shiny, so that account must be able to read application files and any data they legitimately need.

You can expose port 3838 directly for a temporary test, using a URL such as http://HOST:3838/APP_NAME/. Do not treat that as a finished public deployment: it lacks the normal HTTPS, firewall, and certificate controls.

Install R and the Shiny package

The Shiny Server installer is separate. Posit’s guide explicitly states that it does not include R or the Shiny R package, so install both first.

Update Ubuntu and install prerequisites

sudo apt update
sudo apt full-upgrade
sudo apt install r-base gdebi-core

If the distribution’s default R is too old for your applications, add the appropriate CRAN repository for that distribution, then repeat the package installation. Follow the repository’s instructions for your exact Ubuntu, RHEL, or SLES release rather than mixing packages from another release.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

Install Shiny system-wide

Install the package for all users so the shiny service account can load it:

sudo R -e 'install.packages("shiny")'

R will ask you to select a CRAN mirror when one is not configured. For reproducible deployments, record the R version, the Shiny version, and the versions of every application-specific package. If an app uses packages such as database drivers or geospatial libraries, install their operating-system dependencies and R packages before testing through Shiny Server.

Verify the prerequisite

R --version
sudo R -e 'packageVersion("shiny")'

The commands should return an installed R version and a Shiny package version without errors. Resolve missing shared libraries or compilation failures now; the Shiny Server process will not repair an incomplete R installation later.

Install Shiny Server on Ubuntu

Download the correct package

Obtain the current amd64 .deb installer from the official Shiny Server download area. Select the package matching your Ubuntu architecture and record the exact version in your deployment notes. Do not silently replace a tested package during a routine OS update.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install the package

From the directory containing the downloaded file, run:

sudo gdebi shiny-server-<version>-amd64.deb

Accept the dependency installation when prompted. The package installs the server under /opt/shiny-server/, creates the shiny service account, and installs the standard configuration and service integration.

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

If gdebi reports an unsatisfied dependency, run sudo apt update, correct the dependency, and rerun the installation. Avoid forcing a package from a different distribution release.

Start and enable the service

sudo systemctl enable --now shiny-server
sudo systemctl status shiny-server

The status output should show an active service. If it fails, inspect the journal and the Shiny log before changing configuration:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo journalctl -u shiny-server --no-pager -n 100
sudo tail -n 100 /var/log/shiny-server.log

Deploy a first Shiny application

Use a minimal application first

Create a directory containing an app.R file (or the usual ui.R and server.R pair). Test it locally with R or RStudio on a development machine before copying it to the VPS. A minimal app should load quickly and avoid external databases while you validate the server.

Copy the app into the default site directory

sudo mkdir -p /srv/shiny-server/hello
sudo cp -r ./hello/* /srv/shiny-server/hello/
sudo chown -R shiny:shiny /srv/shiny-server/hello
sudo find /srv/shiny-server/hello -type d -exec chmod 755 {} ;
sudo find /srv/shiny-server/hello -type f -exec chmod 644 {} ;

The default URL is:

http://YOUR_HOSTNAME:3838/hello/

Keep application files readable by the service account, but do not make private data world-writable. If an app must write uploads, caches, or generated reports, create a narrowly scoped writable directory and grant only the permissions it needs. Never place passwords, API keys, or database credentials in a publicly served application directory.

Install application-specific packages

Every package imported by the app must be available to the R library used by the shiny account. Install packages system-wide, or configure a controlled library path and permissions. A common failure is testing successfully as your own login while the service account cannot see the package.

sudo -u shiny R -e 'library(shiny); sessionInfo()'

Run a similar check for important dependencies. If it fails, install the missing package or correct the library path rather than changing file permissions broadly.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Configure routes, listeners, and logs

The main configuration file is /etc/shiny-server/shiny-server.conf. The default listener is port 3838. Back up the file and keep a copy in a private configuration repository before editing it.

Typical site configuration

A basic configuration can look like this:

run_as shiny;

server {
  listen 3838;

  location / {
    site_dir /srv/shiny-server;
    log_dir /var/log/shiny-server;
    directory_index on;
  }
}

This expresses the default site directory, listener, and log location. Configuration directives can differ by Shiny Server release and by whether you use single-app, multiple-app, or proxy locations, so validate the syntax against the administrator guide for the version you installed.

Change the listener deliberately

Leave port 3838 when nothing else uses it and the proxy can reach it locally. Change it if another service occupies the port or if your network design requires a different private listener. If you change it, update the reverse-proxy target, firewall rules, monitoring checks, and any local health checks together.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Apply and verify edits

sudo systemctl restart shiny-server
sudo systemctl status shiny-server
sudo tail -n 100 /var/log/shiny-server.log

Make one logical change at a time. A syntax error can prevent the service from restarting; the log usually identifies the file and line that need correction.

Put the VPS behind HTTPS and a domain

DNS and certificate sequence

  1. Create an A or AAAA record for your chosen host name that points to the VPS address.
  2. Wait for DNS to resolve from the networks your users will use.
  3. Obtain a trusted certificate for that name through your certificate authority or ACME client.
  4. Configure the HTTPS endpoint and proxy it to the private Shiny listener.
  5. Allow the HTTPS port through the VPS firewall, then test both the certificate and an actual app session.

Shiny Server has documented native SSL directives, so it can terminate TLS itself. A reverse proxy is often easier to operate because it centralizes certificate renewal and lets you keep port 3838 off the public network.

Nginx reverse-proxy example

The following illustrates the important proxy behavior, including WebSocket forwarding used by interactive sessions:

server {
    listen 80;
    server_name shiny.example.com;

    location / {
        proxy_pass http://127.0.0.1:3838;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 120s;
    }
}

Use your proxy’s normal HTTPS configuration and certificate-renewal method rather than copying a certificate path from another server. After enabling TLS, redirect plain HTTP to HTTPS and confirm that an app can load, submit inputs, and maintain a live session.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Firewall policy

With Ubuntu’s uncomplicated firewall, a restrictive starting point is:

sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow OpenSSH
sudo ufw allow 443/tcp
sudo ufw enable
sudo ufw status verbose

Do not allow 3838 from the entire Internet when the proxy connects over loopback. Temporarily open it only when you need a controlled diagnostic, then remove the rule. Ensure your SSH rule permits your actual administration network before enabling the firewall, or you can lock yourself out.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Authentication: what open source does and does not provide

Open-source Shiny Server does not provide built-in user authentication. Posit’s documentation states that requiring user authentication is not available in the open-source edition. Anyone who can reach an unprotected app URL can use that app, so do not publish confidential data on the assumption that a login screen exists.

When you need accounts and roles

  • Shiny Server Pro: choose this when you want Shiny-specific authentication and administration features with a commercial support path.
  • Posit Connect: choose this when you need a broader publishing platform, integrated authentication, content governance, and operational controls.
  • External access-control proxy: place an identity-aware proxy, VPN, or organizational single sign-on gateway in front of the open-source listener. Operate and patch that layer separately from Shiny Server.

Do not implement a password form inside the Shiny UI as a substitute for network authentication. Application-level checks can be bypassed or can expose data before a check runs; protect the route before it reaches the app.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Open source, Pro, and Connect compared

Capability Open-source Shiny Server Shiny Server Pro Posit Connect
License and cost model Free, AGPLv3-licensed software; you operate the VPS and maintenance. Commercial license; pricing and terms depend on the deployment. Commercial publishing platform; pricing and terms depend on the deployment.
Built-in user authentication Not available. Available through Pro features and configured identity systems. Available through integrated authentication options.
Administration and monitoring Linux service files, configuration, logs, and your own monitoring. More Shiny-specific administration and operational controls. Broader content administration, governance, and monitoring.
Deployment workflow Copy app directories, install R packages, and edit server configuration. Shiny deployment with additional administration features. Publish and manage content through the platform’s publishing workflow.
Scaling responsibility You size the VPS, proxy, and supporting services and plan scaling yourself. Provides more features for managed Shiny operations; infrastructure planning still matters. Designed for managed publishing and multiple content types; capacity and architecture still require planning.
Best fit Operators who are comfortable with Linux and external security controls. Teams that need authenticated Shiny hosting and vendor-supported administration. Organizations needing integrated authentication, governance, and a fuller publishing service.

Troubleshoot the failures you are most likely to see

The service will not start

  • Run sudo systemctl status shiny-server and inspect journalctl -u shiny-server.
  • Check the last edits in /etc/shiny-server/shiny-server.conf for missing braces, invalid directives, or a listener conflict.
  • Confirm that the configured port is free and that the shiny binary and service files are present.

The browser shows a 502 or connection refused

  • Verify that Shiny Server is active and listening on the port configured in the proxy.
  • Use a local request such as curl http://127.0.0.1:3838/ from the VPS to separate proxy problems from Shiny problems.
  • Check that the proxy target uses the correct address and port and that its timeout is not too short for the app’s startup time.

The app appears but fails to start

  • Read /var/log/shiny-server.log immediately after reproducing the error.
  • Run the app’s package imports as sudo -u shiny to expose library and permission differences.
  • Check that the application directory contains the expected app.R or ui.R/server.R files.
  • Install missing system libraries and R packages, then restart the service and test again.

Interactive controls disconnect

  • Confirm that the reverse proxy uses HTTP/1.1 and forwards Upgrade and Connection headers.
  • Increase proxy read timeouts for long-running sessions.
  • Check whether a load balancer, corporate proxy, or firewall is terminating idle WebSocket connections.

HTTPS works but assets or links use HTTP

Pass the original host and protocol headers from the proxy, verify the proxy’s forwarded-protocol settings, and inspect the browser developer tools for mixed-content requests. Correct the proxy and app base-path configuration rather than disabling browser security.

Operate the VPS after launch

Service lifecycle

sudo systemctl enable shiny-server
sudo systemctl start shiny-server
sudo systemctl stop shiny-server
sudo systemctl restart shiny-server
sudo systemctl status shiny-server

Use restart only after a deliberate configuration or package change. For routine diagnosis, status output, the system journal, and /var/log/shiny-server.log provide the first evidence.

Backups and change control

  • Back up /etc/shiny-server/shiny-server.conf, application directories, environment files, and any data stores that the apps depend on.
  • Keep package versions, R versions, and OS release information with each deployment.
  • Test restoring an app and its configuration on a separate VPS, not only copying backup files.
  • Keep secrets outside source control and rotate them after accidental exposure.

Updates and capacity

Apply security updates to the OS, R, Shiny, the server package, and application dependencies on a planned schedule. Test updates with a copy of the app before changing the production VPS. Monitor memory, CPU, disk space, process count, response time, and application errors; interactive R sessions can consume substantially more memory than a static web page. When one VPS is no longer sufficient, separate the proxy, application tier, and data services or move to a platform designed for managed scaling.

Production readiness checklist

  • Supported x86-64 distribution and current security updates
  • Non-root administrator with working SSH access
  • R and the Shiny package installed and tested as the shiny account
  • Shiny Server package version recorded and installed from the matching amd64 installer
  • Application files owned or readable by shiny, with no secrets in the public directory
  • Configuration backed up and validated
  • DNS record resolving to the VPS
  • Trusted HTTPS certificate with an announced renewal process
  • Reverse proxy tested with WebSocket-capable interactive sessions
  • Firewall exposing only required ports
  • Authentication or network access controls appropriate to the data
  • Log review, backups, monitoring, and a rollback plan

Once these checks pass, open-source Shiny Server provides a straightforward, self-managed way to publish several R applications from one Linux VPS. Its boundaries are equally important: you supply the infrastructure, security controls, authentication layer, backups, and ongoing maintenance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.