Menu
 

Server Setup - Necesse Wiki

Server Setup

Setting up a Necesse dedicated server allows you to create a persistent multiplayer world for survival, exploration, and base building. This guide covers multiple setup methods including Windows, Linux, and Docker deployment.

System Requirements

Before starting, ensure your server meets minimum requirements:

  • OS: Windows 10+, Linux (Ubuntu 20.04+), or Docker
  • RAM: 2 GB minimum, 4 GB recommended
  • CPU: Dual-core processor or better
  • Storage: 2 GB available space
  • Network: Broadband internet connection

Port Configuration

Necesse uses the following default port:

  • Port: 14159 (UDP)
  • Protocol: UDP only

This port must be opened on your firewall and forwarded in your router for external connections.

Windows Setup via SteamCMD

Installing SteamCMD

1. Download SteamCMD from Valve's developer wiki

2. Extract SteamCMD to a folder (e.g., C:\steamcmd)

3. Run steamcmd.exe to initialize

Downloading Necesse Server

1. Run SteamCMD

2. Execute these commands:

force_install_dir C:\NecesseServer
login anonymous
app_update 1169040 validate
quit

3. Server files will download to the specified directory

Starting the Server

1. Navigate to your server directory

2. Run the server:

Server.jar -world "My World"

Or create a batch file for easier launching:

@echo off
java -jar Server.jar -world "MyWorld"
pause

Linux Setup

Installing Dependencies

For Ubuntu/Debian:

sudo apt update
sudo apt install lib32gcc1 steamcmd
sudo apt install openjdk-17-jre

For CentOS/RHEL:

sudo yum install glibc.i686 libstdc++.i686
sudo yum install java-17-openjdk

Downloading Server Files

1. Create a server directory:

mkdir ~/necesse-server
cd ~/necesse-server

2. Use SteamCMD to download:

steamcmd +force_install_dir ~/necesse-server +login anonymous +app_update 1169040 validate +quit

Running the Server

Start with no interaction:

java -jar Server.jar -world "MyWorld" -nogui

Running as a Service (systemd)

1. Create a service file:

sudo nano /etc/systemd/system/necesse.service

2. Add the following content:

[Unit]
Description=Necesse Dedicated Server
After=network.target

[Service]
Type=simple
User=necesse
WorkingDirectory=/home/necesse/necesse-server
ExecStart=/usr/bin/java -jar Server.jar -world "MyWorld" -nogui
Restart=on-failure

[Install]
WantedBy=multi-user.target

3. Enable and start the service:

sudo systemctl daemon-reload
sudo systemctl enable necesse
sudo systemctl start necesse

Docker Setup

Docker provides the easiest deployment method with isolated environment.

Using Docker Compose (Recommended)

1. Create a docker-compose.yml file:

version: '3'
services:
  necesse:
    image: solareon/necesse-dedicated:latest
    container_name: necesse-server
    ports:
      - "14159:14159/udp"
    volumes:
      - ./data:/root/.config/Necesse
    environment:
      - WORLD_NAME=MyWorld
      - MAX_PLAYERS=10
      - SERVER_PASSWORD=
    restart: unless-stopped

2. Start the server:

docker-compose up -d

3. View logs:

docker-compose logs -f

Docker Run Command

Alternatively, use a single docker run command:

docker run -d \
  --name necesse-server \
  -p 14159:14159/udp \
  -v $(pwd)/data:/root/.config/Necesse \
  -e WORLD_NAME="MyWorld" \
  solareon/necesse-dedicated:latest

Server Configuration

Configuration File

Server settings can be customized through configuration files or command-line arguments:

Common Settings

  • World Name: -world "WorldName"
  • Max Players: Configure in server settings
  • Password: Set server password for privacy
  • Port: Custom port configuration
  • MOTD: Message of the day for players

Firewall Configuration

Windows Firewall

1. Open Windows Defender Firewall with Advanced Security

2. Create Inbound Rule for UDP port 14159

3. Allow the connection through all profiles

Linux Firewall (UFW)

sudo ufw allow 14159/udp
sudo ufw reload

Router Port Forwarding

1. Access router admin panel

2. Navigate to Port Forwarding

3. Forward UDP port 14159 to your server's local IP

4. Save and apply settings

Connecting to Your Server

1. Launch Necesse client

2. Go to Multiplayer

3. Enter your server IP:Port (e.g., yourip:14159)

4. Connect and play!

Server Management

Updating the Server

For SteamCMD installations:

steamcmd +force_install_dir /path/to/server +login anonymous +app_update 1169040 validate +quit

For Docker:

docker-compose pull
docker-compose up -d

Backup Strategy

Regularly backup world saves located in:

  • Windows: %USERPROFILE%\.config\Necesse\saves
  • Linux: ~/.config/Necesse/saves
  • Docker: Volume mount location

Troubleshooting

Server Not Visible

  • Verify UDP port 14159 is open and forwarded
  • Check firewall isn't blocking connections
  • Ensure server is running (check logs)
  • Try direct connect with IP:Port

Connection Timeouts

  • Confirm UDP protocol is properly configured
  • Verify router port forwarding
  • Check server performance (CPU/RAM)
  • Ensure no VPN interference
Top