Skip to content
streamneo.
Setup Guides13 min read

How to Set Up a 24/7 YouTube Live Stream on an Ubuntu VPS with OBS

Connect OBS on an Ubuntu VPS to YouTube Live, check VPS suitability, choose cautious settings and plan for stream interruptions and archiving.

sn.
StreamNeoPublished 4 October 2026
Worth sharing?

Enable YouTube Live before you plan to start: first-time access may take up to 24 hours, so leave time for the channel to be enabled. Then connect OBS to the ingest URL and stream key from YouTube Studio, test the VPS with your actual scene, and start a scheduled broadcast only after checking its preview.

An Ubuntu VPS is not automatically suitable just because it has Linux and enough storage. OBS needs a compatible graphics and display environment, and the CPU and network must sustain your chosen output; YouTube also warns that a continuous stream longer than 12 hours may not be archived at all.

Enable live streaming before setup day

Check that live streaming is enabled for the channel well before the first broadcast. YouTube says first-time enablement may take up to 24 hours. This is a possible wait, not a guarantee that activation will take exactly that long, so do not leave channel eligibility until the hour you intend to go live. Start with YouTube’s encoder setup instructions and confirm the current requirements and Studio interface there.

Once enabled, create or schedule a stream in YouTube Studio’s Live Control Room. Choose the encoder workflow and locate the ingest URL and stream key shown for that stream. You will need both in OBS. Keep the key private: anyone who obtains it may be able to send video to your broadcast. Do not put it in a public script, screenshot, shared note or log. If you think it has been exposed, use YouTube’s current stream-key controls to replace it, then update OBS with the replacement.

For a scheduled stream, note its intended start time and whether you will manually publish it after checking the preview. Creating a scheduled broadcast and sending an encoder signal are separate actions in YouTube’s workflow. Do not assume that saving a stream in Studio means OBS is already broadcasting, or that an OBS connection by itself publishes the scheduled stream to viewers.

This guide assumes you are using OBS on an Ubuntu VPS. It does not provide a complete, current Ubuntu installation walkthrough: desktop packages, graphics support and remote access arrangements differ across VPS providers and Ubuntu versions. Follow the provider’s supported operating-system process, check the current OBS installation guidance, and verify each component rather than applying an old command list to an unfamiliar machine.

Decide whether OBS suits the VPS

A VPS advertised as Linux hosting may be a command-line-only machine. OBS is a graphical application, and OBS Project lists OpenGL 3.3 and X Window System or Wayland among its Linux/Unix requirements. Check the OBS system requirements and the provider’s current documentation for graphics compatibility and a display session. A virtual machine that lacks the required graphics support or a usable display environment may not be a practical place to run OBS, even if a command prompt is available.

The published requirements are not a sizing recipe. OBS explicitly cautions that meeting its baseline requirements does not guarantee that a system can stream or record. Encoding load varies with the selected encoder, resolution, frame rate and scene complexity. A static image with a music track is a different workload from several animated layers, browser sources, transitions and high-motion video. Do not infer a safe plan from a CPU count alone.

Before choosing or keeping a VPS, check the details that affect your actual broadcast:

What to check Why it matters What to verify
CPU and encoder options Encoding can consume substantial CPU, and the load depends on the encoder and scene. Whether OBS can encode your planned scene continuously without sustained overload.
Graphics and display support OBS on Linux needs compatible graphics support and a display system. OpenGL support and how the provider supports X Window System or Wayland for your Ubuntu setup.
Outbound network The stream must reach YouTube at a rate the connection can sustain. Sustained upload capacity, any transfer allowance or bandwidth limits, and the network path you will use.
Memory and storage OBS and the desktop need working memory; local recording needs space. Headroom for the planned applications and enough storage for any recording you intend to keep.
Reboot and support behaviour A restart or host issue can interrupt a continuous broadcast. How the provider handles maintenance, recovery and support, without treating these as uptime guarantees.

There is no validated VPS size in the sources used for this guide. Provider plans and terms change, and a machine’s advertised capacity does not prove it will sustain your specific OBS scene and upload. Compare the provider’s current CPU, graphics, memory, outbound transfer and support terms against the workload you will test; do not treat a generic “recommended VPS” figure as a guarantee.

A VPS may also disconnect your remote desktop session when you sign out or lose connectivity. Determine how the graphical session will persist across your own disconnection and after a reboot, and test the behaviour before relying on it. Process supervision and monitoring can help reveal or recover from failures, but YouTube and OBS documentation do not certify a particular remote desktop, service manager or restart script as a complete 24/7 solution.

