Skip to content

Repository files navigation

opp-server2

Build Perpetuum.Server Service v2

The Open Perpetuum Server 2

Running a local server

Windows and x64 only. The bootstrapper is annotated [SupportedOSPlatform("windows")] and the Admin Tool is WPF.

You need the .NET 8 SDK, a SQL Server instance, and the perpetuumsa database — see OPDB for restoring and patching it.

Build

dotnet build PerpetuumServer2.sln -c Release -p:Platform=x64

Configure

The server reads perpetuum.ini from the game root directory. ConnectionString is the only setting that must match your machine.

The perpetuum.ini written by the Perpetuum Dedicated Server installer will not start this server. It was written for the original server, which used System.Data.SqlClient; this one uses Microsoft.Data.SqlClient, which differs in two ways that both abort startup before any zone loads:

  1. Connection Reset was removed. Microsoft.Data.SqlClient refuses the keyword while the connection is being constructed:

    The keyword 'Connection Reset' is not supported on this platform.
    

    The server checks the connection string before it connects and refuses to start if the driver would reject any of it, naming perpetuum.ini, the directory it is in, and every setting the driver refused — so one restart is enough to clear them all rather than one restart per setting. Delete them from perpetuum.ini. Connection Reset in particular is safe to delete outright: the framework stopped honouring it long ago, because a pooled connection is always reset.

    The check keeps no list of its own — it asks the driver about each setting in turn, so a keyword nobody anticipated is reported the same way. Network Library and Context Connection are also refused and will be named if they are present.

  2. Encrypt now defaults to true. Since version 4.0 the driver encrypts by default and validates the server certificate. A local SQL Server using a self-signed certificate fails logon in the SSL provider:

    A connection was successfully established with the server, but then an error occurred during
    the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an
    authority that is not trusted.)
    

    The trailing part of that message comes from Windows and appears in the system language, so match on the condition rather than the exact text. This one you must fix yourself — the server cannot decide for you whether skipping certificate validation is acceptable.

A connection string that works against a local named instance with Windows authentication:

Server=localhost\PERPSQL;Database=perpetuumsa;Trusted_Connection=True;TrustServerCertificate=True;Pooling=True;Connection Timeout=30;Connection Lifetime=260;Min Pool Size=20;Max Pool Size=60;

TrustServerCertificate=True keeps the connection encrypted but skips validating the certificate. It is appropriate for a local development instance only. Do not carry it into a deployment where the connection leaves the machine — install a trusted certificate there instead. Setting Encrypt=False also works locally and is strictly worse: it drops the encryption as well.

Run

cd src/Perpetuum.Server
dotnet run -- "C:\PerpetuumServer\data"

The server is up when the log reads >>>> Perpetuum Server State : [Online]. Ctrl+C shuts it down; a clean shutdown ends at State : [Off].

About

OpenPerpetuum .Net 8

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages