Resources
Jan 15, 2026 |
55 min
|
3.4k views
|

How to Deploy a Shiny App in 2026: Hosting Options Compared

Where to deploy a Shiny app in 2026, and how to choose: shinyapps.io if you want it hosted and managed, Posit Connect Cloud if you want a portfolio with access control, a DigitalOcean droplet or a cloud VM if you want to run it yourself, Docker if you need the environment reproduced exactly, and the open-source Shiny Server if you want to host it on your own infrastructure for free. This session compares them on cost, control, maintenance and what happens when something breaks. With Alex Chisholm.

What you will learn
- What separates an app worth deploying from a prototype
- How shinyapps.io and Posit Connect differ, and how both have changed
- When a DigitalOcean droplet makes sense, and when a large cloud provider is worth the complexity
- What Docker solves, and what it costs you in maintenance
- What the open-source Shiny Server does and does not give you
- How to handle secrets and database credentials without putting them in your code
- What blue-green deployment is, and when a data team needs it
- How manifest.json records dependencies, and how to publish automatically on a git push
- What guardrails an AI-powered app needs around token usage

Chapters
0:00 What this session covers
3:03 What makes an application worth deploying
5:31 How shinyapps.io and Posit Connect evolved
8:12 DigitalOcean and droplets
9:36 DigitalOcean against the large cloud providers
11:48 DigitalOcean, Azure and AWS compared
14:47 Replicating your local environment with Docker
16:51 The open-source Shiny Server
18:20 A real deployment: University of Illinois CITL
20:02 What actually drives the deployment decision
21:53 GitHub Actions and version control
23:31 Single points of failure and maintainability
24:38 Posit Connect Cloud and the content portfolio
26:01 Beyond Shiny: Quarto, Streamlit and Dash
27:07 Handling secrets and database credentials
28:56 Custom vanity links against UUIDs
30:04 Blue-green deployment
31:55 Is it easy to set up a developer workflow?
34:46 Guardrails for AI-powered apps and token usage
37:32 Small language models and Ollama
38:29 An LLM sidebot demo
39:41 What manifest.json does, and how dependencies are resolved
45:00 Publishing automatically on a GitHub push
46:51 The future of shinyapps.io, and migration
48:33 Did you build a custom agent for that dashboard?
51:43 Publishing from the RStudio IDE to Connect Cloud
54:16 Inspecting website APIs for data harvesting

Learn more
Shiny deployment: https://shiny.posit.co/r/deploy.html
Posit Connect Cloud: https://connect.posit.cloud
shinyapps.io: https://www.shinyapps.io
Shiny Server open source: https://posit.co/products/open-source/shiny-server/

The Data Science Lab is a live weekly call. Register at https://pos.it/dslab

image: thumbnail.jpg

Transcript#

This transcript was generated automatically and may contain errors.

We are super excited to introduce you to Alex Chisholm. If you have not already met him, Alex, would you like to introduce yourself, say hello, and something you'd like to do for fun?

I would love to. Nice to see everybody today. I recognize a few names actually already from people we've talked to about Connect Cloud over the years. I'm Alex Chisholm. I'm a data scientist turned into a product manager based in Pittsburgh, Pennsylvania now. And something I'd like to do for fun is try to get AI to help me become a better musician, not like write music for me, but to have it be able to coach me and evaluate what I'm doing at a piano or an instrument. So that's one fun side project I'm up to these days.

Nice. There's so many data musicians. Me too, me included. I'm a vocalist. If you are a data musician, please tell me in the Discord chat what instrument you play, because I really like to construct all of our imaginary bands that we could possibly have.

So Alex is going to be walking through publishing Shiny Apps in 2026, in the modern era. And we have all been publishing Shiny Apps in various ways for the past decade. Sometimes it's self-hosting. Sometimes it's like containerizing. A lot of times it's shinyapps.io. And we now have Posit Connect Cloud, which is what I am now using.

Alex, I would love it if you could give us a brief intro. Feel free to share your screen about what we'll be talking about today. And then we will dive into screen sharing. And I want everybody to know that this is a super good place to stop us and ask questions. And Alex can pause and answer questions. This is not like a conference presentation where you can't raise your hand and then say, hey, wait, I want to know what you clicked or what keyboard shortcut you used. This is the place to do that.

Yeah. Take it away, Alex. Sure. Yeah. Feel free to interrupt whatsoever. I know this is only the second one of these. So the ground rules are not as strict. I've heard that the data science hangout, there's a no slide policy. You can't show any slides at any point. But because I'm able to share my screen here and I can share code and I can share platforms and IDEs, I do have a few slides just to ground the session because there's a very clear question, I think, in terms of what we're talking about, right?

It's like, where should I be deploying Shiny apps in 2026? So there's some real recommendations there and some real trade-offs that I'm sure some of you have been kind of like struggling with for years.

Oh, and you're a product manager for Connect Cloud, which means you can talk about roadmap questions and stuff like that. So if anybody wants to peek behind the curtain of like, what are they planning over at Posit? You're our guy, right? And that's okay to ask? Okay, great.

Deployment options overview

So thinking ahead, though, like, what really are the options? Like, one thing that I thought was neat was yesterday, Libby posted this on LinkedIn and she mentioned, you know, how she got kind of started using these things to create value. And other people chimed in and said the same type of thing. Like, I remember my first Shiny application.

So I started just like reminiscing, like the ones that in my career and life have been kind of meaningful for me. And one was like teaching on the side, just like helping students be able to look at statistical distributions, right? And like be able to change some of those input parameters, something as simple as standard deviation and see those curves kind of change in real time. Like it was a real super, you know, great teaching moment for me back in the day.

