ModernUO/assets/js/5cd2f5ea.46648658.js

1 line
No EOL
17 KiB
JavaScript

"use strict";(globalThis.webpackChunkwebsite=globalThis.webpackChunkwebsite||[]).push([[284],{4713(e,n,t){t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>g,frontMatter:()=>d,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"getting-started/starting","title":"Starting the Server","description":"Now that the server has been built, everything is run from the Distribution folder.","source":"@site/content/getting-started/starting.mdx","sourceDirName":"getting-started","slug":"/getting-started/starting","permalink":"/docs/getting-started/starting","draft":false,"unlisted":false,"editUrl":"https://github.com/modernuo/ModernUO/tree/main/website/content/getting-started/starting.mdx","tags":[],"version":"current","sidebarPosition":3,"frontMatter":{"sidebar_position":3,"title":"Starting the Server"},"sidebar":"docsSidebar","previous":{"title":"Creating a Build","permalink":"/docs/getting-started/building"},"next":{"title":"Configuration","permalink":"/docs/getting-started/configuration"}}');var s=t(4848),r=t(8453),o=t(5103),a=t(3457);t(7293);const d={sidebar_position:3,title:"Starting the Server"},l="Starting the Server",c={},h=[{value:"First Launch",id:"first-launch",level:2},{value:"Step 1: Game Data Directory",id:"step-1-game-data-directory",level:3},{value:"Step 2: Listener Address",id:"step-2-listener-address",level:3},{value:"Step 3: Server Name",id:"step-3-server-name",level:3},{value:"Step 4: Expansion and Maps",id:"step-4-expansion-and-maps",level:3},{value:"Step 5: Owner Account",id:"step-5-owner-account",level:3},{value:"Configuration Saved",id:"configuration-saved",level:3},{value:"Expected Console Output",id:"expected-console-output",level:2},{value:"Game Files",id:"game-files",level:2},{value:"Connecting to the Server",id:"connecting-to-the-server",level:2},{value:"Using ClassicUO",id:"using-classicuo",level:3},{value:"Local Testing",id:"local-testing",level:3},{value:"Connecting from Another Machine",id:"connecting-from-another-machine",level:3},{value:"Basic Troubleshooting",id:"basic-troubleshooting",level:2},{value:"Port Already in Use",id:"port-already-in-use",level:3},{value:"Missing Game Files or Wrong Data Directory",id:"missing-game-files-or-wrong-data-directory",level:3},{value:".NET SDK Not Found",id:"net-sdk-not-found",level:3},{value:"Permission Denied on Linux",id:"permission-denied-on-linux",level:3},{value:"Server Starts but Clients Cannot Connect",id:"server-starts-but-clients-cannot-connect",level:3}];function u(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"starting-the-server",children:"Starting the Server"})}),"\n",(0,s.jsxs)(n.p,{children:["Now that the server has been built, everything is run from the ",(0,s.jsx)(n.strong,{children:"Distribution"})," folder."]}),"\n",(0,s.jsx)(o.A,{children:{windows:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{children:["Using ",(0,s.jsx)("em",{children:"Windows Terminal"}),", ",(0,s.jsx)("em",{children:"Git Bash"}),", or ",(0,s.jsx)("em",{children:"PowerShell"}),", run:"]}),(0,s.jsx)(a.A,{language:"bash",children:"cd Distribution\nModernUO.exe"})]}),macos:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{children:["Using ",(0,s.jsx)("em",{children:"terminal"}),", run:"]}),(0,s.jsx)(a.A,{language:"bash",children:"cd Distribution\ndotnet ModernUO.dll"})]}),linux:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{children:["Using ",(0,s.jsx)("em",{children:"terminal"}),", run:"]}),(0,s.jsx)(a.A,{language:"bash",children:"cd Distribution\ndotnet ModernUO.dll"})]})}}),"\n",(0,s.jsx)(n.h2,{id:"first-launch",children:"First Launch"}),"\n",(0,s.jsxs)(n.p,{children:["When you start ModernUO for the very first time, there is no ",(0,s.jsx)(n.code,{children:"Configuration/modernuo.json"})," file yet. The server will walk you through an interactive setup to create one."]}),"\n",(0,s.jsx)(n.h3,{id:"step-1-game-data-directory",children:"Step 1: Game Data Directory"}),"\n",(0,s.jsx)(n.p,{children:"The server prompts you for the absolute path to your Ultima Online game files (or ClassicUO installation directory):"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"Please enter the absolute path to your ClassicUO or Ultima Online data:\n > C:\\Program Files\\Ultima Online\nAdded C:\\Program Files\\Ultima Online.\n[enter to finish]>\n"})}),"\n",(0,s.jsxs)(n.p,{children:["You can enter multiple directories if your files are split across locations. Press ",(0,s.jsx)(n.strong,{children:"Enter"})," on a blank line to finish."]}),"\n",(0,s.jsx)(n.h3,{id:"step-2-listener-address",children:"Step 2: Listener Address"}),"\n",(0,s.jsx)(n.p,{children:"Next, the server asks which IP address and port to listen on:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"Please enter the IP and ports to listen:\n - Only enter IP addresses directly bound to this machine\n - To listen to all IP addresses enter 0.0.0.0\n[0.0.0.0:2593]>\nAdded 0.0.0.0:2593.\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Press ",(0,s.jsx)(n.strong,{children:"Enter"})," to accept the default (",(0,s.jsx)(n.code,{children:"0.0.0.0:2593"}),"), which listens on all network interfaces on port 2593. This is the correct choice for most setups."]}),"\n",(0,s.jsx)(n.h3,{id:"step-3-server-name",children:"Step 3: Server Name"}),"\n",(0,s.jsx)(n.p,{children:"The server asks for your shard name, which is displayed in the server list:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"Please enter the name of your shard:\n[ModernUO]> My Shard\nServer name set to My Shard.\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Press ",(0,s.jsx)(n.strong,{children:"Enter"}),' to accept the default name "ModernUO".']}),"\n",(0,s.jsx)(n.h3,{id:"step-4-expansion-and-maps",children:"Step 4: Expansion and Maps"}),"\n",(0,s.jsxs)(n.p,{children:["Finally, the server prompts you to select the target expansion (e.g., T2A, UOR, AOS, ML, SA, etc.) and which maps to enable. Your selection is saved to ",(0,s.jsx)(n.code,{children:"Configuration/expansion.json"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"step-5-owner-account",children:"Step 5: Owner Account"}),"\n",(0,s.jsx)(n.p,{children:"If the server has no accounts (first launch), it offers to create the owner account:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"[20:04:28 WRN] This server has no accounts.\n[20:04:28 INF] Do you want to create the owner account now? (y/n):\ny\n[20:04:30 INF] Input Username:\nadmin\n[20:04:32 INF] Input Password:\nmypassword\n[20:04:34 INF] Owner account created: admin\n"})}),"\n",(0,s.jsxs)(n.p,{children:["This account has full administrative access (",(0,s.jsx)(n.code,{children:"AccessLevel.Owner"}),") and is automatically added to the protected accounts list, meaning it cannot be banned or deleted through in-game commands. If you skip this step, you can create accounts later by connecting with auto-account creation enabled (the default)."]}),"\n",(0,s.jsx)(n.h3,{id:"configuration-saved",children:"Configuration Saved"}),"\n",(0,s.jsx)(n.p,{children:"After answering these prompts, the server writes its configuration files:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"Configuration/modernuo.json"})," -- main server settings"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"Configuration/expansion.json"})," -- expansion and map selection"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"Configuration/server-access.json"})," -- protected accounts"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["On every subsequent launch, the server reads these files and ",(0,s.jsx)(n.strong,{children:"skips the prompts entirely"}),". To re-run setup, delete these files and restart."]}),"\n",(0,s.jsx)(n.h2,{id:"expected-console-output",children:"Expected Console Output"}),"\n",(0,s.jsx)(n.p,{children:"A successful startup looks like this (abbreviated):"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"ModernUO - [https://github.com/modernuo/modernuo] Version 0.15.6.6\nCopyright 2019-2026 ModernUO Development Team\n\n[20:04:29 INF] Reading server configuration from Configuration/modernuo.json...\n[20:04:29 INF] Running on .NET 10.0.5\n[20:04:32 INF] Loading Map Definitions\n[20:04:32 INF] Loading map definitions done (7 maps, 0 failures)\n[20:04:33 INF] Protected accounts registered: admin\n[20:04:33 INF] Automatically detected client version 7.0.103.0\n[20:04:33 INF] Encryption support enabled: Both\n[20:04:35 INF] Loading regions done (385 regions)\n[20:04:38 INF] Loading world done (230276 items, 43358 mobiles) (2.63 seconds)\n[20:04:38 INF] Auto-detected public IP address (47.154.82.160)\n[20:04:39 INF] Feature Flag system initialized with 10 flags\n[20:04:39 INF] Listening: 192.168.1.100:2593\n[20:04:39 INF] Listening: 127.0.0.1:2593\n[20:04:39 INF] Listening: 192.168.1.100:12000 (Pings)\n[20:04:39 INF] Listening: 127.0.0.1:12000 (Pings)\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Once you see the ",(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"Listening:"})})," lines, the server is running and ready to accept connections. Port ",(0,s.jsx)(n.code,{children:"2593"})," is the game port; port ",(0,s.jsx)(n.code,{children:"12000"})," is for ping/status queries."]}),"\n",(0,s.jsx)(n.h2,{id:"game-files",children:"Game Files"}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsx)(n.p,{children:"Ultima Online game files are required to run the server. These include map data, art, and other client assets that the server uses for world simulation."})}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["Game files are not distributed with ModernUO. Download the latest client from the ",(0,s.jsx)(n.a,{href:"https://uo.com/Client-Download/",children:"UO client download page"}),". After installing, point ModernUO to the directory containing the ",(0,s.jsx)(n.code,{children:".mul"})," and ",(0,s.jsx)(n.code,{children:".uop"})," files."]})}),"\n",(0,s.jsxs)(n.p,{children:["If you already have a ClassicUO installation, ModernUO can automatically detect the game files directory from ClassicUO's ",(0,s.jsx)(n.code,{children:"settings.json"}),". You can also point the server directly at the ClassicUO data folder."]}),"\n",(0,s.jsx)(n.h2,{id:"connecting-to-the-server",children:"Connecting to the Server"}),"\n",(0,s.jsx)(n.h3,{id:"using-classicuo",children:"Using ClassicUO"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Open ClassicUO and go to the server configuration screen."}),"\n",(0,s.jsxs)(n.li,{children:["Set the ",(0,s.jsx)(n.strong,{children:"Server IP"})," to the address of the machine running ModernUO."]}),"\n",(0,s.jsxs)(n.li,{children:["Set the ",(0,s.jsx)(n.strong,{children:"Server Port"})," to ",(0,s.jsx)(n.code,{children:"2593"})," (or whichever port you configured)."]}),"\n",(0,s.jsx)(n.li,{children:"Enter any username and password. If auto-account creation is enabled (the default), a new account is created on first login."}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"local-testing",children:"Local Testing"}),"\n",(0,s.jsxs)(n.p,{children:["For testing on the same machine that runs the server, use ",(0,s.jsx)(n.code,{children:"127.0.0.1"})," as the server address with port ",(0,s.jsx)(n.code,{children:"2593"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"connecting-from-another-machine",children:"Connecting from Another Machine"}),"\n",(0,s.jsxs)(n.p,{children:["If connecting from a different machine on your local network, use the server machine's LAN IP address (e.g., ",(0,s.jsx)(n.code,{children:"192.168.1.100"}),"). For connections over the internet, you need to forward port ",(0,s.jsx)(n.code,{children:"2593"})," (TCP) on your router to the server machine."]}),"\n",(0,s.jsx)(n.h2,{id:"basic-troubleshooting",children:"Basic Troubleshooting"}),"\n",(0,s.jsx)(n.h3,{id:"port-already-in-use",children:"Port Already in Use"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"Error: Address already in use\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Another process is using port 2593. Either stop the conflicting process or change the listener port in ",(0,s.jsx)(n.code,{children:"Configuration/modernuo.json"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'"listeners": ["0.0.0.0:2594"]\n'})}),"\n",(0,s.jsx)(o.A,{children:{windows:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:"Find what is using the port:"}),(0,s.jsx)(a.A,{language:"bash",children:"netstat -ano | findstr :2593"})]}),macos:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:"Find what is using the port:"}),(0,s.jsx)(a.A,{language:"bash",children:"lsof -i :2593"})]}),linux:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:"Find what is using the port:"}),(0,s.jsx)(a.A,{language:"bash",children:"ss -tlnp | grep 2593"})]})}}),"\n",(0,s.jsx)(n.h3,{id:"missing-game-files-or-wrong-data-directory",children:"Missing Game Files or Wrong Data Directory"}),"\n",(0,s.jsxs)(n.p,{children:["If the server cannot find required ",(0,s.jsx)(n.code,{children:".mul"})," or ",(0,s.jsx)(n.code,{children:".uop"})," files, it will fail during world loading. Verify that:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["The path in ",(0,s.jsx)(n.code,{children:"Configuration/modernuo.json"})," under ",(0,s.jsx)(n.code,{children:'"dataDirectories"'})," points to the correct location."]}),"\n",(0,s.jsxs)(n.li,{children:["The directory contains files like ",(0,s.jsx)(n.code,{children:"map0.mul"}),", ",(0,s.jsx)(n.code,{children:"statics0.mul"}),", ",(0,s.jsx)(n.code,{children:"tiledata.mul"}),", or their ",(0,s.jsx)(n.code,{children:".uop"})," equivalents."]}),"\n",(0,s.jsx)(n.li,{children:"The UO client has been fully installed (not just the launcher)."}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["To fix the path, either edit ",(0,s.jsx)(n.code,{children:"Configuration/modernuo.json"})," directly or delete it and re-run the server to go through the setup prompts again."]}),"\n",(0,s.jsx)(n.h3,{id:"net-sdk-not-found",children:".NET SDK Not Found"}),"\n",(0,s.jsx)(o.A,{children:{windows:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:"If you see errors about the .NET runtime or SDK not being found, run the build tool in interactive mode. It will detect and offer to install the correct .NET SDK:"}),(0,s.jsx)(a.A,{language:"bash",children:"./publish.cmd"})]}),macos:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:"If you see errors about the .NET runtime or SDK not being found, run the build tool in interactive mode. It will detect and offer to install the correct .NET SDK:"}),(0,s.jsx)(a.A,{language:"bash",children:"./publish.sh"})]}),linux:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:"If you see errors about the .NET runtime or SDK not being found, run the build tool in interactive mode. It will detect and offer to install the correct .NET SDK:"}),(0,s.jsx)(a.A,{language:"bash",children:"./publish.sh"})]})}}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsx)(n.p,{children:"The interactive build tool is the easiest way to resolve SDK issues. It checks your environment and offers to install missing dependencies automatically."})}),"\n",(0,s.jsx)(n.h3,{id:"permission-denied-on-linux",children:"Permission Denied on Linux"}),"\n",(0,s.jsxs)(n.p,{children:["Do not run ModernUO as the ",(0,s.jsx)(n.code,{children:"root"})," user. Create a dedicated user account for the server:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo useradd -m modernuo\nsudo su - modernuo\n"})}),"\n",(0,s.jsx)(n.p,{children:"If you need to bind to a port below 1024 (not typical for UO), grant the binary the capability instead of running as root:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo setcap 'cap_net_bind_service=+ep' /path/to/Distribution/dotnet\n"})}),"\n",(0,s.jsx)(n.h3,{id:"server-starts-but-clients-cannot-connect",children:"Server Starts but Clients Cannot Connect"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Make sure you are connecting to the correct IP address and port."}),"\n",(0,s.jsx)(n.li,{children:"Check that no firewall is blocking port 2593 (TCP)."}),"\n",(0,s.jsx)(n.li,{children:"If connecting over the internet, verify that port forwarding is configured on your router."}),"\n",(0,s.jsxs)(n.li,{children:["On Linux, check ",(0,s.jsx)(n.code,{children:"iptables"})," or ",(0,s.jsx)(n.code,{children:"ufw"})," rules allow inbound traffic on port 2593."]}),"\n"]})]})}function g(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},5103(e,n,t){t.d(n,{A:()=>o});var i=t(1470),s=t(9365),r=t(4848);function o({children:e}){const n=function(){if("undefined"==typeof navigator)return"linux";const e=(navigator.platform??"").toLowerCase(),n=navigator.userAgent.toLowerCase();return e.startsWith("win")||n.includes("windows")?"windows":e.startsWith("mac")||n.includes("macintosh")?"macos":"linux"}();return(0,r.jsxs)(i.A,{groupId:"os",defaultValue:n,children:[e.windows&&(0,r.jsx)(s.A,{value:"windows",label:"Windows",children:e.windows}),e.macos&&(0,r.jsx)(s.A,{value:"macos",label:"macOS",children:e.macos}),e.linux&&(0,r.jsx)(s.A,{value:"linux",label:"Linux",children:e.linux})]})}}}]);