Using RingLink with Docker
A brief overview of RingLink and instructions for running it with Docker.
Quick Start
To get started, run RingLink using the following command:
docker run -d \
--name ringlink \
--network host \
--cap-add=NET_ADMIN \
-v /dev/net/tun:/dev/net/tun \
-v /var/lib/ring-link:/var/lib/ring-link \
-e CONFIG_KEY=<your-config-key> \
-e USER_ID=<your-user-id> \
-e NETWORK_ID=<network-id> \
ringlink/ringlink:latest
Parameters Explanation
CONFIG_KEY
: Configuration key (optional); can be generated in the RingLink dashboard under Config Keys.USER_ID
: User ID (optional); the ID of a user in your tenant (see Users).NETWORK_ID
: 8-bit hexadecimal ID of a network (see Networks) (optional).
Alternatively, you can log in without specifying the parameters (CONFIG_KEY
, USER_ID
, and NETWORK_ID
) by running:
docker exec -it ringlink /app/ringlink-cli login
For further information, visit the Authenticate with Your RingLink Account.
Userspace Mode
If your environment does not have privileged access, you can still run RingLink in userspace proxy mode.
This mode have some limitations:
- Only TCP protocol is supported now, UDP may be added in the future.
- RingLink only acts as a proxy, so outgoing connections will not available.
To run RingLink in userspace mode, use the following command:
docker run -d \
--name ringlink-proxy \
--network host \
-v data:/var/lib/ringlink-tunnel \
-e TOKEN=<your-config-key> \
-e NETWORK=<network-id> \
ringlink/ringlink-tunnel:latest \
127.0.0.1:80 \
127.0.0.1:443
Replace TOKEN
with your configuration key and NETWORK
with the network ID you want to connect to.
An optional volume data
is used to persist RingLink data, replace it with your desired volume name or path.
The RingLink userspace proxy supports multiple proxy targets, pass your proxy addresses as arguments.
After starting the proxy, the following proxy path will be available, assume your RingLink network IP is 172.29.0.1
:
The RingLink userspace proxy mode is an experimental feature.
Troubleshooting
View logs using: docker logs ringlink
- ❓ Container cannot join the network?
- Ensure the host kernel has TUN support enabled, and verify any relevant network policies.
- ❓ Permission denied on
/dev/net/tun
? - Ensure Docker is run as root or with equivalent privileges.