Also being able to like then step up for a type of application that's not just based upon like taking an input, but like taking now something from the user and then changing what's being shown on the screen. So we had an application that could process job applications from a link and then use natural language processing because this was seven, eight years ago before LLMs would have just done it for us. And then parse out like, well, what does this look like? Is this a business analyst job? Is this a data analyst job? Does it match what the title is?

And then getting even more kind of advanced, right? Like an application that I remember vividly where we had surveys running throughout the year and the client wanted to be able to take the results and generate custom benchmark reports for both individuals and for groups of individuals on the fly. And like Shiny came to the rescue for me in all of these situations. But in each of the situations, we also had to find out where we're going to like host and put these things.

And that was the hardest part, right? So like we had this application. I remember being pulled into meetings and I'd bring my laptop and like share it on the big screen in front of the room. And like in the modern time, it's like Zoom and stuff. Or I'd even take screenshots and then be asked to put these in PDFs or PowerPoint presentations or at the lowest form, which I thought was always unique. And I'm very curious if others have done this as well. Like you download RStudio, you take my script and just run it on your own machine.

Like what hacky ways and not hacking in a good way. Like I think a lot of times we think of like hacky being like, well, this thing works for me right now, it's good enough. But like in ways that could be better. But the real thing to me at least was like, there's something wrong going on here. Like something doesn't feel right. And the problem was like, I considered myself a data person or a data professional, but I'm not an engineer. And it was really hard to tell, well, where can I put this out?

And in 2015, shinyapps.io made this a lot easier, right? So like you don't need to manage any infrastructure whatsoever. We're just going on to a website. We're syncing it with our ID and being able to deploy. A couple of years later, RStudio now Posit, put out Posit Connect, which has sort of like more full-fledged. You can do a bunch of different applications or documents. You can have more control over everything. So these options were super easy and they were super easy because, right? Like we went straight from the IDE empowering individual data scientists. The button is right there. You click the button, you find out one of these destinations, voila, you have something online. You have something that you can share.

And in 2015, shinyapps.io made this a lot easier, right? So like you don't need to manage any infrastructure whatsoever.

So really just to wrap this up before getting into questions and examples, like I don't want to make it seem like, only shinyapps.io or Connect Cloud are the places where you can deploy things. And we hear from a lot of people and I'd love to hear your experience today about going out and spinning up your own infrastructure, whether it's looking at EC2 on Amazon, like essentially giving yourself a server, which you do need to install the things that are needed to support the deployments or DigitalOcean, which makes it a little bit easier. And then the ones that we'll get into when we hopefully do some examples today on Connect Cloud.

But like for each of these, like I went through and just put together some live applications. And why don't we stop here, see if there are any questions coming in right now. And then I can get into like, for those interested in like the other side of the world, looking either into DigitalOcean or to Connect Cloud in terms of like the trade-offs and the expectations for what's happening. Any early questions?

We are good on questions in the Discord and in Slack, not in Slack, in Slido we do have a question from Edward. And I'm wondering if maybe a little bit, let me read it over here. I think this one might be good to save for a little bit later because it's about AI-powered shiny apps. Okay, perfect. Yeah, we can show an example of how you can sort of tangle in LLMs to your applications and have them work in real time.

But because like the most common question we do get is like, where and how can I do this? And what are those trade-offs? Like any hands up or people that have used DigitalOcean before? DigitalOcean is one of those things that I would really love to learn how to use. Everyone sounds so cool talking about droplets, but I've never looked at it before.

DigitalOcean and cloud infrastructure

Yeah, yeah. And years ago, I tried this once. And then last Friday, when I was thinking about our conversation today, like I always wanted to be able to show like what that looks like. So like this is DigitalOcean, right? You can go in and you can create a free account. It's not free to host anything, but it's free to get started. And let me just mention droplets. This is one way that you can do it. So I can come in here, I can pick a droplet.

And you need to know a fair amount though about configurations. Like where do I want to put my data for this? What image do I want to be able to support my deployment? Which these things are a lot of times over the head for a lot of just typical data professionals. And I think one of the constant struggles I had in my career is like pushing up until the edge of like data engineering and really knowing like what can I do and what shouldn't I be up to.

But what DigitalOcean helps here actually is they have this marketplace. If you type in RStudio, you can essentially get an environment where you can kind of do some of your RStudio work including push button and be able to deploy within this instance that you are creating. Now the trick is like there's going to be cost associated with all of this. So like you need a certain size machine. RStudio itself and everything that will be included there kind of needs sort of like support for it. So you can't get away with just like the cheapest thing for each one of these deployments.

Yeah, the money part is a good question. Alyssa had just asked in the chat and like I had the same question. She said, I'm still trying to figure out what the benefit of DigitalOcean is versus going straight to the commercial cloud provider. Yeah, if you're thinking commercial cloud, you're thinking like Amazon, I'm assuming.

Yeah, just AWS, GCP, whatever. Yeah, yeah. So I'm not an expert on this side of things, but my understanding is you get into AWS and like you create like an EC2 instance and it's kind of on you to do the installation of everything you need within that environment to then go ahead and support the deployment where I think what DigitalOcean here and maybe others like Vercel make it a little bit easier is they have some like handholding for you to spin up the right environment in a way that AWS makes it a little bit- you need a little bit more context. I think a little bit more understanding, my guess would be on the AWS side.

So this is the one way to do it through Droplets here. The other is App Platform, which does make it considerably easier, I think. And in DropApplet, like now we're not actually being asked to configure any of these specific things for the environment. I'm going out and we're going to use Docker and containerization here. And I've got like an application, a Shiny application in GitHub. And if I were to go ahead and deploy this, it would kind of give me the environment I need based upon what I need to specify in this Docker file to be able to then create everything with skipping those steps of like specific things that I need to install on that server.

