How to set up and remotely access a CasaOS server

Learn how to set up a personal Linux server with CasaOS and remotely access it over Meshnet.

Introduction

For many individuals, the initial steps of self-hosting and personal server setups can often appear daunting. Beginners frequently seek straightforward solutions that offer guidance without requiring significant commitments.

A tool novices use to familiarize themselves with self-hosting is CasaOS — open-source software designed to convert a Linux machine into a functional personal server. CasaOS offers an intuitive web interface, simplifying the deployment and management of various Docker-based apps. Depending on the apps you decide to host, you may want remote access to the server. This would allow you to access your apps while away from home and perform remote maintenance.

By pairing CasaOS with Meshnet, you can create a private device network that mimics a traditional local area network (LAN) without port forwarding. This functionality enables seamless remote access to your CasaOS server, regardless of your physical location.

To start, check out the video tutorial below for a visual walkthrough:

Alternatively, if you prefer written instruction, this page contains a step-by-step guide on installing CasaOS on a Linux machine and establishing a remote connection using Meshnet.

Installing CasaOS

CasaOS can be installed by using a single-line installation script. The script will check whether your system is compatible with CasaOS and then start downloading and installing all required software. To begin the installation:

  1. Open Terminal.

  2. Run the following command to execute the CasaOS installation script:

    curl -fsSL https://get.casaos.io | sudo bash

You can monitor the installation progress in the terminal window. Once the installation is complete, you will see the address for accessing your CasaOS dashboard.

URL for accessing CasaOS web interface highlighted in the terminal.

Access the CasaOS web interface

To use your CasaOS instance, navigate to its web interface and create an account.

  1. Open your internet browser.

  2. In the URL bar, enter the address shown after completing the CasaOS installation and press Enter. Example http://192.168.202.83

  3. On the CasaOS welcome screen, select Go.

  4. Type in your preferred username and password.

  5. Click Create.

    "Create" button highlighted on the CasaOS account creation page.

The page should now reload and showcase your CasaOS dashboard.

Note

If you forget your username or password, you can reset the credentials by following the instructions on the CasaOS documentation page.

Installing apps

To streamline the process of installing apps on your home server, CasaOS has a dedicated App Store. In the store, you can choose from a wide range of popular apps, such as Jellyfin, Pi-hole, Home Assistant, and many others. Alternatively, if you cannot find a wanted service in the store, you can manually configure and launch it using Docker.

Method 1: From the App Store

This section will use AdGuard Home as an example. However, the process for installing other apps is nearly identical.

  1. Open your CasaOS web interface.

  2. Under App, select App Store.

    App store card highlighted.

  3. Locate the app you want to install.

  4. Click the Install button if you wish to install it using the default configuration.

    "Install" button for AdGuard Home highlighted.

    Otherwise, if you want to review the settings or make some adjustments before installing:

    1. Select the app in the App Store.

    2. Hover over the dropdown arrow next to the Install button and click Custom install.

      Arrows pointing to the dropdown menu icon and the "Custom install" button.

    3. Check and adjust the available values to your preference.

    4. Click Install.

      "Install" button highlighted.

  5. Close the installation dialog by clicking the Continue in background button.

Once the software is installed, you will see it under the App section of the dashboard. Click it to navigate to the app’s web interface.

AdGuard Home underlined under the App category.

Method 2: Manual setup

CasaOS provides a graphical user interface (GUI) solution for manually deploying Docker containers. It provides you with all of the relevant fields where you need to enter the data for the app you want to install. To install an app manually:

  1. Open your CasaOS web interface.

  2. Under App, select App Store.

  3. In the upper-right corner, click Custom install.

  4. Fill in the Manual app install dialog with the data for your Docker container. The image below is an example of the Kavita e-book server’s Docker configuration.

    Kavita Docker container configuration in CasaOS.

  5. Click Install.

Once the software is installed, you will see it under the App section of the dashboard. Click it to navigate to the app’s web interface.

"Kavita" underlined under the App category.

Setting up Meshnet

After you’ve installed the apps you want to have on your server, you can proceed with setting up Meshnet to remotely access the server.

Install NordVPN

