minetestserver writing to wrong directory

Post Reply
soshimee
New member
Posts: 4
Joined: Sun Jul 31, 2022 10:20

minetestserver writing to wrong directory

by soshimee » Post

I need minetestserver to read/write to the current directory, not the main directory that I don't even know where it is.

lemonzest
New member
Posts: 7
Joined: Sun Mar 06, 2022 21:19
IRC: lemonzest
In-game: lemonzest

Re: minetestserver writing to wrong directory

by lemonzest » Post

I start my servers on linux from a user systemd unit template file it, I set it so for example it executes this

/usr/bin/minetestserver --logfile /home/lemonzest/.minetest/logs/mineclone2.log --gameid mineclone2 --worldname mineclone2 --config /home/lemonzest/.minetest/serverconf/mineclone2.conf

to run a mineclone2 server with all its configs contained and for only that instance, other sub games use their own settings so can be done independently of each other (I run 4 servers for friends, not public)

it uses ~/.minetest dir for its configs/logs/worlds/mods etc, I can post the base file if you want

User avatar
Blockhead
Member
Posts: 542
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
In-game: Blockhead Blockhead256
Location: Land Down Under

Re: minetestserver writing to wrong directory

by Blockhead » Post

Compile with cmake . -DRUN_INPLACE=TRUE (and all your other flags), then it will run all in that one directory instead of looking at system directories. Install your mods and games and so on to the source tree, or copy the relevant directories like bin, builtin, games and mods out into a new directory.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My mod: Foodblocks

soshimee
New member
Posts: 4
Joined: Sun Jul 31, 2022 10:20

Re: minetestserver writing to wrong directory

by soshimee » Post

Okay, after some trouble I got it to build, but now I'm facing this error:

Code: Select all

2022-08-01 18:28:45: ERROR[Main]: Game [] could not be found.
2022-08-01 18:28:45: ERROR[Main]: ServerError: Supplied invalid gamespec

User avatar
Blockhead
Member
Posts: 542
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
In-game: Blockhead Blockhead256
Location: Land Down Under

Re: minetestserver writing to wrong directory

by Blockhead » Post

Your Minetest directory should look like this:

Code: Select all

minetest/
  bin/
    minetestserver
  games/
    minetest_game/
  builtin/
  mods/
  worlds/
Maybe you don't have a game installed?
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My mod: Foodblocks

soshimee
New member
Posts: 4
Joined: Sun Jul 31, 2022 10:20

Re: minetestserver writing to wrong directory

by soshimee » Post

Hmm... no, there's nothing else.

soshimee
New member
Posts: 4
Joined: Sun Jul 31, 2022 10:20

Re: minetestserver writing to wrong directory

by soshimee » Post

Also, I don't have a minetest directory since I want it to be portable & run in place.

User avatar
Blockhead
Member
Posts: 542
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
In-game: Blockhead Blockhead256
Location: Land Down Under

Re: minetestserver writing to wrong directory

by Blockhead » Post

Minetest can't be run inside only one directory. It has to be in a directory holding bin/, games/ and so on. What exactly is your definition of portability anyway? And why is it so important? What's your use case?
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My mod: Foodblocks

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests