Replies: 1 comment 2 replies
-
I'm not sure what the best option is, but I hope to be able to give some insight. Ideally, it would be best to avoid the need to run nginx, since it could (in theory) impact the performance of the server. However, if performance isn't a critical concern, I wouldn't worry about it. There is (I believe) an open issue in Rocket for adding the ability to swap the TLS Cert without restarting Rocket, but I don't think this has been addressed yet. I'm not aware of any ability for Rocket to redirect http requests to https (i.e. 80 -> 443), but I think this might be worthy of a feature request. I assume the server bound to port 80 would just serve back a redirect to the same url, but with https. If the first issue (Rocket swapping TLS certs on the fly) is addressed, it could (in theory) be possible for a certbot type client to be built into the same executable, allowing you to eliminate that dependency as well. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to figure out the easiest way to deploy a Rocket-based app on a Linux server. The app is supposed to be self-hosted, so ease of installation and maintenance is crucial. Having a single self-contained binary is already a huge win, but setting up TLS does require a few extra steps. Here is a few options I thought of:
I like option 4, but option 3 exposes both ports 80 and 443 and takes care of HTTP -> HTTPS redirection. Not having that isn't a big deal for my particular use case but it's a nice feature to have. Is there a way to configure Rocket to do the same or maybe someone can recommend a simpler way of achieving the same goal?
Beta Was this translation helpful? Give feedback.
All reactions