Run a sustained preflight with the scene, audio and output settings you intend to use. Observe OBS’s status and the stream in YouTube’s Live Control Room rather than extrapolating from a brief connection. Also test what happens after your remote session disconnects, the VPS reboots, or OBS stops. A successful test demonstrates only the conditions you tested; it does not establish an uptime guarantee or remove the need to monitor the channel.

Connect OBS to YouTube’s encoder

In OBS, open the streaming settings and select YouTube if the service is available. Use the connection flow presented by OBS, or enter the stream URL and key from YouTube Studio if configuring the encoder manually. Take care not to paste the key into the URL field or expose it while screen-sharing. YouTube documents RTMP and RTMPS ingest; it recommends RTMPS, the encrypted extension of RTMP. Follow the current options shown in Studio and OBS rather than relying on an old screenshot or a copied key from another broadcast.

The connection sequence for a scheduled stream is deliberate. First, save the correct URL and key in OBS. Then start streaming from OBS so the encoder sends a signal to YouTube. Wait for the incoming feed and preview to appear in the Live Control Room. Check the picture and sound there; when YouTube’s scheduled-stream workflow prompts you, select Go live to publish. The exact controls can change, so use the current Studio workflow as the authority.

After publication, check the public watch page from a separate device or network if possible. Confirm that viewers can see the intended picture and hear the intended sound. This catches issues that are easy to miss when you inspect only the OBS canvas or the operator’s logged-in Studio view. If the broadcast is scheduled for later, repeat the checks at the actual start rather than assuming that a successful earlier test means the final stream is live.

Treat the stream key like a password. If another person needs to operate the channel, use an appropriate channel permission rather than sending the key through a public or broadly shared message. Keep the key out of command-line history, public repositories and support screenshots. If OBS no longer connects after a key change, update the saved setting in the correct profile and test again before the scheduled start.

Choose a cautious encoder baseline

Start with settings that YouTube supports and that your VPS can actually sustain. For conventional SDR H.264 streaming over RTMP or RTMPS, YouTube documents H.264 video, CBR rate control, AAC or MP3 audio, frame rates up to 60 fps and a recommended two-second keyframe interval. It says not to exceed four seconds. These are platform requirements and recommendations, not evidence that a particular virtual machine can encode or upload them reliably.

For a first 1080p30 H.264 trial, YouTube’s settings table lists 5 Mbps as the minimum and 14 Mbps as recommended. Those figures describe YouTube’s encoder guidance, not a tested VPS capacity or a promise of quality under all conditions. If the VPS or its network cannot sustain the chosen output, a lower resolution or bitrate may be more dependable than insisting on a larger picture. YouTube’s guidance recommends a speed test to test your upload bitrate; make that test from the environment that will send the live stream where possible.

Setting A cautious starting point How to decide whether to change it
Video codec and rate control H.264 with CBR for a conventional SDR setup. Use a supported encoder option in OBS and check that the VPS sustains encoding during the full scene test.
Frame rate 30 fps is a reasonable first trial for a static or slowly moving loop. Motion and scene complexity matter; test the actual material rather than assuming a higher rate is needed.
Keyframe interval Two seconds, YouTube’s recommendation. Do not exceed YouTube’s stated four-second maximum for this guidance.
Resolution and bitrate For 1080p30 H.264, YouTube lists 5 Mbps minimum and 14 Mbps recommended. Treat these as YouTube values. Reduce output if the encoder or sustained upload cannot support it.
Audio AAC or MP3, within YouTube’s supported encoder profile. Listen to the Live Control Room preview and public watch page, including quiet passages and loop transitions.

These are starting references, not a universal preset. A devotional channel with a still image and a clean audio track may have different encoding demands from a lofi channel with animated visuals or a news loop with frequent scene changes. Keep the scene simple for the initial test. Add overlays and sources one at a time, then repeat the sustained test so you know what changed when performance degrades.

If OBS reports increasing dropped frames or its connection indicator turns yellow or red, investigate before treating the channel as stable. OBS says these signs point to an unstable connection to the streaming service or a bitrate that the connection cannot sustain. Check the network and output rate, and compare the encoder’s workload with the scene. A VPS may be CPU-limited, network-limited, or affected by a display or graphics issue; changing bitrate alone will not fix every cause.

For more on how resolution and bitrate interact, see this YouTube Live bitrate guide. If your broadcast is a file loop, compare the video container trade-offs for looping in OBS before choosing what to load. Neither choice substitutes for testing the complete path from OBS to YouTube.

Test the scheduled stream before relying on it

Use a representative preflight rather than a short test with an empty scene. Include the intended video, audio, overlays and transitions, and let the stream run long enough to observe the VPS and connection under the planned load. YouTube recommends testing before going live and monitoring stream health. Check OBS for overload and dropped-frame changes, and check the Live Control Room for the incoming signal and warnings.

