# Self-hosting

> Run the same engine yourself, or keep your code anywhere git works.

Applies to: the Sypnia engine (open source, self-hosted).  
Source: https://git.docs.sypnia.com/self-hosting/

For agents: Self-hosting options: (1) keep any git host (GitHub, GitLab, your own) and point git.remote in sypnia.toml at it — Run, Cases and Agent still work; (2) run the engine (Forgejo) yourself with its own docs, plus Sypnia's layer (docker compose: layer + engine + Postgres) for the Sypnia API, use-case links and webhooks; sign-in with any OIDC issuer (e.g. a Sypnia Data project).

## Keep your own git host

Sypnia does not require Sypnia Git. Put your host in the `[git]` table of `sypnia.toml` and Run, Cases and Agent work with it:

`sypnia.toml`

```toml
[git]
remote = "https://gitlab.example.com/laespiga/web.git"
```

## Run the engine and our layer

The engine we build on is open source and runs on its own ([Choosing the engine](https://git.docs.sypnia.com/architecture/engine)). With Sypnia's layer next to it you also get the Sypnia Git API, the use-case links and the same webhooks:

| Setting                          | What it is                                                                    |
| -------------------------------- | ----------------------------------------------------------------------------- |
| `GIT_DATABASE_URL`               | Postgres for the engine and Sypnia's tables                                   |
| `GIT_REPOS_PATH`                 | where repositories live on disk                                               |
| `GIT_AUTH_ISSUER`                | the OpenID Connect issuer of your users (a Sypnia Data project, or any other) |
| `GIT_PUBLIC_URL`, `GIT_SSH_HOST` | your addresses                                                                |
