Back

[solved] Internal server error when setting custom domain

  • 0
  • General
  • Web
jade
8 Jul, 2023, 17:05

(This was built using the Linode marketplace instance automatically) I'm not going to use my actual domains for this, but I have the Appwrite panel set up at backend.example.xyz, which is the value for both the _APP_ENV and _APP_DOMAIN_TARGET environment variables, but when I try setting a custom domain for a web app to something like api.anotherdomain.me, I get an internal server error popup

TL;DR
The user was experiencing an internal server error when setting a custom domain in their Appwrite panel. They realized that they forgot to apply changes to their .env file by recreating the containers. The error message indicated that the CNAME target was unreachable and advised using a domain with a public suffix. The user asked about the docker logs for the appwrite container. The issue was solved, and the user thanked everyone for their help.
Drake
8 Jul, 2023, 17:10

What do the docker logs for the appwrite container say?

jade
8 Jul, 2023, 17:11
TypeScript
appwrite  | [Error] Timestamp: 2023-07-08T16:53:39+00:00
appwrite  | [Error] Method: POST
appwrite  | [Error] URL: /v1/projects/:projectId/domains
appwrite  | [Error] Type: Appwrite\Extend\Exception
appwrite  | [Error] Message: Unreachable CNAME target (localhost), please use a domain with a public suffix.
appwrite  | [Error] File: /usr/src/code/app/controllers/api/projects.php
appwrite  | [Error] Line: 1344
appwrite  | [Error] Timestamp: 2023-07-08T16:55:44+00:00
appwrite  | [Error] Method: POST
appwrite  | [Error] URL: /v1/projects/:projectId/domains
appwrite  | [Error] Type: Appwrite\Extend\Exception
appwrite  | [Error] Message: Unreachable CNAME target (localhost), please use a domain with a public suffix.
appwrite  | [Error] File: /usr/src/code/app/controllers/api/projects.php
appwrite  | [Error] Line: 1344
jade
8 Jul, 2023, 17:12

oops that was it twice

Drake
8 Jul, 2023, 17:13

Did you apply the changes to your .env file by recreating the containers?

jade
8 Jul, 2023, 17:14

wait does rebooting the linode not do that?

Drake
8 Jul, 2023, 17:14

Not necessarily

jade
8 Jul, 2023, 17:15

ah i see lol

jade
8 Jul, 2023, 17:15

does docker compose up -d recreate the containers? sorry i'm not super familiar with docker

jade
8 Jul, 2023, 17:18

it worked lol thank you!! i should've thought of that before D:

jade
8 Jul, 2023, 17:18

[solved] Internal server error when setting custom domain

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more