Start here for a first-time setup. The project supports two installation methods:
- Docker Compose on your own Linux host or VM
- the Home Assistant add-on from this repository
After the stack is running, continue with Onboarding to pair a vacuum.
- A domain name that you own
- A place to run the stack on your LAN
- A second machine for onboarding later
- A network that can host the stack's HTTPS and MQTT TLS ports internally. The defaults are
555and8881. - A Cloudflare API token with DNS edit access for the zone if you want Cloudflare DNS-01 auto-renew. See Cloudflare setup.
-
Pick a hostname for this application. It must be a subdomain of a domain you own, and it must start with
api-.For example, if you own
example.com, useapi-roborock.example.com. Throughout the docs this is the stack FQDN. -
Your network must handle its own DNS for the network the vacuum connects to. If it uses an external DNS server like
8.8.8.8, this will not work. -
Create a DNS record pointing your stack FQDN to the local IP of the machine running the stack.
With the current server behavior, the same hostname is advertised for both HTTPS and MQTT/TLS, so you do not need a separate
mqtt-...hostname unless you have built your own custom client routing around one.
- Docker with
docker compose - Python
- uv
-
Clone this repository:
git clone https://github.com/Python-roborock/local_roborock_server cd local_roborock_server -
Install the project dependencies:
uv sync
-
Run the setup wizard:
uv run roborock-local-server configure
The wizard asks for:
stack_fqdn(must start withapi-)- HTTPS and MQTT TLS ports if you do not want the defaults
555and8881 - embedded MQTT or your own broker
- whether to use Cloudflare DNS-01 auto-renew
- your admin password
- your Home Assistant/app login email and 6-digit PIN
It then writes
config.toml, generatesadmin.password_hashandadmin.session_secret, and if you chose Cloudflare it also writessecrets/cloudflare_token. -
If you chose external MQTT, fill in
broker.hostinconfig.tomlbefore starting the stack. See Custom MQTT. -
If you skipped Cloudflare, put your certificate files in
data/certs/fullchain.pemanddata/certs/privkey.pem. See Custom certificate management. -
Start the container:
docker compose up -d --build
If you changed
network.https_portornetwork.mqtt_tls_portinconfig.toml, set matching Docker Compose variables before you start the stack so the published ports stay aligned. For example:ROBOROCK_SERVER_HTTPS_PORT=8443 ROBOROCK_SERVER_MQTT_TLS_PORT=9443 docker compose up -d --build
Use Home Assistant as the installation guide if you want to run the stack as a Home Assistant add-on instead of Docker Compose.
-
Open the admin dashboard at
https://api-roborock.example.com:555/adminby default, orhttps://api-roborock.example.com:YOUR_HTTPS_PORT/adminif you chose a custom HTTPS port. -
Import your data from the cloud so things like routines and rooms will work. Enter your email under cloud import, select Send code, then enter the returned code and select Fetch data.
-
For any routines that use zones, re-save them so the server stores the zone data correctly. In the Roborock app, open each routine that has zones, open the zone, tap Edit, open any Zone Cleaning entry, then tap Save. Repeat for each zone in the routine.
- Onboarding for pairing a new vacuum
- Home Assistant if you want to repoint Home Assistant's Roborock integration to your local stack
- Using the Roborock App if you want to point the official app at your local stack
- Docs index for the rest of the guides