W
Wasp-lang•5mo ago
Unseen

Guidance to hosting and putting a domain on wasp

Hey there, I'm currently using the openSaaS template and was wondering how I can link this to a DNS? I've purchased a domain name but was unsure how to host the wasp SaaS on that domain? I've tried cloudflare hosting, namecheap and vercell but all of them had problems with it. Anyone got any guides/tutorials I could follow, I'd really appreciate it. Thanks!
12 Replies
kapa.ai
kapa.ai•5mo ago
Hi @Unseen. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Sure, I can guide you on how to set up a custom domain for your Wasp app. Here are the steps you need to follow: 1. Add your domain to your Fly client app: You can do this by running the following command. Make sure to replace mycoolapp.com with your domain.
wasp deploy fly cmd --context client certs create mycoolapp.com
wasp deploy fly cmd --context client certs create mycoolapp.com
This command will output the instructions to add the DNS records to your domain. 2. Add the DNS records for your domain: This will depend on your domain provider, but it should be a matter of adding an A record for @ and an AAAA record for @ with the values provided by the previous command. 3. Set your domain as the WASP_WEB_CLIENT_URL environment variable for your server app: You can do this by running the following command. Again, replace mycoolapp.com with your domain.
wasp deploy fly cmd --context server secrets set WASP_WEB_CLIENT_URL=<https://mycoolapp.com>
wasp deploy fly cmd --context server secrets set WASP_WEB_CLIENT_URL=<https://mycoolapp.com>
This is needed to keep the CORS configuration up to date. After following these steps, your app should be available at <https://mycoolapp.com.> For more detailed instructions, you can refer to the Wasp documentation (https://wasp-lang.dev/docs/advanced/deployment/cli#using-a-custom-domain-for-your-app). If you encounter any issues, feel free to ask for help in the Wasp Discord community (https://discord.com/channels/686873244791210014/1223242184711737404). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Unseen, 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?
Unseen
UnseenOP•5mo ago
(for reference I've purchased the domain off namecheap)
miho
miho•5mo ago
Where are you hosting your app? Usually how it goes: 1. Host your app somewhere (Fly, Railway, Heroku etc.) 2. Buy a domain 3. Point the domain to the place your hosted your app at - usually via A records in the DNS We have our instructions here for Fly: 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.
Unseen
UnseenOP•5mo ago
I was hosting them on vercell (attempted to), had done the domain redirection, all as usual as I've done it before with vercell but then got SSL errors with the certs being generated from vercell, and it was quite challenging to debug. I'll follow the tutorial linked and give it a go.
Filip
Filip•5mo ago
Good luck! We're here for more questions!
Unseen
UnseenOP•5mo ago
Much appreciated 🙂 May I just ask what you would recommend to host on? I've seen many people use fly, but then seen a recent post that railway may be better? Any recommendations?
MEE6
MEE6•5mo ago
Wohooo @Unseen, you just became a Waspeteer level 1!
Filip
Filip•5mo ago
Well, Wasp has native support for Fly (single wasp command deployment). So Fly should theoretically be the easiest to set up, but can sometimes be flaky. On the other hand, we don't have native support for Railway, Heroku, and Netlify. But we do have step-by-step guides for all of those. Finally, fly is free (up to a point), while the others are not (Railway has a free trial) So, if you don't have any strong preferences, I suggest you go with fly And then, if it proves too flaky or your app becomes more serious, you can switch
Unseen
UnseenOP•5mo ago
Alright thanks so much I'll give it a go much appreciated
Unseen
UnseenOP•5mo ago
Just a quick one, if you download the flyctl on powershell, how do I run it on the wasp cli? I'm getting an error saying that the command is not found, however it's on the powershell. I haven't seen anything describing it on both fly and wasp documentation?
No description
Unseen
UnseenOP•5mo ago
No description
martinsos
martinsos•5mo ago
@Unseen Wasp doesn't yet have native Win support, instead you should use it via WSL. So if you want to install flyctl, tht hsould also be done in the WSL!
Want results from more Discord servers?
Add your server