---
title: Orchitect - Set Up a Kingdom
---

[![orchitect logo](https://orchitect.io/hs-fs/hubfs/orchitect_logo_dark-1.png?width=300&height=131&name=orchitect_logo_dark-1.png "orchitect logo")](https://orchitect.io?hsLang=en)

[Login](https://the.orchitect.io/orc/login)

# Setting up a Kingdom

 

 

This is the 'hub' of your deployment. The Kingdom should be publicly available via the internet so clients and agents can connect.

 

When you start your Kingdom, a username and password will be generated randomly and printed in the output log, use this to log into your Kingdom for the first time and create a new account. 

 

 

> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
>         Running Migrations  
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
> Database is available.  
> Creating default account.  
> \===========================  
> Default account details  
> Username: xXxXXxXxxX  
> Password: XXxXxXXxxXXXxxXxxX  
> \===========================

 

> docker-compose.yaml
> 
>  services:
> 
>   kingdom:
> 
>         container\_name: kingdom
> 
>         image: orchitect/kingdom-agent:latest  
>         environment:
> 
>             SERVICE\_TOKEN: 'token'
> 
>            TOKEN\_SECRET: 'token\_secret'
> 
>             DB\_ENCRYPTION\_KEY: 'db\_encryption\_key'
> 
>         volumes:
> 
>             - kingdom\_data:/var/lib/postgresql/data
> 
>         expose:
> 
>             - 9876
> 
>     caddy:
> 
>         container\_name: caddy
> 
>         image: caddy:latest
> 
>         restart: unless-stopped
> 
>         depends\_on:
> 
>             - kingdom
> 
>         ports:
> 
>             - "9876:9876"
> 
>         volumes:
> 
>             - ./Caddyfile:/etc/caddy/Caddyfile
> 
>             - caddy\_data:/data
> 
>             - caddy\_config:/config
> 
>         networks:
> 
>             - app\_network
> 
>     networks:
> 
>         app\_network:
> 
>             driver: bridge
> 
>     volumes:
> 
>         caddy\_data:
> 
>         caddy\_config:
> 
>         kingdom\_data:

 

 

 

 

> Caddyfile
> 
> ```
> https://example.com:9876 {    reverse_proxy kingdom:9876}
> ```

 

[![Orc Logo](https://orchitect.io/hs-fs/hubfs/orc-2.png?width=150&height=150&name=orc-2.png "Orc Logo")](https://orchitect.io/?hsLang=en)

© 2026. All rights reserved.