Skip to content

Commit

Permalink
migrate instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
sinamics committed Aug 29, 2023
1 parent dbf8132 commit fed7ff3
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/ztnet/docs/_usage/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"label": "Usage",
"position": 2,
"link": {
"type": "generated-index"
}
}
44 changes: 44 additions & 0 deletions docs/ztnet/docs/_usage/import_controller.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Migrate Controller
## How to Migrate an Established ZeroTier Controller into ZTNET

To move an already established ZeroTier controller into a Docker container, you can follow these steps. This guide assumes you have Docker set up on the machine where the new controller will reside.

### Prerequisites
- Ensure Docker is installed and running.
- Stop the ZeroTier service on the source controller to prevent data inconsistencies.

### Steps

1. **Stop the ZeroTier Service on the Source Machine**
Depending on your OS, use the relevant command to stop the ZeroTier service.
```bash
sudo systemctl stop zerotier-one # For systemd-based Linux distributions
```
Or for other systems:
```bash
sudo service zerotier-one stop # For SysVinit or Upstart
```

2. **Locate the ZeroTier Configuration Folder**
The configuration folder is typically `/var/lib/zerotier-one` on Linux systems.

3. **Backup Configuration**
Create a backup just to be safe.
```bash
sudo cp -r /var/lib/zerotier-one /path/to/backup/folder
```

4. **Copy Configuration to Docker Volume**
Copy the configuration files to the Docker volume specified in your Docker Compose file. Replace `zerotier:/var/lib/zerotier-one` with the actual volume name and path.
```bash
sudo cp -r /var/lib/zerotier-one /path/to/docker/volume
```

5. **Start the Docker Container**
Use Docker Compose to start your new ZeroTier controller. Navigate to the directory where your `docker-compose.yml` file is located.
```bash
docker-compose up -d
```

6. **Verify the Controller**
Verify that the new Dockerized ZeroTier controller has all the networks and members from the source controller.

0 comments on commit fed7ff3

Please sign in to comment.