Skip to content
Back

Appwrite 1.7.4 " Utopia\Domains\Domain::__construct(): Argument #1 ($domain) must be of type string

  • 0
  • 1
  • Self Hosted
Sandipan Singh
19 Jun, 2025, 17:48
TL;DR
Solution: To resolve the error "Utopia\Domains\Domain::__construct(): Argument #1 ($domain) must be of type string" in Appwrite 1.7.4, add the following to the Composer File and .env: ``` _APP_DOMAIN=yourdomain.com _APP_DOMAIN_FUNCTIONS=functions.yourdomain.com _APP_DOMAIN_SITES=sites.yourdomain.com _APP_DOMAIN_TARGET_AAAA=::1 _APP_DOMAIN_TARGET_CNAME=yourdomain.com ``` Another issue that appeared was a routing error. To fix this, downgrade the console to version 6.0.41 and update the composer
Sandipan Singh
19 Jun, 2025, 17:50

docker-compose.yml

Sandipan Singh
19 Jun, 2025, 17:51

/console/onboarding/create-project

Sandipan Singh
19 Jun, 2025, 17:52

This is a fresh installation.

27 Jun, 2025, 07:16

<@1082728319063179364> Have you solved it?

27 Jun, 2025, 07:36

No

27 Jun, 2025, 07:38

here could be https://discord.com/channels/564160730845151244/1384143419357659206 i'll test it.. right now i updated from 1.6.0 to 1.6.2-RC1 and is working.. trying as they said... to update to last version of the main release first BEFORE updating to a new main release ... so .. after this i'll update to 1.7.0... then to 1.7.4 ... and of course, use migrate...

27 Jun, 2025, 09:38

I will try

27 Jun, 2025, 09:49

Bro, regarding this: Appwrite 1.7.4 " Utopia\Domains\Domain::__construct(): Argument #1 ($domain) must be of type string

You need to check their .env and the composer file...

I managed to solve it by adding in my Composer File and Env (using coolify) this:

Main Appwrite API Domain

_APP_DOMAIN=yourdomain.com # Use your main Appwrite API domain (e.g., appwrite.yourdomain.com or api.yourdomain.com)

Functions Domain (must be a unique subdomain)

_APP_DOMAIN_FUNCTIONS=**functions.**yourdomain.com

Appwrite Sites Domain (must be a unique subdomain for hosting web apps)

_APP_DOMAIN_SITES=**sites.**yourdomain.com

Target for AAAA record (IPv6). Use ::1 for localhost if you don't have a public IPv6.

_APP_DOMAIN_TARGET_AAAA=::1

Target for CNAME record. This typically points to your main Appwrite API domain.

_APP_DOMAIN_TARGET_CNAME=yourdomain.com

now i need to solve this other problem appeared, searching πŸ™‚ "Route not found. Please ensure the endpoint is configured correctly and that the API route is valid for this SDK version. Refer to the API docs for more details." so need to check πŸ™‚

2
27 Jun, 2025, 11:05

Can you send me the docker-compose.yml and the .env file (excluding any secret credentials)?

27 Jun, 2025, 17:36

when i"m back home, anyway i need to test it more because i did something and was fked up again.. so even if i will send you the compose (again, i'm using coolify..) we better will wait an official support for it... πŸ™‚

27 Jun, 2025, 17:36

I am using dokploy same as coolify

27 Jun, 2025, 17:40

dockploy is using the docker-compose file that is nearly identical as the original... but coolify is structured something else.. i installed dockploy too to check.. i didn't manage it but!! Be aware... what i'm telling you is that in the github.. you have their .env and their docker-composer... get those too.. open aistudio.google.com... ask the ai to check and complete the old version... simple as that.. or to check the differences.. etc and in the coolify env.. the only thing that was changed was what i gave you up... _APP_DOMAIN_FUNCTIONS=functions.yourdomain.com , _APP_DOMAIN_SITES=sites.yourdomain.com , _APP_DOMAIN_TARGET_AAAA=::1 , _APP_DOMAIN_TARGET_CNAME=yourdomain.com

27 Jun, 2025, 17:41

Ok

27 Jun, 2025, 17:42

and that for a fresh instalation... for a migration.. i'm not sure xD

27 Jun, 2025, 17:43

i know that we need to use migration command if from an old version... but for a fresh 1.7.4 i don't think is neccesary.. anyway.. i was happy that was working .. today :)) made something there.. and fked up again.. so.. i'll do a fresh install when i'm back home

27 Jun, 2025, 18:28

<@1082728319063179364> https://docs.google.com/document/d/1vaUpDpCLf02-PPmInL5dAEmIpglXnOWB9-V6sPw-t8Y/edit?usp=sharing this is all that you need.. i tried with this simple composer and keep in mind to add data for this APP_DOMAIN_FUNCTIONS=**functions.**yourdomain.com , _APP_DOMAIN_SITES=sites.yourdomain.com , _APP_DOMAIN_TARGET_AAAA=::1 , _APP_DOMAIN_TARGET_CNAME=yourdomain.com

27 Jun, 2025, 18:30

Ok

27 Jun, 2025, 18:31

But too bad that they paywalled the database backup... even if we can backup it mannualy.. why to paywall it... they have an amazing product, i will want maybe if i have success with my project to move to the cloud... right.. so.. eh.. anyway.. πŸ™‚ hope you will solve it bro... overall the problem was this: _APP_DOMAIN_FUNCTIONS=functions.yourdomain.com , _APP_DOMAIN_SITES=sites.yourdomain.com , _APP_DOMAIN_TARGET_AAAA=::1 , _APP_DOMAIN_TARGET_CNAME=yourdomain.com

28 Jun, 2025, 09:19

<@1082728319063179364> i updated the composer with a proper working solution where the routing error ""Route not found. Please ensure the endpoint is configured correctly and that the API route is valid for this SDK version. Refer to the API docs for more details." was solved by downgrading the console to 6.0.41 πŸ™‚ and also updated as per original composer from the repo

1
28 Jun, 2025, 09:20

Have fun bro, peace!

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