Step-by-step guide to hosting a RuneScape private server
Servidores de jogos · By Kevin Marcondes · Published on · Updated on · 9 min read
This guide explains how to host a RuneScape private server with a technical, security-focused approach. You’ll learn how to prepare the environment, configure the database, open ports, and automate the service. Use only emulators and assets that are properly licensed. Check game terms of use and local laws before making the server publicly accessible.
Prerequisites and legal notes
Hosting a server carries technical and legal responsibilities. Use only open-source emulators and assets with compatible licenses. Do not distribute or use proprietary code, clients, or data without permission. Verify the game’s terms and your local legislation.
Suggested requirements: Linux (VPS or local machine), 2+ GB RAM, multi-core CPU, port 43594 open, stable bandwidth, and basic Linux and SQL knowledge. A domain and HTTPS are helpful but optional.
Decide where to host: dedicated VM or container. To understand pros and cons between Docker and VMs for high availability, see the comparison Docker vs virtual machines.
For production, record structured, traceable logs. A guide on JSON logs and correlation helps diagnose issues in real time.
- Operating system: Ubuntu/Debian or similar
- sudo/SSH access
- Java (OpenJDK), Git and MariaDB/MySQL
- Port 43594 available (TCP)
- Basic networking and firewall knowledge
1) Prepare the environment and get the server base
Install Java, Git, and a database server. Create a system user to run the service. Download a server base that is legally licensed. Prefer repositories with a clear license and no dependency on proprietary files.
Also create separate directories for data and logs. This simplifies backups and updates without losing configuration.
# Atualize pacotes e instale dependências
sudo apt update && sudo apt -y install default-jdk git mariadb-server ufw
# (Opcional) Criar usuário dedicado
sudo useradd -r -m -d /opt/rsps -s /usr/sbin/nologin rsps
sudo mkdir -p /opt/rsps/{app,data,logs}
sudo chown -R rsps:rsps /opt/rsps
# Obter um servidor com licença adequada (exemplo genérico)
cd /opt/rsps/app
sudo -u rsps git clone https://example.com/your-rsps.git .
# Se o projeto usar Gradle/Maven, garanta permissões
sudo -u rsps chmod +x ./gradlew || true
2) Database and initial setup
Create a dedicated database with a strong user and password. Avoid using root credentials in the application. Record host, port, database name, user, and password — you’ll use these in the server configuration file.
Some emulators support SQLite. For multiple players, MariaDB/MySQL usually scales better and is easier to manage.
-- Acesse o MySQL/MariaDB como root
-- sudo mysql -u root
CREATE DATABASE rsps CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'rsps'@'localhost' IDENTIFIED BY 'senha-muito-forte-aqui';
GRANT ALL PRIVILEGES ON rsps.* TO 'rsps'@'localhost';
FLUSH PRIVILEGES;
-- (Opcional) Tabela de contas mínima de exemplo
-- Ajuste ao seu esquema real do emulador
CREATE TABLE IF NOT EXISTS rsps.accounts (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(32) UNIQUE NOT NULL,
password_hash VARCHAR(255) NOT NULL,
rights INT DEFAULT 0,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Crie uma conta de teste (substitua por hash seguro)
INSERT INTO rsps.accounts (username, password_hash, rights)
VALUES ('admin', '{hash-bcrypt-ou-similar}', 2);
3) Configure the server (port, database and variables)
Adjust the server configuration file. Set host to 0.0.0.0 to accept external connections, game port to 43594, and database credentials. Use environment variables to avoid storing passwords in the repository.
Save the file in the project configuration folder. Check your emulator’s documentation for additional keys (world, XP rates, drop rates, etc.).
# config.properties (exemplo genérico)
# Rede
server.host=0.0.0.0
server.port=${RSPS_PORT:43594}
# Banco de dados
db.driver=mysql
db.host=${DB_HOST:127.0.0.1}
db.port=${DB_PORT:3306}
db.name=${DB_NAME:rsps}
db.user=${DB_USER:rsps}
db.pass=${DB_PASS:troque-esta-senha}
# Logs
log.level=INFO
log.dir=/opt/rsps/logs
# Jogo (valores ilustrativos; ajuste ao seu emulador)
game.world.id=1
game.world.name=Community-World
game.player.save.interval=60
4) Build, run locally and environment variables
Build and run locally first. Export environment variables to keep secrets out of files. If the project uses Gradle, use the wrapper. If it uses Maven, use the alternative commands below.
Monitor the console for startup messages and errors related to the database or occupied ports.
# Variáveis de ambiente (substitua os valores)
export DB_HOST=127.0.0.1
export DB_PORT=3306
export DB_NAME=rsps
export DB_USER=rsps
export DB_PASS='senha-muito-forte-aqui'
export RSPS_PORT=43594
# Build e execução (Gradle)
cd /opt/rsps/app
sudo -u rsps ./gradlew clean build
sudo -u rsps java -Xms512m -Xmx1024m -jar build/libs/rsps-server.jar
# (Alternativa Maven)
# sudo -u rsps mvn -q -DskipTests package
# sudo -u rsps java -Xms512m -Xmx1024m -jar target/rsps-server.jar
5) Firewall, NAT and external access testing
Open the game port in the firewall. On home networks, configure port forwarding on your router for TCP 43594. Test access from outside your network or using a different connection. If you’re in the cloud, check the provider’s security rules.
Avoid exposing admin services to the internet. Restrict IPs whenever possible.
# Habilitar UFW e liberar a porta do jogo
sudo ufw allow 43594/tcp
sudo ufw enable
sudo ufw status
# Teste a porta externamente (de outra máquina)
nc -vz SEU_IP_PUBLICO 43594 || telnet SEU_IP_PUBLICO 43594
# Verifique localmente se está escutando
ss -lntp | grep 43594 || netstat -lntp | grep 43594
6) Logs, rotation and running as a systemd service
Running the server in the foreground is not practical. Create a systemd service to start at boot and capture logs. Rotate logs by size or date. Use journalctl to follow events.
To increase deployment robustness and reduce outages, see deploy process auditing for corrective plans.
# /etc/systemd/system/rsps.service
[Unit]
Description=RSPS Server
After=network.target mariadb.service
[Service]
User=rsps
WorkingDirectory=/opt/rsps/app
Environment=DB_HOST=127.0.0.1
Environment=DB_PORT=3306
Environment=DB_NAME=rsps
Environment=DB_USER=rsps
Environment=DB_PASS=senha-muito-forte-aqui
Environment=RSPS_PORT=43594
ExecStart=/usr/bin/java -Xms512m -Xmx1024m -jar /opt/rsps/app/build/libs/rsps-server.jar
Restart=on-failure
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
# Ativar e verificar
# sudo systemctl daemon-reload
# sudo systemctl enable --now rsps
# journalctl -u rsps -f
7) Backups, updates and safe maintenance
Perform regular backups of the database and data/config directories. Test restores. Plan updates with a maintenance window. Restarting the service will disconnect active players.
Record metrics and alerts. These help anticipate incidents and scale the environment as your player base grows.
# Backup do banco (substitua credenciais) — armazene fora do servidor
mysqldump -u rsps -p' senha-muito-forte-aqui ' rsps > /backups/rsps-$(date +%F).sql
# Backup de configs e dados
sudo tar -czf /backups/rsps-data-$(date +%F).tar.gz /opt/rsps/data /opt/rsps/app/config.properties
# Atualização (parada curta):
# 1) Anuncie, 2) Pare serviço, 3) Pull e build, 4) Inicie
sudo systemctl stop rsps
cd /opt/rsps/app && sudo -u rsps git pull && sudo -u rsps ./gradlew clean build
sudo systemctl start rsps && sudo systemctl status rsps --no-pager
How to confirm it worked and troubleshooting
Quick checks: the process is listening on port 43594; logs show “Server started” with no DB errors; clients can authenticate from another network. When things fail, investigate one cause at a time.
Common issues include port conflicts, incompatible Java versions, incorrect credentials, and firewall/NAT blocking traffic. Adjust settings and restart the service between attempts.
- Port in use: change RSPS_PORT or stop the process occupying 43594.
- Java: match the emulator’s required Java version (8, 11 or 17) and PATH.
- Database: test connection with the mysql client and review grants/host.
- Firewall/NAT: confirm host rules and router forwarding.
- Logs: enable DEBUG temporarily to get detailed stack traces.
# Checar se o serviço está ativo e ouvindo
systemctl status rsps --no-pager
ss -lntp | grep 43594 || netstat -lntp | grep 43594
# Ver logs ao vivo
journalctl -u rsps -f
# Testar conexão ao banco
mysql -u rsps -p -h 127.0.0.1 -P 3306 -e "SELECT 1"
Frequently asked questions
Is it legal to run a RuneScape private server?
It depends on the licenses and files you use. Only run servers built from open-source emulators and assets with compatible licenses and without proprietary game clients or data. Review the game’s terms of use and local laws before making the server public or distributing files; legal responsibilities vary by jurisdiction.
Which port should I open for the server?
For most RSPS emulators the default game port is 43594/TCP. You can change the port in the server configuration file; if you do, update firewall rules and, on home networks, the router’s port forwarding. Confirm the port is open at the host and any cloud security groups so external clients can connect.
Can I run the server in Docker?
Yes. Many emulators run in containers: build an image with Java and the server, mount volumes for data and logs, and expose the game port. Containers simplify deployment and isolation, but compare them to VMs for availability, networking and persistence needs before choosing the best option for production.
What machine resources are recommended?
For testing the guide suggests a small VM with around 2 GB RAM and a multi-core CPU; larger groups need more CPU, RAM and faster disks (SSDs) and low-latency networking. Start small, monitor CPU, memory and I/O metrics under real load, and resize based on observed resource usage.
How can I confirm the server is running and troubleshoot common issues?
Quick checks: confirm the server process is listening on the configured game port, logs show a successful “Server started” message and no DB errors, and clients can authenticate from an external network. Troubleshoot common causes one at a time: port conflicts, Java version mismatches, incorrect DB credentials, or firewall/NAT blocking, then restart and recheck logs.
Need technical help stabilizing your server?
We can review logs, automate deploys, set up monitoring, and advise best practices for security and backups for your project.
Talk to the authorSee also
- Tutorial: Implement Canary releases with Traefik in Docker Compose using headers and weighted routing for gradual PHP deployments
- Tutorial: Configure HAProxy with Let's Encrypt and health checks to load balance traffic between Docker containers on a VPS (step-by-step)
- Hands‑On Tutorial: Implement mTLS Between Nginx and Microservices with smallstep CA in Docker Compose
- Tutorial: configure cgroup v2 and systemd ResourceControl to limit CPU, memory and I/O for Docker containers on Debian