# Teku merge-devnet-1 Sync
Setup geth as per geth instructions on devnet-1.
Ensure JDK 11 or above is installed.
Clone and build teku:
```
git clone https://github.com/ajsutton/teku.git
cd teku
./gradlew installDist
```
For from-genesis sync, run teku with:
```
./build/install/teku/bin/teku \
--network https://github.com/eth2-clients/merge-testnets/raw/main/merge-devnet-1/config.yaml \
--initial-state https://github.com/eth2-clients/merge-testnets/raw/main/merge-devnet-1/genesis.ssz \
--Xee-endpoint http://localhost:8545 \
--p2p-discovery-bootnodes "enr:-Iq4QKuNB_wHmWon7hv5HntHiSsyE1a6cUTK1aT7xDSU_hNTLW3R4mowUboCsqYoh1kN9v3ZoSu_WuvW9Aw0tQ0Dxv6GAXxQ7Nv5gmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk" \
--log-destination console
```
For optimistic sync, run teku with:
```
./build/install/teku/bin/teku \
--network https://github.com/eth2-clients/merge-testnets/raw/main/merge-devnet-1/config.yaml \
--initial-state https://github.com/ajsutton/merge-scripts/raw/main/merge-devnet-1/devnet1-state.ssz \
--Xee-endpoint http://localhost:8545 \
--p2p-discovery-bootnodes "enr:-Iq4QKuNB_wHmWon7hv5HntHiSsyE1a6cUTK1aT7xDSU_hNTLW3R4mowUboCsqYoh1kN9v3ZoSu_WuvW9Aw0tQ0Dxv6GAXxQ7Nv5gmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk" \
--log-destination console
```
Alternatively you can use the `consensys/teku:develop` docker image with the same command line arguments as above. Just ensure the `--Xee-endpoint` URL is accessible from inside the container.