But I feel like for either of these options, either DigitalOcean or AWS or GCP, I'd want to be comfortable enough with the choices I'm making building the environment so that I'm able to both troubleshoot it when things go wrong and also maintain it over time. So like if you upgrade to R 4.5.2, which I think came out recently, like if I created something on DigitalOcean or AWS, they didn't have that from before, all of a sudden it's on me to be able to go in and find the right way to update that so that my application doesn't break.

But I feel like for either of these options, either DigitalOcean or AWS or GCP, I'd want to be comfortable enough with the choices I'm making building the environment so that I'm able to both troubleshoot it when things go wrong and also maintain it over time.

That's a great point. And there's a question in the chat about ease of use as well. This is probably part of it, right? McChoop on the Discord server said, do you think DigitalOcean is easier to use than Azure? My company currently uses Azure and it's too complicated for me. Do you have any opinions on ease of use for one versus the other?

I don't. Aside from the opinion that AWS, which I know better than Azure, is just, again, it requires more understanding for what you're actually setting up. And it feels like there's more handholding involved here when you're setting up these kind of droplets or this specific app in this case. So my guess is this would be easier, but whether that fits where your data is for your organization or like the security requirements you may have, like it really becomes case dependent in terms of where you might end up, I think.

Okay, and maybe something that I always tell people and they're like, why would I use Positron? I really love my VS Code setup. I'm like, then use your VS Code setup, man. Like use what you're comfortable with. Alyssa had a follow-up question. It was like, if you're already pretty comfortable in AWS then, is there still any benefit to DigitalOcean? And I think my feedback would be you're used to the thing that's like really beneficial. Maybe just keep going with it. What do you think?

Yeah, I think that's right. And if you have like, maybe there are cost considerations. So consider like what is being charged on each one for what you need in the first place. But again, that it becomes so dependent on the code you're running and what your goals are and what your audience is to make these decisions. And these are some of the questions. What your limitations are, what you have access to, what your company might let you use versus not.

And then for ease of use, like for click button deployment and for like what I do, which is like, I just update my GitHub repo and it automatically updates my app. Posit Connect Cloud can't be beat for that part because I feel like I am so confused by AWS, DigitalOcean, Azure, and all those options that I don't even go that direction, but I don't need to and there's lots of people who do.

I think the other big consideration is, do you have one or two applications that you're trying to optimize and that they're stable? Like I know I've got these few things, they're limited in number, I just want them to scale as best and as cheaply as possible. And you have the technical skills to be able to set something up in AWS or something like DigitalOcean, then I think those are really good solutions. If you don't have those skills or if you have a bunch of applications that you want to maintain, they're constantly changing, you want to put new ones up there and iterate and share with broader people, I think that's where tools like Connect Cloud and Connect make the lives of both data people and administrators much, much easier.

Excellent. All right, I think we're good on questions. Let's move on. We are at the 21 minute mark for anybody who's paying attention. All right, just closing the loop on DigitalOcean. I think we've shared this. So if you go into GitHub, this is the repo that's powering one of my DigitalOcean deployments. And you can see like the thing that is needed here, like the thing that tells DigitalOcean how this works

is this notion of a Docker file. And I definitely needed LLM support to get this up and running and working because when you're thinking about taking what's working on your local machine and putting it anywhere, that anywhere needs to understand what's working locally to sort of replicate that, right?

So like this Docker file saying like the type of image it's trying to use to get shiny in the first place, the specific packages needed to manage this, like there's a dependency issue as well, and then a bunch of other things in terms of setting up that environment.

So you can, right now, like if you want to do experiment with DigitalOcean, you've never done it before, you can probably come here and borrow this Docker file and have similar success that I have in terms of getting it set up. But it does require, again, like a little bit more technical understanding for what's going on.

And if I go back into, lastly on DigitalOcean here, coming up into the specific thing that I've deployed, you can see that I have a deployment. I click on my app, and then here's the thing that I'm able to share. And any of you could go to this right now because it is publicly available. Like that was the effort to get there.

Nice. And then on the flip side of this, right, like that was like one specific, more technical way to do it. And what we think we've developed on deposit products is making it a lot easier for people who don't want to think about that stuff at all to be able to deploy and to share. And that's what really worked well with shinyapps.io. And there are a lot of different ways we can talk about to end this session about how to get these things, you know, online for all of these.

Shiny Server discussion

All right. I think we're good on questions, except there's one mention of Shiny Server, which I'm not sure if you have mentioned before. Like maybe I wasn't paying attention. Did we talk about Shiny Server or would anybody like to ask any questions about it?

Yeah, so the one way on that DigitalOcean example or AWS is like you would probably install the open source version of Shiny Server to be able to back your deployment in the first place. So that definitely comes into use there. Has anyone had success doing this on their own before? I'm curious where you ended up putting it.

Good question. I don't know if Elliot would like to chime in or maybe it was Nathan who was talking about it. I'm scrolling up right now. I know Elliot was saying that his workplace was just considering Shiny Server and he has never used it. I've never used it either.

I'm wondering sort of like what type of situation would Shiny Server be good for? Like is it a like we have a cloud computing environment? Is it a we have an on-prem server? Is it either or? I think it's whenever you have control of your server and you can install that to do the support that allows you to host that application. So exactly that. Like if I'm on this side of the deployment scheme, I need to find some way to engage with Shiny Server. And that's what DigitalOcean did for me with that Docker file. It essentially installed that for us to be able to use and share.

Okay, that makes sense. I think this is a great place. Yeah, this is a good place to like ask questions in the chat too of everybody. We can have more chats later as well and like we can bug Alex to give him, give us some updates on questions if we don't get them in today.

Yeah, Libby, did you want me to like talk a little bit about what I'm doing, I guess? Sure, you want to pop in for a minute?

