How to Set Up Nautobot with Docker Compose
Step-by-step guide to deploying Nautobot using Docker Compose
2 min read

How to Set Up Nautobot with Docker Compose
This guide walks you through setting up and running a Nautobot instance using Docker Compose.
Prerequisites
Make sure the following tools are installed on your system:
- Docker: https://docs.docker.com/get-started/get-docker/
- Poetry: https://python-poetry.org/docs/#installation
Setup Steps
1. Clone the Repository
git clone https://github.com/nautobot/nautobot-docker-compose.gitgithub.com
nautobot/nautobot-docker-compose
Nautobot Docker Image to run containers locally.
Python★ 71
2. Navigate to the Project Directory
cd nautobot-docker-compose3. Set Up the Poetry Environment
poetry shell
poetry lock
poetry install4. Prepare Environment Files
cp environments/local.example.env environments/local.env
cp environments/creds.example.env environments/creds.env5. Configure Environment Variables
Edit the environment files according to your setup:
vi environments/local.env
vi environments/creds.envTip
Use strong, unique credentials and never commit sensitive files to version control.
6. Secure Environment Files
Restrict file permissions:
chmod 0600 environments/local.env environments/creds.env7. Build and run the Containers
invoke build
invoke start8. Verify Running Containers
docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
143f10daa229 networktocode/nautobot:latest "nautobot-server rqw…" 2 minutes ago Up 2 minutes (healthy) nautobot-docker-compose_celery_worker_1
bb29124d7acb networktocode/nautobot:latest "/docker-entrypoint.…" 2 minutes ago Up 2 minutes (healthy) 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp, 0.0.0.0:8443->8443/tcp, :::8443->8443/tcp nautobot-docker-compose_nautobot_1
ad57ac1749b3 redis:alpine "docker-entrypoint.s…" 2 minutes ago Up 2 minutes 6379/tcp nautobot-docker-compose_redis_1
5ab83264e6fe postgres:10 "docker-entrypoint.s…" 2 minutes ago Up 2 minutes 5432/tcp nautobot-docker-compose_postgres_19. Create a Superuser
Run the following command and follow the prompts:
invoke createsuperuser
Username: administrator
Email address:
Password:
Password (again):
Superuser created successfully.10. Access the Web Interface
Open your browser and navigate to:
http://localhost:8080/Troubleshooting
- If containers fail to start, check logs:
docker compose logs -f- If you encounter permission issues:
sudo chown -R $USER:$USER .