Normally, when we try to create a Valheim server with BepInEx in Ubuntu, it becomes a big headache as there are so many steps, and even if we make a small mistake, it won’t load the plugins and won’t work as intended. So I’m here to guide you through this mess. I have made a video tutorial for this, which you can watch if you need a more practical demo. I have also given all the necessary commands below.
First, we need to Install the docker as it is easier than making it via the traditional server way. It has a package that has a preconfigured plugin-supported docker disk. To use that we need docker in our Ubuntu.
To install Docker on your Ubuntu system, follow these commands step by step:
Update the System
Run the following command to update your package index:
sudo apt-get update
Install Required Packages
You can use either of the following commands to install necessary dependencies:
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
OR
sudo apt install ca-certificates curl gnupg lsb-release
Set Up Keyrings for Docker
Create a directory for storing keys securely:
sudo install -m 0755 -d /etc/apt/keyrings
Download Docker’s official GPG key:
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
Adjust permissions to ensure the key can be read:
sudo chmod a+r /etc/apt/keyrings/docker.asc
Add Docker Repository
Set up the Docker repository by adding it to your package sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Update and Install Docker
Update the package list again:
sudo apt-get update
Now, install Docker and related components:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Verify Docker Installation
Run a test container to verify everything is working correctly:
sudo docker run hello-world
Now that we have done the big part, we need to fetch the Valheim server image from Docker Hub. So we can configure it as soon as possible. 😉
Valheim Server Installation
To set up a Valheim dedicated server using Docker, follow these steps:
Pull the Valheim Server Image
Download the Valheim server image from Docker Hub:
sudo docker pull lloesche/valheim-server
Create a Configuration Directory
Ensure that the configuration directory exists:
mkdir valheim-server-config
Run the Valheim Server
Execute the following command to start the server with custom settings:
sudo docker run -d --name valheim-server -p 2456-2458:2456-2458/udp -v $HOME/valheim-server-config:/config -e SERVER_NAME="Server name" -e WORLD_NAME="World name" -e SERVER_PASS="ServerPassworD" -e SERVER_PUBLIC="true" lloesche/valheim-server
We do need a place where we can manage our server easily because It may get a bit frustrating if you forget the commands to restart the server or start the sever. That’s where the yacht comes to help us. This gives you a Web Interface for your Server Management.
Web Interface for Server Management
To easily manage your server, you can use Yacht, a lightweight web-based Docker management tool.
Create a Docker Volume for Yacht
sudo docker volume create yacht
Run Yacht Web Interface
Execute the following command to start Yacht:
sudo docker run -d -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock -v yacht:/config --name yacht selfhostedpro/yacht
Find Your Local IP Address
Run the following command to check your server’s IP:
ifconfig
Default Login Credentials for Yacht
- Username: admin@yacht.local
- Password: pass
Installing Mods and Plugins
To install mods and plugins on your Valheim server, copy the plugin files into the correct directory:
Copying Plugins to the Server
sudo cp -r * /home/yourusername/Downloads/FromPathWhereYourModsStored /home/yourusername/valheim-server-config/bepinex/plugins
Removing Unwanted Mods
If you need to remove old or unnecessary mods:
sudo rm -r mods
This completes the installation and setup of Docker, Valheim server, and Yacht for easy server management.
https://play.google.com/store/apps/details?id=com.athisoft.valhimguide
I hope this helps you well and enjoy your gaming journey. Before you go Do you want an Android app for your Valheim guide? Check out our brand new app that has a full Valheim-related guide.