Yeah, I mean, so I'm at the University of Illinois and I'm in the Center for Innovation and Teaching and Learning, which is like one of those kind of support departments. And so we have a handful of shiny apps that we've made for like different departments on campus.

And so tech services has made us just a server that has shiny server installed. And so like, it works well, but it is just kind of your basic level, like it's a Linux server. And so we SSH into it and like upload the files as a zip file, unload them there, and then they're live. And so it is locked down. Like, I don't know how tech services did it, but so we can like authenticate users before they see the server, which is one of those things that's really important because it's like, this one is this data for this professor and their students. And it's all sensitive data to one extent or another.

And so like it's working for us, but it doesn't have like any bells and whistles, right? The level of version control that we currently have is, well, save the existing copy as a zip file and redownload that before you upload the new version.

Yeah, that resonates with me from a lot of phone calls that I've had as well. And again, I think like if you only have one or two things and you're savvy enough, like you can make that work. Where people start getting headaches is if I have permissions for many people to be able to see something specific, or if I want to share it with the world for some people, but not for others. Like these are all rules and sort of additional layers of complexity you have to put up on there.

And I think when you go down that route, like you start hearing words like shiny proxy and NGINX to be able to do some, like the load balancing and the authentication layers for this. And that's when it gets kind of above my head. But I think everything that you just mentioned, it goes down to a core set of questions and then we can take this wherever anyone wants to go and we can do some demos.

Key questions for choosing a deployment approach

But like, here's what comes to mind for me. Like, am I optimizing, again, a few stable applications or supporting continued development? Like, do I have the technical support and priority within my organization to be able to maintain something if I can't do it myself?

Are we even okay to operate in a shared cloud environment? For some people, they're not able to, and they have to go down that route of self-managing somewhere. How much compute power does my app need? Like my specific app, not like my entire instance, right? Like, can I spin it up and use it just myself? Once I get past that, do I need to worry about scalability? Like, what if 1,000 people come on this thing? Is it going to hold up? Is that even a realistic thing for me to consider?

Do I need it on all the time? Like, when you use shinyapps.io, like, we put it to sleep after it's not being used for a while to save us and you, you know, cost. Same thing for Connect Cloud. Do I need a dedicated persistent storage? Like, there are all these questions. Like, do I keep my code up to date? I think Nathan was getting at that as well. Like, for them to do code changes, they need to, like, zip up a file, put it in the thing, make sure it overrides the right files and all, like, the wiring got put up there.

And then lastly, like, can I, does it need to be publicly available or not? So, like, I think for really any project you're working on, like, you need some understanding of these that help lead to that decision of, like, well, do I have, like, the skill set or the people to help me put this into kind of, like, a fully-fledged, dedicated environment? Or is something like a Connect Cloud, you know, sufficient for my needs for what I'm trying to achieve?

Definitely. And I had a question that I wanted to pop in for Edward that's a follow-up to this, which was, like, could we just make GitHub Actions SSH into something, like Nathan's server that he has, that would make version control easier? And Edward had shared a repo in the chat if anybody wants to go check it out.

Yeah, I think potentially we have a lot of people that are using GitHub Actions in creative ways. But I think for those of you who are not yet using GitHub for version control, whether you work in teams or by yourself, like, it does open up a lot of flexibility for you to be able to accelerate and do a lot less, like, duct tape work.

Like, I think for two of those projects I mentioned earlier, like, for months I would wake up at 7 a.m. and I'd literally log in and I'd run some scripts and then it would be magically updated until I finally got to the point where it was continuously, you know, being able to be deployed. So Connect Cloud specifically, and as the example you saw with the DigitalOcean, like, if you go out to a GitHub repo, like, there are a lot of things already sort of baked into those environments that allow you just to say, well, if I push my code here and maybe it passed certain tests, it will automatically push to Connect Cloud. And I never even really need to log into Connect Cloud until I have other things that I need to be doing.

Yes, that's what I do. I'm like, I have this app, it's up there, and then I just push the change, or, you know, I'll push to a branch and then I'll do a PR and that PR will have to pass tests or I'll have to review it. And then once that goes to main, my app is just updated immediately. And it happens so fast. Like, I can just sit there and watch it from one second to the next. As soon as I push it, it's updated and it's amazing.

As soon as I push it, it's updated and it's amazing.

There was one other thing I wanted to call out, which is Nick Drew said, another question for this slide that would be good is who is going to support this when I'm out? And if you go through this complicated process in AWS or DigitalOcean, nobody else knows how to do. You are the single point of failure. You stop being able to go on vacation or get sick.

And I, as a contractor, as a freelancer who did Shiny Freelance, I saw this happen a lot where people were looking for a contractor to come pick up the pieces of something that someone had left unexpectedly that no one could run. And it might be running on shinyapps.io, but nobody knew how to update it or they couldn't run it locally and it would break. Yeah, I think that that's a big pain point that people don't think about until they're in the situation.

Connect Cloud demo

All right, I will leave it at that and I will let you move on. We are at the 30-minute mark and I think it's probably time to do a little demoing if everybody's up for it. Sure, yeah, let's do a couple of things here.

First, I'm going to go over to Connect Cloud. And Connect Cloud, it's similar to some of our other publishing services in the sense that it is a freemium model where you can get on and create a free account right now and you can deploy it a bunch of different ways. I skirted over it quickly on that slide, but you can do it through code on GitHub. You can do it through Positron or VS Code with Publisher extension. And you can do it from any IDE, including RStudio now, using the RS Connect library for our deployments specifically. So there are a lot of different ways that you can get content onto Connect Cloud.

If you do create an account, this is an individual one here, you essentially get a little portfolio which showcases everything that you deployed before. So here's one of the examples that we can deploy again, but you can see I've got a bunch of things going over time. And right now, again, on that free account, if you wanted to use this for a place that you're showing off a portfolio, maybe your GitHub account is linking to live applications, it's a great way to be able to say, here's what I've made before, here's a live working example of that code.

