<p>Usually you see this error when Craft CMS is not installed yet or the credentials to the database are not correct. You can run the Installer from the command line via <code>./craft install</code> or by going to <code>http://yardstick.dev.com/admin</code>.</p>
<p>On another note, I can highly recommend to run local Craft CMS setups with <a href="https://ddev.readthedocs.io/en/stable/users/quickstart/#craft-cms" rel="nofollow noreferrer">ddev</a>. It will make a lot of things easier for you.</p>

CC BY-SA 4.0
2024-04-17T07:04:56.507Z
2024-04-17T07:04:56.507Z
Max Strebel
<p>I installed craft cms 5 and got ``HTTP 503 – Service Unavailable – craft\web\ServiceUnavailableHttpException```error. This is my .env configuration. How to fix this</p>
<pre><code># Read about configuration, here:
# https://craftcms.com/docs/5.x/configure.html

# The application ID used to to uniquely store session and cache data, mutex locks, and more
CRAFT_APP_ID=CraftCMS--····································

# The environment Craft is currently running in (dev, staging, production, etc.)
CRAFT_ENVIRONMENT=dev

# Database connection settings
CRAFT_DB_DRIVER=mysql
CRAFT_DB_SERVER=127.0.0.1
CRAFT_DB_PORT=3306
CRAFT_DB_DATABASE=yardstick
CRAFT_DB_USER=root
CRAFT_DB_PASSWORD=
CRAFT_DB_SCHEMA=public
CRAFT_DB_TABLE_PREFIX=

# General settings
CRAFT_SECURITY_KEY=································
CRAFT_DEV_MODE=true
CRAFT_ALLOW_ADMIN_CHANGES=true
CRAFT_DISALLOW_ROBOTS=true

PRIMARY_SITE_URL=http://yardstick.dev.com
ASSET_BASE_URL=http://yardstick.dev.com/uploads
ASSET_BASE_PATH=uploads``
</code></pre>

<server><craft5>
HTTP 503 – error found in newly installed craft cms
# HTTP 503 – error found in newly installed craft cms

(Asked by: username_0 on 2024-04-17)

I installed craft cms 5 and got ``HTTP 503 – Service Unavailable – craft\web\ServiceUnavailableHttpException```error. This is my .env configuration. How to fix this
# Read about configuration, here:
# https://craftcms.com/docs/5.x/configure.html

# The application ID used to to uniquely store session and cache data, mutex locks, and more
CRAFT_APP_ID=CraftCMS--····································

# The environment Craft is currently running in (dev, staging, production, etc.)
CRAFT_ENVIRONMENT=dev

# Database connection settings
CRAFT_DB_DRIVER=mysql
CRAFT_DB_SERVER=127.0.0.1
CRAFT_DB_PORT=3306
CRAFT_DB_DATABASE=yardstick
CRAFT_DB_USER=root
CRAFT_DB_PASSWORD=
CRAFT_DB_SCHEMA=public
CRAFT_DB_TABLE_PREFIX=

# General settings
CRAFT_SECURITY_KEY=································
CRAFT_DEV_MODE=true
CRAFT_ALLOW_ADMIN_CHANGES=true
CRAFT_DISALLOW_ROBOTS=true

PRIMARY_SITE_URL=http://yardstick.dev.com
ASSET_BASE_URL=http://yardstick.dev.com/uploads
ASSET_BASE_PATH=uploads``

**Tags:** server, craft5


---

## 1 answers

### Answer by username_1 on 2024-04-17. Score: 2

Usually you see this error when Craft CMS is not installed yet or the credentials to the database are not correct. You can run the Installer from the command line via `./craft install` or by going to `http://yardstick.dev.com/admin`.

On another note, I can highly recommend to run local Craft CMS setups with [ddev](https://ddev.readthedocs.io/en/stable/users/quickstart/#craft-cms). It will make a lot of things easier for you.


---

