title: Setting up TLS for Rust Rocket
date: "2023-03-22"
Setting up TLS for my Blog
Certbot ftw
- The first and most important step is to check out the Certbot page.
- Then under the "My Http website is running" pick "Other" and your the OS you are using Debian or whatever
Getting the files
- Follow the instructions of certbot
- You will see your generated files provided by certbot, which will be put into
- After that I copied the files into my static folder where I also have all my markdown files of the blog. ( I know it is not alot but yeah )
Setting up a Rocket.toml file
-
My toml file is probably not super correct but hey it works.
[default]
address = "81.169.131.112"
port = 443
LogLevel = "debug"
[default.tls]
certs = ".certs/fullchain.pem"
key = ".certs/privkey.pem"
Finalize
- After that I just run
cargo build --release
Additional Info
-
I had to add a additional feature to my rocket dependency in my cargo.toml
-
Check Rocket tls
[dependencies]
rocket = { version = "0.5.0-rc.2", features = ["tls"] }
After That everything should work hopefully.