Give certificate to server or client (using fly.io)

I am using fly.io. I deployed my code to a URL. However I would like to map my domain to that URL. So, I would like to know several stuff, What does this command do? It should be server or client? fly certs add requestphotoedit.com --app mycoolapp-server Is it required? Or only putting A entry as below is enough? @ 10800 IN ALIAS mycoolapp-client.fly.dev.
17 Replies
MEE6
MEE6β€’4mo ago
Wohooo @skyblade2954, you just became a Waspeteer level 6!
kapa.ai
kapa.aiβ€’4mo ago
Hi @skyblade2954. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- The command fly certs add requestphotoedit.com --app mycoolapp-server is used to add a custom domain to your Fly.io application. This command is part of the process of setting up a custom domain for your Wasp app deployed on Fly.io. Here's what the command does: - fly certs add requestphotoedit.com tells Fly.io to create a new SSL certificate for the domain requestphotoedit.com. - --app mycoolapp-server specifies the Fly.io app to which the certificate should be added. This command is necessary if you want to use a custom domain with your Wasp app, instead of the default domain provided by Fly.io. After running this command, Fly.io will provide you with the necessary DNS records (A and AAAA records) that you need to add to your domain's DNS settings. The A record you mentioned (@ 10800 IN ALIAS mycoolapp-client.fly.dev.) is a DNS record that points your custom domain to the Fly.io app. This is also a necessary step in setting up a custom domain, but it is not a replacement for the fly certs add command. Both steps are required. Here's the process of setting up a custom domain, as described in the Wasp documentation (https://wasp-lang.dev/docs/advanced/deployment/cli#using-a-custom-domain-for-your-app): 1. Add your domain to your Fly client app by running the fly certs add command. 2. Add the DNS records provided by Fly.io to your domain's DNS settings. 3. Set your domain as the WASP_WEB_CLIENT_URL environment variable for your server app. So, to answer your question, both the fly certs add command and the addition of the A record are required when setting up a custom domain for your Wasp app on Fly.io. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @skyblade2954, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
skyblade2954
skyblade2954β€’4mo ago
@kapa.ai It should be server or client?
kapa.ai
kapa.aiβ€’4mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- The command fly certs add requestphotoedit.com --app mycoolapp-server is used to add a custom domain to your server application on Fly.io. However, if you're setting up a custom domain for your client-side application, you should replace mycoolapp-server with the name of your client-side application. For example:
fly certs add requestphotoedit.com --app mycoolapp-client
fly certs add requestphotoedit.com --app mycoolapp-client
In the context of Wasp, the client-side application is the one that serves your frontend (React) code, while the server-side application handles your backend (Node.js) code. So, whether you should use server or client in the command depends on which part of your Wasp application (client or server) you want to associate with the custom domain. Please note that the information provided is based on the Wasp documentation (https://wasp-lang.dev/docs/advanced/deployment/cli#using-a-custom-domain-for-your-app) and the knowledge sources (https://github.com/wasp-lang/wasp/issues/1741) provided. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @skyblade2954, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
skyblade2954
skyblade2954β€’4mo ago
Here is my apps:
No description
Filip
Filipβ€’4mo ago
Hey @skyblade2954, if I got this right, you have your client and your server running on fly and would like your users to access requestphotoedit.com to use your site. Did you try following this guide: https://wasp-lang.dev/docs/advanced/deployment/cli#using-a-custom-domain-for-your-app The certificate should be added for the client app (if that's the one you want people to access using requestphotoedit.com)
Deploying with the Wasp CLI | Wasp
Wasp CLI can deploy your full-stack application with only a single command.
skyblade2954
skyblade2954β€’4mo ago
Yes, you understood me correctly, I saw this tutorial but not that one: https://wasp-lang.dev/docs/advanced/deployment/cli
Deploying with the Wasp CLI | Wasp
Wasp CLI can deploy your full-stack application with only a single command.
skyblade2954
skyblade2954β€’4mo ago
Sometimes it is too complex to find each tutorial. Is this command: wasp deploy fly cmd --context client certs create mycoolapp.com Different than these commands? When should I ran that command, because default configuration creates 1GB of memory, which cost more than 5 dollars in fly.io. wasp deploy fly setup my-wasp-app mia wasp deploy fly create-db mia wasp deploy fly deploy It is hard to follow the tutorial really πŸ˜„ Sodic, I followed the tutorial you sent me I made a typo yesterday evening, I will try again this time
Filip
Filipβ€’4mo ago
Hey @skyblade2954, was just about to respond to you πŸ˜„ Ok, let me know how it goes
skyblade2954
skyblade2954β€’4mo ago
I ran your command after the 3 command I show I know That's why I wrote Yesterday I made a typo on my domain name.
Filip
Filipβ€’4mo ago
btw, you and I linked the same page (only difference is I linked a later chapter). So, yes, you got it right. Follow it from top to bottom. First the three commands, and then the one with the domain No problem
skyblade2954
skyblade2954β€’4mo ago
Yes.. Sometimes it is hard to follow.
Filip
Filipβ€’4mo ago
Btw, you mentioned the tutorial was hard to find and follow. Can you elaborate why it was hard to follow? We'd like to improve it. What would you change? Also, for finding the documentation, have you tried using the search bar on the page? (top right corner) Typing in "domain" takes you right to that section I think
skyblade2954
skyblade2954β€’4mo ago
I am sure many people using cutom domain. And using it together with fly.io or someother hosting service. One of the top pick is fly.io I faced memory problem with fly.io. It should be written in this site. I had to resize my memory usage. Also finding the later chapter was not easy for a beginner like me Basicly we need to run several commands as follows: COMMANDS: wasp deploy fly setup mycoolapp1 mad --> I had to change the memory for the client and host to exploit fly.io free version. I set the memory to 256 wasp deploy fly create-db mad wasp deploy fly deploy wasp deploy fly cmd --context client certs create requestphotoedit.com And some other commands written in the tutorial. @sodic I wish that the tutorial was much easy to follow. Like every single step written step by step, under each other. Because my case is a common one. Custom domain with top pick hosting service. Default memory setting is 1GB, which doesn't exploit free version in fly.io. Had to change country etc.. all those small configurations I am not even mentioning them in here. Like I wish there was just one "simple" tutorial for adding custom domain for fly.io. Like I am not even sure if there is other commands that I forgot to run.. Or commands that I don't know.
Filip
Filipβ€’4mo ago
Sorry to hear you had such a tough experience with this. We'd be happy to improve the docs. Can you please type out everything you had to do that's not listed, and I'll make sure to add it in the tutorial? Write it in a way that you'd like to read it on the docs page. @miho @Vinny (@Wasp), did you guys run into these problems when deploying your apps with custom domains?
skyblade2954
skyblade2954β€’4mo ago
Yes. If I can successfully deploy with custom domain, I will write down everything I did. Step by step
Filip
Filipβ€’4mo ago
Excellent, thanks for the help @skyblade2954!
Want results from more Discord servers?
Add your server