Setup
Self-Hosting with Docker

Self-Hosting with Docker

Docker is the easiest way to get started with self-hosted Admyral. This guide assumes you are running the command from the machine you intend to host from.

If you need any support with setting up Admyral, please join us on Discord (opens in a new tab).

Prerequisites

You need to have the following installed on the machine you intend to host from:

Running Admyral

Follow these steps to start Admyral:

# Clone the repository
git clone https://github.com/Admyral-Security/admyral.git
 
# Change directory to docker self-hosting
cd admyral/deploy/selfhosting
 
# Copy the env vars
cp .env.example .env
 
# Start the services in detached mode
docker compose up -d

Hint: Supabase sometimes might fail to start. If you see a service failing to start, simply run the following command to resolve the issue:

docker compose restart

After Admyral has started, you can see the containers running in the background:

docker compose ps

Accessing Admyral

Admyral is now running on your machine on port 3000. For example, http://<your-ip>:3000 or http://localhost:3000 if you are running Docker locally.

You will be asked to create an account. After creating an account, you can directly go to the login page and log in because accounts are confirmed automatically by default.

Securing Admyral

Inside the .env file, we provided you with some example secrets for getting easily started. However, you should change these secrets to secure your Admyral instance as soon as possible. You can find the example secrets on top of the .env file inside the deploy/selfhosting directory:

POSTGRES_PASSWORD=...
JWT_SECRET=...
ANON_KEY=...
SERVICE_ROLE_KEY=...
CREDENTIALS_SECRET=...
WEBHOOK_SIGNING_SECRET=...
DASHBOARD_PASSWORD=...

To generate new secrets, you can run the following commands from the project root directory:

# Change directory to scripts
cd scripts
 
# Generate new secrets
./generate_secrets.sh

After generating new secrets, you need to update the top of the .env file inside deploy/selfhosting with the new secrets. Afterwards, you need to restart Admyral.

Restarting all services

To restart all services, run the following command inside the deploy/selfhosting directory:

# Stop and remove the containers
docker compose down
 
# Recreate and start the containers
docker compose up -d

Stopping all services

To stop all services, run the following command inside the deploy/selfhosting directory:

docker compose down

Uninstalling Admyral

To uninstall Admyral, run the following command inside the deploy/selfhosting directory:

# Stop docker and remove volumes:
docker compose down -v
 
# Remove Postgres data:
rm -rf volumes/db/data/

Troubleshooting

dependency failed to start

Run the following command: docker compose restart