Yeah, I love it for student portfolios because, oh, you're going to share exactly what I was about to say. It's not just Shiny. Put anything on there. Quarto, Youbit, Streamlit, Dash, all kinds of stuff. Yes, and for those using Shiny, absolutely. This is one reason why Connect Cloud is our next generation publishing platform. Yes, it does Shiny really, really well, but we know that most people, 80% of the people signing up for Connect Cloud do applications and they do documents. And having to use multiple services for all these is kind of annoying. And even on the free plan on Connect Cloud, you have unlimited documents. So as much Quarto as you want to put up there, you can get onto Connect Cloud.

And then what that deployment flow looks like for those, again, on that GitHub side. So I click the framework that I want. If I'm going in through GitHub, I go out. I can do any of these, but let's keep with this A-B testing example since we shared the repo. It's going to go out and it's going to find that main branch. It's got that app.r that is in. So here's the repo, right? We've got app.r, which is going to be what we're looking for for the deployment.

There's this notion of automatic publish on push. This gets to one of Nathan's workflows. I'm like, I need to keep things up and running. And now if this is turned on, when I do make changes to that repo, it will automatically update on Connect Cloud. And a big update from shinyapps.io is this idea of putting in secret variables at the time of deployment. So for those that have done anything in shinyapps.io with database credentials, username or password, or LLM keys, right, you're putting them probably like in some kind of RN file, like within your project, and just putting it up into the cloud, which is still, you know, it's still there in the bundle, right, which is not a great way to keep a lot of your things, especially when you're going out to other systems. So what you can do here is you could put in your database credentials. Once you store them, we can never see them again. You can never see them again, but they can power your applications in a more secure way.

Yes, this is amazing because I do a lot of publishing on Netlify and you can put secrets on Netlify, but they don't seem to work with Quarto publishing for some reason. And that's on, I think that's on the Netlify side. Like I think it's the plugin that's the problem. But yeah, this solves that problem for me, even though I do love Netlify.

Yeah, yeah. So I'm just going to take all those defaults and just publish this. And like in real time, we're going out to that repo, we're grabbing everything that needs to support this. That is based on a manifest.json file, which you can generate with the RSConnect package. And then bam, like we have that same A-B test calculator here. If I got 500 conversions on the A side of my test, we're going to be able to tell like, did this thing do anything or did it hurt us? And what our level of confidence is for that.

But like now this is a publicly available, let me make sure of that. Because I'm on an enhanced plan, it defaults to private, but I can make it publicly available. And now any people that follow this link can now interact with this application. Oh, and the link names. Like I like being able to have my Shiny apps at nicer link names. They're not like full customizable vanity links at this time, but it's pretty nice to have like share.connectcloud slash like my name and then just the app name, which makes it so much cleaner.

Right, yeah. And I think that's kind of where we're heading. So if I go from this deployment that we just did and I go into URL, we do default to like this fairly ugly UUID, right? So this is what it would be initially. And then everybody has the ability to come in here and change that. So it does have to tie into your account name on Connect Cloud. And then it's going to be dash the name of whatever you put here. And then when I need to republish this for this to take action. But once that does, then I'm able to grab this link and anybody, oops, now it should copy it the right way. Yep. There it is. That's so much nicer than a randomly generated ID.

And this is like a good place to talk about the possibility,

even with a free account of Blue-Green deployment, where like you could just, if you had an extra slot in your free account, right? Like you could just create another app with an update that is a big change for your app and don't tell anybody about it. Just switch your URLs.

I think that that would work. Like just take the ending that you put on that URL, remove it from your old app and put it on your new app. And then you have that same URL pointing to a new app. Does that work? I haven't tried it yet. I didn't know if it was going to be like this ending URL is taken.

I think eventually we're going to build that in as a feature to the tool, but right now you could do it exactly in that way, especially when you're using GitHub, right? So you can have your initial deployment for something you're confident in. That is a single deployment tied to that custom name and then have that point to your main branch. But if you're working like on a development branch, you could do another deployment from that dev branch and then share that out and like, you know, get feedback. Like, is this ready to go? Are we good? You can test it yourself.

And then as soon as that is ready, you can either either change your initial deployment just to use, you would just push that to main and then your old deployment would automatically update. So like that's one way to use it. Or if you really had to, you could delete the old one and then make the new one have the same name as before. And that same URL would point to it for people who have that link already. So there's several ways it could be operated.

I love that. If anyone's interested in what Blue-Green Deployment is, Rishard gave a, Rishard from Appsilon gave a fantastic talk at PositConf. It's on YouTube. Look for Blue-Green Deployment, PositConf 2025. He gave a virtual day talk. He talks about doing it on Connect. That is just like an enterprise version of this really. So like a lot of the same functionality is going to apply and that talk will be really helpful.

I wanted to get to Libby's question. Surreal seeing another Libby. I think this is Libby McKenna. Hey Libby. She says, I don't use Connect Cloud, but I'm interested. Is it easy to set up a developer workflow, i.e., push changes to dev to test them before publishing to the actual link?

I know that we just talked about that a little bit, but like I wanted to ask this because I'm hoping that it is in the roadmap. Like this is one of my personal roadmap questions as well is like when I publish, for example, my Quarto website, I have branch deploys set up with Netlify so that I can publish to a branch and then I get these live views of what my deploy might look like. It builds completely. I have like preview links I can send to people. And then once I'm ready and everyone's reviewed everything, then I push that to main. It passes all my tests in GitHub. And then that updates my live site.

Is that what we just talked about that is on the roadmap for Connect Cloud? Yes, I think we talked about the way that you can make it work for you right now with a few extra steps. But on the roadmap, yeah. Like the idea of having a staging and a production environment for the same deployment is definitely something that we want to look into. My guess is not going to happen for another year or so, but it's on the roadmap for sure.

