Set up sopops with Docker
Run sopops and PostgreSQL on your machine. This guide is for self-hosting. It does not configure app.sopops.dev.
Start a local server
Before you begin, install Git and Docker with Docker Compose. Make sure that port 8484 is free.
git clone https://github.com/sopops-dev/sopops
cd sopops
cp .env.example .env
docker compose up --build -dDocker starts sopops and PostgreSQL. Check that the server is ready:
curl -fsS http://127.0.0.1:8484/healthzThe command returns:
{"ok":true}Open http://127.0.0.1:8484. On a fresh server, Get set up asks you for a name, team, and the models to use for checks. Without model settings, sopops stores calls but does not check them.
Keep data when you restart containers
Docker stores PostgreSQL data in the pgdata volume. docker compose down stops the containers and keeps that volume. Do not run docker compose down -v unless you want to delete every workspace, release, and session.
Back up the database before you upgrade or change the host:
docker compose exec -T db pg_dump -U sopops sopops > sopops-backup.sqlTo update a checkout, pull the new source and rebuild the application. sopops runs database migrations when it starts.
git pull
docker compose up --build -dSet secrets before you expose the server
The Compose file binds sopops to 127.0.0.1, so only your machine can reach it. Before you make it reachable from another machine, set a secret key, public URL, and sign-in policy in .env.
Set SOPOPS_SECRET_KEY before you save a platform key, GitHub token, webhook secret, or a team's model key.
Generate the Fernet key after the containers start:
docker compose exec app python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"Copy the result into .env, then set values like these:
SOPOPS_SECRET_KEY=<GENERATED_FERNET_KEY>
SOPOPS_PUBLIC_URL=https://sopops.example.com
SOPOPS_AUTH_REQUIRED=true
SOPOPS_OPEN_SIGNUP=falseUse a TLS proxy in front of the application. Change the app port binding in docker-compose.yml only after you set SOPOPS_PUBLIC_URL, turn on sign-in, and configure that proxy. See configuration and sign-in for every setting and provider.
Check logs when startup fails
Use Compose logs to inspect the application and database:
docker compose logs -f app dbIf the health check does not return {"ok":true}, confirm that port 8484 is free and that the database container is healthy:
docker compose psContinue with the agent workflow
After the server is ready, import your agents, then connect an agent. To see the whole loop before you use your own calls, run the local demo.