Take the following steps to set up NordVPN on your CasaOS server:

  1. Open your CasaOS web interface.

  2. In the upper-left corner, select Terminal and logs.

    Arrow pointing to the "Terminal and logs" button on the CasaOS web interface.

  3. Under Terminal, enter the username and password of your Linux user account (not the CasaOS web account) and click Connect.

    Username and password of the CasaOS server filled in.

  4. Download and install the NordVPN Linux client by running this command:

    sh <(wget -qO - https://downloads.nordcdn.com/apps/linux/install.sh)

  5. Log in to your NordVPN account.

Log in to NordVPN

You can log in to your NordVPN account without the use of a graphical user interface (GUI) in two ways:

  • By running the nordvpn login command with the --token flag

  • By running the nordvpn login command with the --callback flag

Instructions for both methods are outlined below.

Log in using a token
  1. On any device, log in to your Nord Account dashboard and select the Meshnet (by NordVPN) card.

    "Meshnet (by NordVPN)" card highlighted.

  2. Under Manual setup, select Set up NordVPN manually.

    Clicking the 'Set up NordVPN manually' button.

  3. Enter the verification code sent to your email address.

  4. Under Access token, click Generate new token.

    Clicking 'Generate new token'.

  5. In the dialog that appears, choose either a token that expires in 30 days or one that never expires, and then select Generate token.

    Selecting the token expiry option.

  6. Select Copy and close.

  7. On your server, run the nordvpn login --token <your_token> command, replacing <your_token> with the copied token. Example

    nordvpn login --token 3fe460cefb8dcf1478c92e45908cec9f9bdbadf7a456a6dfb35dc2c58ee39d5b

You should now see a welcome message.

Log in using a URL
  1. Run the following command:

    nordvpn login

  2. Open the provided link on any device in your browser.

  3. Complete the login procedure.

  4. Right-click the Continue button and select Copy link address.

  5. Run the nordvpn login --callback "<URL>" command, replacing <URL> with the previously copied link address. Example

    nordvpn login --callback "nordvpn://login?action=login&exchange_token=MGFlY2E1NmE4YjM2NDM4NjUzN2VjOWIzYWM3ZTU3ZDliNDdiNzRjZTMwMjE5YjkzZTNhNTI3ZWZlOTIwMGJlOQ%3D%3D&status=done"

You should now see a welcome message.

Tip

To preserve your token when logging out of the NordVPN app, use the nordvpn logout --persist-token command. Otherwise, your token will be revoked.

Note

If you encounter the error message “Whoops! Permission denied accessing /run/nordvpn/nordvpnd.sock,” enter sudo usermod -aG nordvpn $USER. Then, reboot your server and log back in.

Enable Meshnet

Upon logging in, enable Meshnet with this command:

nordvpn set meshnet on

To view the Nord name and Meshnet IP address of your device, enter the following command:

nordvpn meshnet peer list

Tip

For more convenient device access, you can rename this device and use its nickname instead of the default Nord name.

Accessing CasaOS over Meshnet

Once Meshnet is set up, you can start accessing and using your CasaOS instance, and the apps hosted on it, from remote devices with the help of Meshnet. To remotely access CasaOS:

  1. Copy the Nord name of your CasaOS server device from the NordVPN app.

  2. Open your internet browser.

  3. In the URL field, paste the copied Nord name followed by :81/ and press Enter. Example secret.meerkat-atlas.nord:81/

  4. Enter the login credentials for your CasaOS account and click Log in.

To access any of your hosted apps, simply click its card under the App section. The app’s web interface will open in a new browser tab.

Tip

To directly access a specific app, replace the :81/ part of the URL in step 3 with the corresponding port number of the app you want to reach.

Example secret.meerkat-atlas.nord:8096/

Optional: Configuring folder sharing

The Files app of CasaOS provides a simple interface for configuring and accessing Samba network shares. This allows you to make a folder accessible over the network or connect to a folder shared by another device.

Share a folder

To start sharing a folder:

  1. Open your CasaOS web interface.

  2. Under App, select Files.

  3. Navigate to the folder you want to share.

  4. Hover over the folder, select the three-dot menu, and click Share.

    Arrow pointing to the three-dot menu button and the "Share" option is highlighted.

  5. Note the path to the shared folder and close the dialog by clicking Got it.

    "Got it" button highlighted.

Now, your Meshnet peer devices can access the shared folder using the previously presented path. However, the local IP address must be replaced by the CasaOS server’s Nord name or Meshnet IP address.

Example \\secret.meerkat-atlas.nord\Videos

For detailed instructions on accessing shared folders from different platforms, consult the following pages:

Connect to a shared folder

To access a folder shared by another Meshnet peer device:

  1. Open your CasaOS web interface.

  2. Under App, select Files.

  3. On the left, next to Location, click the add (+) button and select Connect to network storage.

    The Add (plus) button and "Connect to network storage" option highlighted.

  4. In the Server address field, enter smb:// followed by the Nord name of the Meshnet peer that has shared the folder. Example smb://secret.meerkat-himalayas.nord

  5. Turn off the Connect as guest toggle and enter the authentication details for accessing the shared folder.

  6. Click Connect.

    Shared folder URL and authentication credentials entered and the "Connect" button is highlighted.

The Files app should now display all shared folders of the Meshnet peer device you specified. In addition, the network share will be available under the Location section on the left.

Added network share visible under "Location".

Last updated

© 2024 Nord Security. All Rights Reserved.