Blue-Green deployment explained

Okay, great. Noor had asked, what is Blue-Green Deployment? I'm going to go look for that talk, Noor, and I'm going to put it in the Discord chat. Blue-Green Deployment is just having two versions of something that can be accessed at the same link, the same like vanity link, right? So that you can replace one with the other as needed. So maybe you have updated your app and everything works except for one thing and you're like, wait, whoa, I need to roll back to this other app. And you can just give the vanity URL to that app and people can use the last working version of it without you needing to like revert all of your stuff in GitHub. So you just have two versions of your app and you serve people one or the other via the same URL, depending on what you need to do.

Yeah, and Adam's giving us some updates on what Blue-Green Deployment is in the chat, which is thankful, which is useful. Adam.

Libby, I will say my mom's name is also Libby. So we've got the Libby trifecta. Shut up. Amazing. My real name is Elizabeth and I go by Libby. I tried to be Elizabeth in high school one time and it didn't work. Nobody ever called me that. They're like, sorry, you're Libby, you're stuck. All right, I will let you move on. I will go find that chat for newer or that talk for newer. All right.

AI-powered Shiny apps and token usage

Why don't we circle back to the AI question from earlier? Let's do it. Do you see it in Slido? It was from Edward and it was, when creating AI-powered Shiny apps, what guardrails do you put in to stop token overuse and have you experimented with hosting your own small language models for use in apps?

Interesting. Yeah, so guardrails in terms of token usage, which sounds more like cost control, right, for what I'm working on. So a couple of things come to mind. You know, one is depending on your provider, you might be able to have sort of max amount of usage per month. Like that's like the hard way to do it. I believe, you know, if I'm using the API on Claude, I can go and then turn it off at a certain level.

I think the other way that I thought about this in products before for friends of mine who I've been helping out, one of them is, you know, stopping usage at a certain point, which isn't a great user experience, but like you have control through code when someone's interacting with your, you know, AI powered Shiny application to say, okay, you've done enough now for like this period, or now you need to log in and create an account. So that type of gating.

I'm curious if anyone else on the call has other approaches that they've done to sort of manage cost for this. The other one that comes to mind also now is, you know, the model that you're using. Of course, there's a range of different models out there, some of which are more expensive to run, some of which are cheaper, validating that what your application is doing needs to be on a more expensive model, or if what the task it's doing can be accomplished in a good, in the right way by a cheaper model, that's another way to sort of guard you from a cost perspective.

These are great questions. I see the usage question come up a lot with Positron Assistant as well. And there is a little spot in the bottom, right. That will like show you some of your usage information. I'm not sure if anybody's seen it, but that does exist. And I wonder if that, it might be possible to like build that into apps on the backside for yourself. It's like, keep track of my token usage and send me an email with an update on my token usage in an automated way. Sort of like a log, I guess, which I'm sure is possible. And I just don't know how to do it.

Yeah, that's the fun and hard part with, with building these types of applications, right? Like anything is probably possible. The question is like, how hard is it to set up and maintain?

Did anyone else chime in with, with AI recommendations to keep those under control? I don't think so. Although David said you could run another server with another server with Olama and then point your Shiny app at the Olama API. I know Simon had just, Simon Couch had just put out a blog post recently that was like, Hey, small language models are still not where they need to be for them to power things like positron assistant super reliably. Like they can still do smaller stuff. Right. But just like maybe not the super expansive stuff that you might expect a language model to do in something like data bot or positron assistant, which might be a good read. And I can go look for that.

Yeah. I think that's great. Of course, if you do that, you need to then find the server that it's on and pay for that server in some way as well. So like these are all costs kind of trade-offs.

Deploying an AI-powered Shiny app demo

Yep. But thinking through, let's take a look at another example here. So another link I think we shared with you is called side thought AI. And I don't know if you've seen this tool already. Yeah, it's, it's, it's kind of cool. Joe Chang, you know, worked on this earlier this year or maybe last year. And I just, I just did a clone of his demo, but essentially we're going to, we're going to deploy an application that has just a typical analytics view that you'd expect. And then we're going to add to it an AI key, an LLM key that's going to be able to power it and do different things. So you can play around with this. This one is a Shiny for Python application, but in essence, we're just going out, we're building a typical Shiny application and then we're having an LLM provider, be able to go in and manipulate some things.

So I'll go again here from, and just do this, just do this deploy from GitHub directly. Cause it's easier for me right now than to hop over to it, to an IDE. Let's see, we have a side bot demo. I'm going to say app.py. And then what I could do here is set and put in the open AI or the anthropic key directly before I deploy. But first I want to have it to fail. So let me, let me, let me, let me see what happens if I try to deploy right now.

I've been wondering like when I first started using this, I had to create that manifest.json. Do you not have to do that anymore yourself? You don't have to in many situations. If you do the, if you do the route through GitHub, we need a dependency from you. So if you're doing this like Shiny app, you need a requirements.txt file. And if you are doing an R app, you do need that, that manifest file still because we connect cloud needs to know what dependencies are required for your specific thing. Cause it's not tied to your local environment at that stage. It's just code up on, up on GitHub for the other deployment mechanisms, through push button publishing or through the RS connect package. All of those now do not require you to make your own. Those processes will do that for you.

Wonderful. And if you do get to the point where you're like, I'm doing this through the GitHub side and it's asking me for a manifest.json, do not panic. It's going to tell you how to do it. And it's super simple. You're going to run a line of code. It's going to create it. You're going to push it to your repo and you're going to be done. So I promise you'll, you'll be okay. Yeah. It's just RS connect right manifest and it'll, it'll grab everything it needs. So like our goal is, if something's working locally for you, we want it to work here as well. And it should, and if not like that, we need to look into things.

