Network mode
In network mode, every server of your network uses the same prices, the same daily limits, the same global booster and the same sales history. Change a price in the editor on one server and the others sell at the new price within a second. A player who reaches a daily limit on survival can’t sell more of that item on skyblock.
Nothing goes on the proxy: Velocity, BungeeCord and Waterfall need no plugin. Money is still paid by the economy plugin of the server where the player sells.
What you need
- A database every server can reach: MySQL, MariaDB, PostgreSQL or MongoDB. Tested with MySQL 8.4 and 9.7, MariaDB 11.4 and 12.1, PostgreSQL 17, MongoDB 7 and 8.
- A Redis server every server can reach (tested with Redis 8). It holds only counters and messages, a few megabytes; the database keeps everything that matters.
Step by step
1. Create the database
MySQL or MariaDB:
CREATE DATABASE netsell CHARACTER SET utf8mb4;
CREATE USER 'netsell'@'%' IDENTIFIED BY 'a-strong-password';
GRANT ALL PRIVILEGES ON netsell.* TO 'netsell'@'%';PostgreSQL:
CREATE USER netsell WITH PASSWORD 'a-strong-password';
CREATE DATABASE netsell OWNER netsell;MongoDB needs no setup: the database and its collections are created on first use.
zNetSell creates its tables on the first start. Don’t create them yourself.
2. Point every server at the database and Redis
In plugins/zNetSell/config.yml on every server, set the same database and redis sections, and a different
server-id:
server-id: survival # skyblock, factions... one name per server
database:
type: mariadb # mysql, mariadb, postgresql or mongodb
host: 10.0.0.5
port: 0 # 0 = the usual port
name: netsell
user: netsell
password: "a-strong-password"
table-prefix: ns_
redis:
enabled: true
host: 10.0.0.6
port: 6379
password: "redis-password"
prefix: "ns:"
limits:
time-zone: Europe/Madrid # the same on every serverMust match on every server: the whole database section, the Redis address, redis.database, redis.prefix and
limits.time-zone. Must differ: server-id.
3. Restart the servers
Restart them one after another or all at once; both work. Each server’s console says
Connected to Redis at 10.0.0.6:6379.
4. Check it
Run /netsell status on each server. You want:
Server survival · database mariadb · Redis connected (10.0.0.6:6379) · booster noneThen try it: set a price with /netsell setprice diamond 30 on one server and /worth diamond on another.
Moving from one server to a network
Your SQLite prices don’t move by themselves. Before switching the first server, note them down or keep its
netsell.db; then on the network either set them again in the editor, or import them from the plugin you used
before (/netsell import). The sales history of the old SQLite file stays in that file.
What happens when something fails
| What fails | What players notice | What zNetSell does |
|---|---|---|
| Redis goes down | Nothing; they keep selling. | Each server counts daily limits on its own, starting from the sales table, and says so in the console. /netsell status shows unreachable since .... When Redis is back, the counts are added together. |
| Redis restarts with old data | Nothing. | Its run id changed, so every counter is rebuilt from the sales table instead of trusting the old snapshot. |
| The database goes down | Sales go on. Only an item whose daily count has to be rebuilt (the player’s first sale of it today, or the first since Redis went down) says the limits can’t be checked, and nothing is taken. | The sales history waits in memory and is saved when the database is back, never twice. Prices already loaded keep working; price changes can’t be saved until it’s back. |
| One server restarts | Nothing on the others. | On start it reads the prices and the booster again. |
While Redis is down, a player who switches servers can sell up to the limit on each of them, because each server only knows its own sales since the outage began. Selling more than the limit across the network needs Redis, which is why the console warns when it’s gone.
Several networks, one database
To run two separate networks (say, a test network and the real one) on the same database and Redis, give each its
own database.table-prefix and redis.prefix. Servers only share with those that have the same prefixes.
Troubleshooting
/netsell statussays Redis unreachable. Check the address, port and password from that machine:redis-cli -h 10.0.0.6 -a redis-password pingmust answerPONG. Redis listens only on localhost by default; changebindinredis.confand protect it with a password.- A price changes on one server but not on another. Both must show
connectedin/netsell statusand use the sameredis.prefixandredis.database. - Daily limits reset at different times. Set the same
limits.time-zoneon every server. Could not start, disabling zNetSellat startup. The message after it says what failed: usually the database address, user or password. Fix it inconfig.ymland restart.