Check sound on the actual feed, not just through headphones attached to the VPS. Verify that the audio is present, at a sensible level and continuous across any loop point. Inspect picture, aspect ratio and any text or logos at the intended output resolution. If a loop has a black gap or a silent transition, it can be visible even when the encoder connection itself looks healthy.

For a scheduled broadcast, wait until YouTube shows the preview, then use the current Studio prompt to go live. Confirm the public watch page separately after publication. If no preview appears, check that OBS is using the URL and key for the correct scheduled stream, that the encoder is sending, and that the network allows the connection. Avoid repeatedly sharing or regenerating keys as a first troubleshooting step; preserve the secret and make one change at a time.

A reliable operating plan includes someone checking the broadcast, not only a machine that starts OBS. Decide who will notice a frozen picture, missing audio, a stopped encoder or a disconnected stream, and how they will respond. Test recovery from a process stop and VPS reboot while the channel can tolerate a test interruption. The sources do not promise that OBS or YouTube will repair every failure automatically, nor that an Ubuntu VPS will stay available without interruption.

This is also the point to decide whether running OBS yourself is worth the operational work. A persistent desktop, key handling, monitoring and recovery tests can be appropriate if you need control over OBS scenes and can maintain the VPS. If the particular pain is keeping your own computer out of the broadcast while still avoiding hands-on restarts, StreamNeo turns an uploaded video into a YouTube live stream that runs with your computer switched off and is monitored and restarted if it drops. It is YouTube-only, so it does not replace a need for OBS-specific live scenes or a different platform.

If a fallback picture or loop is part of your recovery plan, see how to set a fallback video for a continuous stream. A fallback can address a content gap, but it does not itself restore a failed VPS, encoder or internet path. Test the actual transition and keep the person responsible for checking the stream clear about what the fallback does and does not cover.

Plan recording separately from continuity

Do not count on YouTube to preserve a complete recording of one uninterrupted 24/7 stream. YouTube says streams under 12 hours can be automatically archived, but if a stream exceeds 12 hours it may not be captured at all. Its live archive guidance recommends keeping a local recording backup. This is a platform limit to account for, not a VPS size issue.

DVR rewind is a separate feature from a saved archive. YouTube warns that DVR may be limited or unavailable for live streams longer than 12 hours; check its current DVR guidance if viewers need to rewind. Do not assume that a stream remaining visible live means viewers will be able to seek backwards through the whole broadcast, or that an archive will appear after it ends.

If a recording matters, decide how it will be made and stored independently of the live feed. A local recording consumes storage and may add encoder load, so include both in the sustained test. Check that the recording file is present, plays with picture and sound, and is copied somewhere you can access before relying on it. Alternatively, plan shorter sessions and verify how the chosen broadcast workflow handles each transition. Do not promise that splitting sessions creates a seamless live channel or solves every archive issue; test the handover and communicate any interruption to viewers.

Continuous broadcasting and recording are different operational goals. A VPS may continue sending a live signal while local disk space fills, or the stream may remain visible while the archive is unavailable. Assign separate checks for live health, recording health and storage. If you need complete source material for later reuse, preserve your original files as well as any recordings created during the broadcast.

Before committing, compare the operating options on the pricing page. When the file and channel are ready, start free — 24-hour trial, no card.

FAQ

How do I stream to YouTube from an Ubuntu VPS?

Enable YouTube Live in advance, create or schedule an encoder stream in Live Control Room, and copy its ingest URL and key into OBS. Start OBS, check YouTube’s preview and follow Studio’s prompt to go live for a scheduled stream. First confirm the VPS has OBS-compatible graphics and display support and can sustain your planned scene and upload.

Can OBS run on a headless VPS?

Not simply because the VPS runs Ubuntu. OBS lists OpenGL 3.3 and X Window System or Wayland for Linux/Unix, so check the provider’s graphics and display support and test the session through disconnection and reboot. OBS also says that meeting baseline requirements does not guarantee streaming performance.

What bitrate should I use for YouTube Live?

For 1080p30 H.264, YouTube lists 5 Mbps minimum and 14 Mbps recommended. Treat that as platform guidance, not a promise about your VPS; speed-test the upload and run a sustained test with your actual scene. Lower the output if the connection or encoder cannot sustain it.

Will YouTube save a 24/7 livestream?

Do not rely on a single continuous stream longer than 12 hours being archived: YouTube says it may not be captured at all. DVR rewind can also be limited or unavailable on longer streams. If the recording matters, arrange and verify a separate local backup or test shorter sessions and their transitions.

YOU’VE REACHED THE END

Keep the ideas coming.

More guides, useful tools and a little help for your next broadcast.

Back to the journal ↗
YOUR NEXT READ

A little more to explore.

More Setup Guides guides ↗ · All topics ↗