Repository navigation
Linux and Docker Server
Run a Cross-Com server on Linux: in Docker with one command, or as a single program. Good for a VPS, a home server, or a community open to the public.
This page is the short version. docs/hosting.md in the repository has every detail: the API, players' logs, connection records, sharing a machine with another game's server.
- A Linux machine players can reach: a VPS (1 CPU and 512 MB of memory are plenty), or a PC at home with its ports forwarded.
- TCP 80 (and 443 for HTTPS with a domain) and UDP 21030 and 21031 open to players.
- Docker with the compose plugin (for the Docker way), or the release's
crosscom-server-linux-x86_64.
Note
Players must reach the server at its own address. Docker Desktop on macOS or Windows changes the addresses players' packets seem to come from, which breaks players connecting to each other: host on Linux, on a VM with a bridged network, or with the Windows server program.
The launcher and the client talk to a server on the internet over HTTPS only. Pick one:
| How | Players set up with | |
|---|---|---|
| A domain, with Caddy (best for a public server) |
docker/compose.https.yaml: Caddy gets a free Let's Encrypt certificate |
play.example.org |
| Its own certificate (no domain needed) |
https_port = http_port in the settings |
A join code: 203.0.113.10#<fingerprint>
|
| None (only for your network or VPN) | Nothing | Its address: 192.168.1.20
|
In a copy of the repository:
git clone https://github.com/JDevWebb/cross-com-enhanced
cd cross-com-enhanced
cat > docker/.env <<END
CROSSCOM_PUBLIC_ADDRESS=203.0.113.10
CROSSCOM_SIGNUP=true
CROSSCOM_SIGNUP_CODE=$(openssl rand -base64 12)
END
docker compose -f docker/compose.yaml up -dCROSSCOM_PUBLIC_ADDRESS is the address players connect to (the machine's public address, or a name). docker/.env is read by every compose command, and isn't committed.
Then one of:
-
HTTPS with a domain: point a domain's
Arecord at the machine, open TCP 80 and 443, and:Use bothecho CROSSCOM_DOMAIN=play.example.org >> docker/.env docker compose -f docker/compose.yaml -f docker/compose.https.yaml up -d
-ffiles for every later compose command (logs,exec,down). -
Its own certificate (a join code): add
CROSSCOM_HTTPS_PORT=80to the server's environment indocker/compose.yaml(orhttps_port = 80incrosscom-server.tomlin thedatavolume), and start it again. The fingerprint is in its log:docker compose -f docker/compose.yaml logs | grep certificate.
Logs: docker compose -f docker/compose.yaml logs -f. Upgrading: git pull, then docker compose -f docker/compose.yaml up -d --build; accounts and stats stay in the volume.
Download crosscom-server-linux-x86_64 from the latest release (or build it: cargo build --release -p crosscom-server), and write crosscom-server.toml beside it:
public_address = "203.0.113.10"
signup = true
signup_code = "at least 12 random characters"
https_port = 80 # its own certificate: players join with a join codechmod +x crosscom-server-linux-x86_64
sudo setcap cap_net_bind_service=+ep ./crosscom-server-linux-x86_64 # port 80 without root
./crosscom-server-linux-x86_64 --config crosscom-server.tomlTo keep it running, a systemd unit:
# /etc/systemd/system/cross-com.service
[Unit]
Description=Cross-Com server
After=network-online.target
Wants=network-online.target
[Service]
User=crosscom
WorkingDirectory=/var/lib/cross-com
ExecStart=/opt/cross-com/crosscom-server --config /etc/cross-com.toml
AmbientCapabilities=CAP_NET_BIND_SERVICE
Restart=on-failure
[Install]
WantedBy=multi-user.targetsudo useradd --system --home /var/lib/cross-com --create-home crosscom
sudo systemctl enable --now cross-com
journalctl -u cross-com -fOn the machine (with ufw, for example):
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp # with Caddy
sudo ufw allow 21030:21031/udpOn a VPS, also check the provider's own firewall (security groups) allows the same.
| Docker | Without Docker | |
|---|---|---|
| Make an account with a password | docker compose -f docker/compose.yaml exec server /app/crosscom-server --config /srv/crosscom/crosscom-server.toml add-account NAME |
crosscom-server --config crosscom-server.toml add-account NAME |
| Players' logs |
… logs list, … logs show REPORT
|
the same |
| How joins went | … connections 30 |
the same |
| News |
news.toml in the data volume |
news.toml beside the database |
See Server Settings for the settings, and Server Troubleshooting when something's wrong.
Cross-Com Enhanced · a fan project, not affiliated with or endorsed by Ubisoft · Releases · Issues · Something wrong on this page? Open an issue.
Playing
- Getting Started
- The Launcher
- Launcher Settings
- Your Account and Identity
- Your Connection
- The In-Game Overlay
- DLC Packs
Hosting a server
- Hosting a Server
- Hosting from the Launcher
- Join Codes
- Port Forwarding and Routers
- Windows Dedicated Server
- Linux and Docker Server
- Server Settings
- Server Troubleshooting
Help
Links