Files
clipboard-on-the-go/Readme.md
2026-01-17 15:48:05 +01:00

2.7 KiB

Clipboard on the GO 😉

A simple clipboard synchronization tool built with Go. It consists of a server and a client application that work together to keep your clipboard data in sync across multiple devices.

Features

  • Real-time clipboard synchronization
  • Cross-platform support (Windows, macOS, Linux)
  • Easy to set up and use
  • Lightweight and efficient
  • Optional statistics dashboard for monitoring connected clients and message relay counts

Prerequisites

  • Go programming language installed (version 1.16 or higher)
  • Git installed

Installation

  1. Clone the repository:
    git clone https://gitea.reversed.dev/space/clipboard-on-the-go.git
     cd clipboard-on-the-go
    
  2. Modify the configuration. 2.1 Server Configuration:
    • Navigate to the server directory.
    • Make a new file called config.go and paste/modify the following code:
package main

const (
	// Update these values before building
	EmbeddedServerIP   = "0.0.0.0"
	EmbeddedServerPort = "8080"
   EmbeddedServerStats = true
)

2.2 Client Configuration:

  • Navigate to the client directory. - Make a new file called config.go and paste/modify the following code:
package main

const (
	// Update these values before building
	EmbeddedIdentification = "my-unique-id"
	EmbeddedServerIP       = "100.107.73.38"
	EmbeddedServerPort     = "8080"
)
  1. Build the programs.
  • Run the build.bat script in the root directory to build both the server and client applications.
  1. Run the server.
  • Navigate to the server directory and execute the clipboard-sync-server.exe file.
  1. Run the client.
  • Navigate to the client directory and execute the clipboard-sync.exe file.

Usage

This is intended to be hosted on a public ish server, preferably in a tailnet or via a VPN, as you never should expose anything to the internet.

I use this on my home server, which i can connect to with tailscale, so i don't have to worry about exposing it to the internet.

Clients are identified by the EmbeddedIdentification value in the client config file. Make sure to set this to a unique value for each USER you want to sync. If you want to sync multiple devices for the same user, just run multiple instances of the client with the same EmbeddedIdentification.

Statistics Dashboard

If EmbeddedServerStats is set, the server will serve a live statistics dashboard at http://localhost:8080/stats showing:

  • Number of connected clients
  • Number of messages relayed

The dashboard uses Tailwind CSS CDN for styling and updates live every second.

License

This project is licensed under the MIT License.

Disclaimer

This software is provided "as is", without warranty of any kind. Use at your own risk.