Issue with DNS/Wasp app deployment to fly.io

Using a mac on macos. I am using wasp version 0.16.4. I am working to deploy my app to fly.io. I can successfully deploy it and access it on the fly dev url. I follow the iinstructions to setup dns link to my custom domain using wasp deploy fly cmd --context client certs create mycoolapp.com. I see in fly.io dashboard my certificate is verified after adding dns records to cloudlflare. The issue I have is I am still not able to access my app through my custom domain. I do see in the fly-clinet.toml the internal port is getting set as 8043. I thought I read it should be 8080. I tried manually changing that and then redeploying and it deployed but I was unable to access the app at the fly.io dev domain or my custom domain. I feel I am missing a step somewhere but am struggling to figure out where I might be going off. Any help is appreciated!
8 Replies
kapa.ai
kapa.ai3w ago
Hi @oasisenterprise. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- It sounds like you're having issues with setting up a custom domain for your Wasp app deployed on Fly.io. Let me help you troubleshoot this. Custom Domain Setup You've followed the first steps correctly by running:
wasp deploy fly cmd --context client certs create mycoolapp.com
wasp deploy fly cmd --context client certs create mycoolapp.com
And you've added the DNS records to Cloudflare as instructed. The certificate is verified according to your Fly.io dashboard, which is good progress. Missing Step Based on the knowledge sources, you might be missing the third step in the custom domain setup process. After adding the DNS records, you need to update the WASP_WEB_CLIENT_URL environment variable for your server app:
wasp deploy fly cmd --context server secrets set WASP_WEB_CLIENT_URL=<https://yourcustomdomain.com>
wasp deploy fly cmd --context server secrets set WASP_WEB_CLIENT_URL=<https://yourcustomdomain.com>
This is crucial for keeping your CORS configuration up to date, allowing your server to accept requests from your custom domain Using a Custom Domain For Your App. Port Configuration Regarding the port configuration in fly-client.toml, the default port for Wasp apps on Fly.io should be 8080 as mentioned in the documentation when setting up environment variables Set Up a Fly.io App. However, manually changing configuration files after they've been generated by Wasp might cause issues. Redeployment After setting the environment variable, try redeploying your app with:
wasp deploy fly deploy
wasp deploy fly deploy
This will update your deployed app with the latest changes Deploying with the Wasp CLI. Additional Troubleshooting If you're still experiencing issues, you might want to: 1. Check your server logs for any errors:
wasp deploy fly cmd --context server logs

wasp deploy fly cmd --context server logs

2. Verify all your environment variables are set correctly:
wasp deploy fly cmd --context server secrets list

wasp deploy fly cmd --context server secrets list

3. Make sure both your client and server are properly deployed and running. If you continue to face issues, the Wasp community is quite active on Discord where you might get more specific help for your situation. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @oasisenterprise, 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?
oasisenterprise
oasisenterpriseOP2w ago
@kapa.ai I verified the env variables. I find it interesting the deploy command jsut assigns 8043 port to frontend automatically if docs say it should be 8080 @Wasp Expert if anyone has any insight here on what I could be doing wrong it would be much appreciated. thanks in advance for any help.
wardbox
wardbox2w ago
How long ago did you verify it and configure your DNS records?
oasisenterprise
oasisenterpriseOP2w ago
Sorry i thought i had notifications on. I verified it and waited over night thinking that may fix it and still no luck in the morning. am i correct thinking the front end should be on port 8080 not 8043 or is that a mute point in this.
wardbox
wardbox2w ago
I’m not entirely sure, usually for me the port for front end is 3000 and backend is 3001 Do you see any logs on fly.io server side?
oasisenterprise
oasisenterpriseOP2w ago
I got it figured out, was not a port issue like I thought. I am using cloudflare domain dns and I had to disable universal ssl within the cloudflare interface in order for the ssl certificate to get issue from fly.io for my domain. Thanks for jumping in to try and help! @wardbox
MEE6
MEE62w ago
Wohooo @oasisenterprise, you just became a Waspeteer level 1!
Filip
Filip2w ago
Glad you got it working @oasisenterprise, anything we could have done to help you avoid this problem? Thanks a lot for helping out @wardbox!

Did you find this page helpful?