So this is the, this is the app that we deployed and you can see, we've got data on tipping. We've got average bill size, average percentage. So this looks like a fairly normal dashboard that somebody might put together. What was different about this is there's this little sidebar here where we have AI functionality. And because I didn't provide a AI key, I think this would fail. So if I, if I say something like, tell me average tip on Monday or Sunday.

Oh, Sunday's the worst for tipping any other previous servers out there. Sunday is the worst for tips. Let's see if our data agrees. Once we get into it. Oh, I'm curious. Is this real data? I do not know. I think it might be, I don't know. But you can see here, we got this error that we expected. And then what, what you can do at this stage, if you didn't set this beforehand, we can go into our variable tab. And what this is looking for is some kind of AI key. And let me warn me, just like be very careful about sharing sharing API keys on live demos. I'm going to try to be as careful as possible here. I'm not sharing all my screens. Let's let's do this.

Yeah. Feel free to like slide it over a different screen or stop sharing for a second. I think everybody will understand. I think we're good. The first one is not sensitive at all. Right? Like if I need an anthropic, this is like typically how you're going to store this environment variable. And this would be stored like in your dot ENV file. Like if you're on the Python side of things or your dot RN file, right? Like typically you would have this one working locally. That's how you should be doing it anyway. We're just mimicking that now. And then when the connect cloud does your deployment, it knows what to look for and it will inject what we're, what we're adding here. All right. So I did that one. And then I think because of the length of my API key, I'm safe to put this next one into. Just make your screen tiny. Perfect. So that's all I'm going to show you. You can't see the whole first one. You'll have to get the rest.

So I'm going to save this. And now again, it's saved. You're not going to be able to see this again. Connect cloud will not be able to see it. And you won't, if you need to update it, you have to, we do need to republish this because the changes are going to go into effect for the next deployment. So now as we're doing the deployment, it knows to look for this thing that we just saved to power the application. So our, our application loaded as before, but now I hope if I use this chat bot, we can do cool things. So first off show me only weekday tipping.

Actually, it's kind of neat though. See what this did here. Like this is actually a kind of, this is a pretty cool application in the sense that you gave the user the ability to drill down on the data and that all of your tables and charts and call-outs are now reflective of the data they chose, which is kind of, which is kind of interesting.

So there's, that's one of the AI features within this. The other neat one, I think is the ability to read a plot and try to have some idea about what's going on. So if I click on, you know, these little, I don't know, lightning icons, maybe this is going to pull it up and it's going to sort of kick off another exploratory analysis. And you can see that this was, you know, probably that was part of the precursor work for data bot for those who have experimented and experimented with data bot before.

But as you can see, AI, AI LLM key, excuse me. Oh, Alex's phone's ringing. Yeah. My kids are up the street. If I need to get them, I can get them in 10 minutes. So, yeah, but you can see like by us being able to store securely this LLM API key, now we can have applications that are powered by AI on something like Connect Cloud fairly easily.

but you can see like by us being able to store securely this LLM API key, now we can have applications that are powered by AI on something like Connect Cloud fairly easily.

Wonderful. Amazing. And this is also like the like example that you could do. This is on GitHub. So if he changed something in his app in real time, like if he changed a theme or something, which is like an easy thing to show, we could just save that in his application and push that and it would automatically update and we would see those changes happen immediately. Yeah, there we go. Let's see.

Committing to Maine, like it's the Wild West, which is what I do most of the time. So we'll come back over here and then, so that should kick off a refresh.

Where did you stick that? I wasn't even sure in the main title. Yeah, I think so. Oh, where was it? I don't know. Is it in the restaurant tipping part? It would be absolutely like classic. Oh, did I do? I think I did an AB testing. Classic. Oh, you sure did. Yeah. Yeah. Let's go back over to the AB testing one and see if that worked.

There it is. I went to the wrong repo. This is my absolute favorite thing about connect cloud. I'm just feeling like I don't have to worry about anything. I was like, I'm just going to do this and it's just going to go. I don't have to press publish. And like I I've, I've had some things happen in the past where I was working at an actual company that was using connect and I had done something janky that had messed up my deployment process and publishing was not working. And like, I like being hands-off. Hey, the repo runs, the repo gets a new bit of code. The repo just updates the live app and it's such a relief. It takes a lot of the like little steps out of the process where I might be human and mess something up. All right.

This is my absolute favorite thing about connect cloud. I'm just feeling like I don't have to worry about anything. The repo just updates the live app and it's such a relief. It takes a lot of the like little steps out of the process where I might be human and mess something up.

Questions, shinyapps.io legacy, and publishing from RStudio

Let's make sure we don't have any lingering questions in the discord chat. Discord chat. If you have any more questions for Alex about shiny deployments or about their roadmap of connect cloud, please let us know. And there is one more thing, which was, I get a question a lot, which is, okay, how do I publish to shinyapps.io from positron now? Because it's not in a push button deployment anymore. You can still do that from the RS connect package, but I would encourage everybody to migrate over to positron. And if you have any questions about that, please let us know.

Alex, did you want to talk a little bit about, a little bit about the shiny app, shinyapps.io legacy? Yeah. As I mentioned earlier, like at this stage it's a ten year old platform. And to be honest, we haven't done a lot of development work for probably the last five years on it. And all of our engineering efforts at the moment are centered around connecting to cloud, which is really a big part of our complexity, which is a lot of the things we want to do. And we've been doing that for a long time. And making it both be a viable alternative to connect self-managed for those companies who are able to operate in the cloud, but be like the one place where you can share all of your data work in a very simple way.

So, you know, I, we, we haven't set anything in stone yet. I might guess is it's still more than a year away, but I would imagine in the long run that connect cloud and connect are really our only recommended publishing platforms for, for anything that, that you're working on. And if we do some kind of migration, we'll do everything we can to make that as smooth as possible and get plenty of notice for that. Yeah. And we'll be here to help. Everybody can ask questions. I love the idea of not having a million different places for things like our pubs, Quarto pub and shiny apps that I owe having everything in, in one spot with like my same URL, my same email address, Having everything in, in one spot with like my same URL route for everything to get shared makes me happy. So, yeah.

Audience Q&A

And there was one more question from Edward that was in the Slido Edwards. Let me see if I can find you to unmute. So you could ask your question. Cause I think that we had a lot of interest in this app and Hello. Hi there. Hey, yeah. My question was, did you just build a custom agent for that specific dashboard or was that like a, did you build it with like a plugin prototype in mind to interact with just any kind of shiny object and then translate to SQL?

Yeah, you can, you can check out the prompt that was in that repo that we shared, like just prompt MDs essentially setting it up. So that's how, that's all we're doing is moving it around. I think it gave access to just the one data table that was in there. And then they said, don't, you know, don't use anything else. And then, and then manipulating it was pretty much, you're going to generate SQL to change what's in the table. And then duck TV is involved to make everything kind of update on the fly. Gotcha. Yeah. Cool. Thank you.

And we talk a lot about like, right, right. Like Ken can connect cloud support AI deployments. And as you all are well aware, like AI can be used in so many different ways within your applications, either power, automation itself faster or better, or having your users get more out of it. So of course it can. And as long as we're able to make secure handshakes to databases or external data and API providers, we can connect cloud can support a lot of that.

Sweet. Just real quick corollary to that question. I built an app that was similar to this for census data. And I found that using like really small local models was totally like fine for that level of like SQL natural language, like SQL generation. Have you guys experimented at all with just plunking like a, you know, three gigabyte model into your web server? Yeah, I've definitely messed around with local models and like everything else they're getting better each time. And like, I went out and got a 48 gigabyte laptop the other year just to test them. But now I don't think you even need that for some of the stuff that you're working on. So like, I think, I think what everybody is pivoting to now is like evaluation, right? Is what I've deployed working for the intended use and whether that smaller model can help you, it depends on your intended use and how it's performing. So I think like setting that up and validating it, but like, if you have one specific task and it seems to be working well, that could be a great, a great way to, to be either able to scale it or keep your data in a more controlled environment. All right. Thank you. Sure. Absolutely. Thank you for the question, Edward.

Deploying to Connect Cloud from RStudio

All right, Alex, let's wrap up quickly in the three minutes that we have left. Why don't I show you one thing? And this, this maybe it's a little bit boring. Let me switch my. Also, while you were doing that, Alyssa had asked, Hey, wait, is this different than data bot? The sort of sidebar thing that you, is it the precursor to data bot? Yeah. I mean, I think it's all similar work, right? It's like having context from your environment, from your data sets and seeing what can happen like data bot. And its current version is just like in your ID, helping you there with more context. So it's just like a limited version of that type of interaction for what's included in that, that small scale application.

But the last thing that I wanted to show quickly is just last month, we added support for RS connect to go from RStudio ID to connect cloud. So before this, right? So I've got my application file. This is the same, maybe testing one that we had before you would use kind of like the, the publish button here and would take you to shinyapps.io in the next two or three months. I think that in that push button flow, you will also see connect cloud. So like that will get there eventually, but before then you can also go out and use RS connect to do this. So if I use RS connect, and then if you can see down there, add account, where is it? Add server. There we go. Add server. Oops. Let's see. There we go. Connect cloud user. Now I need to stop sharing this screen to show you what it took me to. This takes me to the browser, right? And it's going to say, authorize this. Now I'm going to say, continue. I'm going to say, authorize, and it's going to tell me to go back into the ID. And if I can find my many screens now are here, it's going to ask me, well, what account on connect cloud do I want this associated with? So I'm going to use just the one that I was using. So now that we have this, and now I can just say, RS connect. So now that we've kind of registered it, I can do deploy app. And this is going up. To connect cloud, making sure we're on connect cloud. Perfect. And it's publishing content. And then it's already transferred me back over to, to my screen where I can see that we deployed another version of this AB testing app. So for those of you who are on RStudio and you're not yet, or you don't want to make the switch to, to positron, you can deploy directly to connect cloud now from that RS connect Package. And very soon we'll also be adding it into that push button flow that so many of you have come to know and love.

Closing remarks and next session preview

Sweet. This has been fantastic. Alex, thank you so much for hanging out with us today and giving us all of your wisdom. Thank you everybody in the chat for hanging out. When you leave this call, you're going to have a survey that asks you like how we did, but there's also a place. If I push the buttons, right. That you can put in what you want. In a format like this, where we are like sharing screens and we're being messy and we're learning out loud together because we would love to put more valuable stuff together and have cool people from the community or inside posit share what they know. So Alex, I hope you had fun. Thank you so much for joining us. It was great. Thank you all.

Wonderful. Everybody, this does get recorded and you don't need to save a chat file because it is in the chat. So if you have any questions, please feel free to reach out to us. It is in discord and you can search for anything that you would like in that in that channel, the data science lab channel. We will see you next week. We're going to be joined by Marcos Huerto from the data science community here. Who's going to be walking through digging through APIs that are just in like inspecting websites in your browser so that you can then use those APIs to like put in posts, man and use them or just harvest Jason objects and use those. This is something that I do all the time, as opposed to like using a scraping package, like beautiful super R vast or selenium. It's how I scraped the posit conf conference schedule for two years before I worked here so that I could make it stuff of my own. I hope you'll join us. It's going to be a lot of fun. I will see you next week and on the server, I'll see you on the discord server. Bye everybody. Have a good day. See you on Thursday at the hangout.